Plugin Directory

Changeset 1466268


Ignore:
Timestamp:
08/02/2016 03:25:52 PM (10 years ago)
Author:
nullvariable
Message:

tested with 4.5.3, prefer is_ssl(), fix <front> bug

Location:
liveperson/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • liveperson/trunk/liveperson.php

    r1400790 r1466268  
    44 * Plugin URI:  https://register.liveperson.com/wordpress
    55 * Description: LivePerson offers a modern way to talk to visitors regardless of how they visit your website. This plugin adds it to specified pages on your site.
    6  * Version:     1.0.0
     6 * Version:     1.0.1
    77 * Author:      LivePerson, Inc.
    88 * Author URI:  http://www.liveperson.com
     
    228228
    229229/**
    230  * Returns a boolean indicating whether or not the page request used https.
    231  *
    232  * @see http://stackoverflow.com/questions/1283327/how-to-get-url-of-current-page-in-php#comment49052642_25651479
    233  */
    234 function liveperson_is_https() {
    235   if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
    236     return TRUE;
    237   }
    238 
    239   if ($_SERVER['SERVER_PORT'] == 443) {
    240     return TRUE;
    241   }
    242 
    243   return FALSE;
    244 }
    245 
    246 /**
    247230 * Returns the full URL for the current page request.
    248231 */
    249232function liveperson_request_url() {
    250   if (liveperson_is_https()) {
     233  if (is_ssl()) {
    251234    $protocol = 'https';
    252235  }
     
    290273  }
    291274
     275  $patterns = liveperson_path_visibility_patterns();
     276
    292277  // Ensure the widget isn't disabled on the front page.
    293   $patterns = liveperson_path_visibility_patterns();
    294 
    295   if (is_front_page() && liveperson_match_path('<front>', liveperson_path_visibility_patterns())) {
     278  if (is_front_page() && liveperson_match_path('<front>', $patterns)) {
    296279    return;
    297280  }
    298281
    299282  // Otherwise ensure the widget shouldn't be disabled on the current page.
    300   if (liveperson_match_path(liveperson_request_path(), $patterns)) {
     283  if (!is_front_page() && liveperson_match_path(liveperson_request_path(), $patterns)) {
    301284    return;
    302285  }
  • liveperson/trunk/readme.txt

    r1404066 r1466268  
    11=== LivePerson LiveChat + Messaging ===
    2 Contributors: liveperson, rszrama
     2Contributors: liveperson, rszrama, nullvariable
    33Tags: chat, chat plugin, customer help, customer service chat, customer service software, customer support, ecommerce chat, help desk, help desk software, live chat, livechat, live chat button,live chat plugin, live chat software, live chat solution, live chat support, live chat tool, live chat widget, live support, live support button, livechat, liveperson, live person, liveengage, online support, online sales, messaging, marketing, loyalty, analytics, SMS, facebook integration, wordpress live chat, wordpress chat
    44Requires at least: 4.4.2
    5 Tested up to: 4.5
    6 Stable tag: 1.0.0
     5Tested up to: 4.5.3
     6Stable tag: 1.0.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9393
    9494== Changelog ==
     95= 1.0.1 =
     96* Minor bug fix on path matching
     97* Rely on WordPress to provide SSL status
     98* Tested with version 4.5.3
    9599= 1.0.0 =
    96100* Initial release of the LivePerson plugin
Note: See TracChangeset for help on using the changeset viewer.