Plugin Directory

Changeset 1782870


Ignore:
Timestamp:
12/07/2017 05:44:32 PM (8 years ago)
Author:
billybigpotatoes
Message:

tested with WordPress 4.9.1

Location:
brighttalk-wp-shortcode
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • brighttalk-wp-shortcode/trunk/brighttalk-wp-shortcode.php

    r1586741 r1782870  
    22/**
    33 * @wordpress-plugin
    4  * Plugin Name:       BrightTALK WordPress Shortcode
    5  * Plugin URI:        https://github.com/BrightTALK/brighttalk-wp-shortcode/
    6  * Description:       Add the BrightTALK media player shortcode to to simplify embedding BrightTALK content into your site.
    7  * Version:           2.1.2
    8  * Author:            BrightTALK, Dorian Logan
    9  * Author URI:        https://developer.brighttalk.com/
    10  * License:           GPLv2 or later
    11  * License URI:       http://www.gnu.org/licenses/gpl-2.0.html
    12  * Text Domain:       brighttalk-wp-shortcode
     4 * Plugin Name: BrightTALK WordPress Shortcode
     5 * Plugin URI: https://github.com/BrightTALK/brighttalk-wp-shortcode/
     6 * Bitbucket Plugin URI: https://bitbucket.org/brighttalklabs/brighttalk-wp-shortcode
     7 * Bitbucket Branch: master
     8 * Description: Add the BrightTALK media player shortcode to to simplify embedding BrightTALK content into your site.
     9 * Version: 2.3.0
     10 * Author: BrightTALK, Dorian Logan
     11 * Author URI: https://developer.brighttalk.com/
     12 * License: GPLv2 or later
     13 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
     14 * Text Domain: brighttalk-wp-shortcode
    1315 */
    1416
     
    6668  }
    6769
    68   $tz = '';
    69 
    70   // Fetch BTSession
    71   if (isset($_COOKIE["BTSESSION"])) {
    72     $session = $_COOKIE["BTSESSION"];
    73     // $tz = brighttalk_getTZFromBTSession($session);
    74   }
    75 
    76   if (!$tz) {
    77     // Use WP GeoIP to guess timezone by IP
    78     $country = getenv('HTTP_GEOIP_COUNTRY_CODE');
    79     $region = getenv('HTTP_GEOIP_REGION');
    80     $tz = brighttalk_region_tz_lookup($country, $region);
    81   }
    82 
    83   if (!$tz) {
    84     $tz = 'UTC';
    85   }
    86 
     70    // Check if a cookie is set
     71    if ( ! isset( $_COOKIE['BTSESSION'] ) ) {
     72        // Get environment data
     73        $country = getenv( 'HTTP_GEOIP_COUNTRY_CODE' );
     74        $region = getenv( 'HTTP_GEOIP_REGION' );
     75        $tz = brighttalk_region_tz_lookup(
     76            $country,
     77            $region
     78        );
     79        if ( false === $tz ) {
     80            // Set a default
     81            $tz = 'UTC';
     82        }
     83    } else {
     84        // Split the string
     85        $parts = explode( ':', $_COOKIE['BTSESSION'] );
     86        // Check if a time zone is available
     87        if ( empty( $parts[4] ) ) {
     88            // Get environment data
     89            $country = getenv( 'HTTP_GEOIP_COUNTRY_CODE' );
     90            $region = getenv( 'HTTP_GEOIP_REGION' );
     91            $tz = brighttalk_region_tz_lookup(
     92                $country,
     93                $region
     94            );
     95            if ( false === $tz ) {
     96                // Set a default
     97                $tz = 'UTC';
     98            }
     99        } else {
     100            // Set time zone
     101            $tz = $parts[4];
     102        }
     103    }
    87104
    88105  // Convert date
     
    154171// Add BrightTALK TZ Helper function
    155172function brighttalk_region_tz_lookup($country, $region) {
    156     $timezone = null;
     173    $timezone = false;
    157174    switch ($country) {
    158175        case "AD":
  • brighttalk-wp-shortcode/trunk/readme.txt

    r1586741 r1782870  
    44Tags: video, webinar, webcast, brighttalk, lead generation, audience, b2b
    55Requires at least: 4.0.0
    6 Tested up to: 4.7.2
     6Tested up to: 4.9.1
    77Stable tag: 4.7.0
    88License: GPLv2 or later
     
    1414
    1515This plugin allows a wordpress author to embed the BrightTALK media player in their site using a short code.
     16
     17The BrightTALK Media Player deals with the registration and playback in page for live, recorded and upcoming presentations.
     18
     19The BrightTALK registration process has been updated providing single sign on and registration powered by BrightTALK smert form processes.
    1620
    1721To embed content you must specify the BrightTALK channel ID, you can also specify the comm ID of the presentation.
Note: See TracChangeset for help on using the changeset viewer.