Plugin Directory

Changeset 1970139


Ignore:
Timestamp:
11/06/2018 10:29:50 PM (7 years ago)
Author:
emfluencekc
Message:

Plugin v2.7.1. Minor performance improvement, bug fix.

Location:
wp-emfluence/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-emfluence/trunk/emfluence.php

    r1955191 r1970139  
    55Description: Easily add forms to your website for contacts to add or update their details in your emfluence Marketing Platform account.
    66Author: emfluence Digital Marketing
    7 Version: 2.7
     7Version: 2.7.1
    88Author URI: https://www.emfluence.com
    99Text Domain: emfl_form
  • wp-emfluence/trunk/readme.txt

    r1955191 r1970139  
    33Requires at least: 4.0
    44Tested up to: 4.9.8
    5 Stable tag: 2.7
     5Stable tag: 2.7.1
    66Requires PHP: 5.6
    77Contributors: emfluencekc, mightyturtle
     
    5757== Changelog ==
    5858
     59= 2.7.1 =
     60* Performance improvement for admins.
     61* Bug fix for some object caches.
     62
    5963= 2.7 =
    6064* Add setting to redirect after submission success.
  • wp-emfluence/trunk/widget.php

    r1955191 r1970139  
    2020  static function get_groups(){
    2121    static $groups = NULL;
    22 
    2322    if( $groups !== NULL ) return $groups;
    2423
     24    require_once 'libraries/emfl_platform_api/response_objects/group.class.inc';
    2525    $cached = wp_cache_get('emfluence:groups');
    26     if(!empty($cached)) $groups = $cached;
    27 
    28     if( $groups !== NULL ) return $groups;
     26    $cache_valid = TRUE;
     27    if(is_array($cached)) foreach($cached as $group) {
     28      $has_required_properties = property_exists($group, 'groupName') && property_exists($group, 'groupID');
     29      if(!$has_required_properties) $cache_valid = FALSE;
     30    }
     31    if($cache_valid && !empty($cached)) $groups = $cached;
     32    if( NULL !== $groups ) return $groups;
    2933
    3034    $options = get_option('emfluence_global');
     
    982986    }
    983987    $api = emfluence_get_api($options['api_key']);
    984     $ping = $api->ping();
     988    static $ping = NULL;
     989    if(NULL === $ping) $ping = $api->ping();
    985990    if( !$ping || !$ping->success ){
    986991      $output = '<h3>' . __('Authentication Failed') . '</h3>';
Note: See TracChangeset for help on using the changeset viewer.