a3 Lazy Load - Version 2.3.1

Version Description

This maintenance release contains various PHP code updates to resolve PHP warnings and depreciations in PHP 7.0 to 7.4

Download this release

Release Info

Developer a3rev
Plugin Icon 128x128 a3 Lazy Load
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3.0 to 2.3.1

a3-lazy-load.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: a3 Lazy Load
4
  Description: Speed up your site and enhance frontend user's visual experience in PC's, Tablets and mobile with a3 Lazy Load.
5
- Version: 2.3.0
6
  Author: a3rev Software
7
  Author URI: https://a3rev.com/
8
  Requires at least: 4.9
@@ -33,7 +33,7 @@ define('A3_LAZY_LOAD_IMAGES_URL', A3_LAZY_LOAD_URL . '/assets/images');
33
 
34
  define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
35
  define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
36
- define( 'A3_LAZY_VERSION', '2.3.0' );
37
  define( 'A3_LAZY_LOAD_G_FONTS', false );
38
 
39
  use \A3Rev\LazyLoad\FrameWork;
@@ -44,17 +44,14 @@ if ( version_compare( PHP_VERSION, '5.6.0', '>=' ) ) {
44
  /**
45
  * Plugin Framework init
46
  */
47
- global ${A3_LAZY_LOAD_PREFIX.'admin_interface'};
48
- ${A3_LAZY_LOAD_PREFIX.'admin_interface'} = new FrameWork\Admin_Interface();
49
 
50
  global $a3_lazy_load_settings_page;
51
  $a3_lazy_load_settings_page = new FrameWork\Pages\Settings();
52
 
53
- global ${A3_LAZY_LOAD_PREFIX.'admin_init'};
54
- ${A3_LAZY_LOAD_PREFIX.'admin_init'} = new FrameWork\Admin_Init();
55
 
56
- global ${A3_LAZY_LOAD_PREFIX.'less'};
57
- ${A3_LAZY_LOAD_PREFIX.'less'} = new FrameWork\Less_Sass();
58
 
59
  // End - Plugin Framework init
60
 
2
  /*
3
  Plugin Name: a3 Lazy Load
4
  Description: Speed up your site and enhance frontend user's visual experience in PC's, Tablets and mobile with a3 Lazy Load.
5
+ Version: 2.3.1
6
  Author: a3rev Software
7
  Author URI: https://a3rev.com/
8
  Requires at least: 4.9
33
 
34
  define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
35
  define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
36
+ define( 'A3_LAZY_VERSION', '2.3.1' );
37
  define( 'A3_LAZY_LOAD_G_FONTS', false );
38
 
39
  use \A3Rev\LazyLoad\FrameWork;
44
  /**
45
  * Plugin Framework init
46
  */
47
+ $GLOBALS[A3_LAZY_LOAD_PREFIX.'admin_interface'] = new FrameWork\Admin_Interface();
 
48
 
49
  global $a3_lazy_load_settings_page;
50
  $a3_lazy_load_settings_page = new FrameWork\Pages\Settings();
51
 
52
+ $GLOBALS[A3_LAZY_LOAD_PREFIX.'admin_init'] = new FrameWork\Admin_Init();
 
53
 
54
+ $GLOBALS[A3_LAZY_LOAD_PREFIX.'less'] = new FrameWork\Less_Sass();
 
55
 
56
  // End - Plugin Framework init
57
 
admin/a3-lazy-load-admin.php CHANGED
@@ -3,8 +3,7 @@
3
  function a3_lazy_load_activated(){
4
  update_option('a3_lazy_load_version', A3_LAZY_VERSION );
5
 
6
- global ${A3_LAZY_LOAD_PREFIX.'admin_init'};
7
- delete_metadata( 'user', 0, ${A3_LAZY_LOAD_PREFIX.'admin_init'}->plugin_name . '-' . 'plugin_framework_global_box' . '-' . 'opened', '', true );
8
 
9
  update_option('a3_lazy_load_just_installed', true);
10
  }
@@ -18,8 +17,7 @@ function a3_lazy_load_init() {
18
  delete_option( 'a3_lazy_load_just_installed' );
19
 
20
  // Set Settings Default from Admin Init
21
- global ${A3_LAZY_LOAD_PREFIX.'admin_init'};
22
- ${A3_LAZY_LOAD_PREFIX.'admin_init'}->set_default_settings();
23
  }
24
 
25
  a3_lazy_load_plugin_textdomain();
@@ -27,11 +25,10 @@ function a3_lazy_load_init() {
27
  a3_lazy_load_upgrade_plugin();
28
  }
29
 
30
- global ${A3_LAZY_LOAD_PREFIX.'admin_init'};
31
- ${A3_LAZY_LOAD_PREFIX.'admin_init'}->init();
32
 
33
  // Add upgrade notice to Dashboard pages
34
- add_filter( ${A3_LAZY_LOAD_PREFIX.'admin_init'}->plugin_name . '_plugin_extension_boxes', array( '\A3Rev\LazyLoad\Hook_Filter', 'plugin_extension_box' ) );
35
 
36
  // Add language
37
  add_action('init', 'a3_lazy_load_init', 105);
3
  function a3_lazy_load_activated(){
4
  update_option('a3_lazy_load_version', A3_LAZY_VERSION );
5
 
6
+ delete_metadata( 'user', 0, $GLOBALS[A3_LAZY_LOAD_PREFIX.'admin_init']->plugin_name . '-' . 'plugin_framework_global_box' . '-' . 'opened', '', true );
 
7
 
8
  update_option('a3_lazy_load_just_installed', true);
9
  }
17
  delete_option( 'a3_lazy_load_just_installed' );
18
 
19
  // Set Settings Default from Admin Init
20
+ $GLOBALS[A3_LAZY_LOAD_PREFIX.'admin_init']->set_default_settings();
 
21
  }
22
 
23
  a3_lazy_load_plugin_textdomain();
25
  a3_lazy_load_upgrade_plugin();
26
  }
27
 
28
+ $GLOBALS[A3_LAZY_LOAD_PREFIX.'admin_init']->init();
 
29
 
30
  // Add upgrade notice to Dashboard pages
31
+ add_filter( $GLOBALS[A3_LAZY_LOAD_PREFIX.'admin_init']->plugin_name . '_plugin_extension_boxes', array( '\A3Rev\LazyLoad\Hook_Filter', 'plugin_extension_box' ) );
32
 
33
  // Add language
34
  add_action('init', 'a3_lazy_load_init', 105);
admin/admin-interface.php CHANGED
@@ -298,12 +298,10 @@ class Admin_Interface extends Admin_UI
298
  /*-----------------------------------------------------------------------------------*/
299
  public function admin_includes() {
300
  // Includes Font Face Lib
301
- global ${$this->plugin_prefix.'fonts_face'};
302
- ${$this->plugin_prefix.'fonts_face'} = new Fonts_Face();
303
 
304
  // Includes Uploader Lib
305
- global ${$this->plugin_prefix.'uploader'};
306
- ${$this->plugin_prefix.'uploader'} = new Uploader();
307
  }
308
 
309
  /*-----------------------------------------------------------------------------------*/
@@ -425,9 +423,7 @@ class Admin_Interface extends Admin_UI
425
  $new_settings = array(); $new_single_setting = ''; // :)
426
 
427
  // Get settings for option values is an array and it's in single option name for all settings
428
- if ( trim( $option_name ) != '' ) {
429
- global ${$option_name};
430
-
431
  $default_settings = $this->get_settings_default( $options, $option_name );
432
 
433
  $current_settings = get_option( $option_name );
@@ -437,7 +433,7 @@ class Admin_Interface extends Admin_UI
437
  $current_settings = array_map( array( $this, 'admin_stripslashes' ), $current_settings );
438
  $current_settings = apply_filters( $this->plugin_name . '_' . $option_name . '_get_settings' , $current_settings );
439
 
440
- $$option_name = $current_settings;
441
 
442
  }
443
 
@@ -465,7 +461,6 @@ class Admin_Interface extends Admin_UI
465
  }
466
 
467
  if ( trim( $option_name ) == '' || $value['separate_option'] != false ) {
468
- global ${$id_attribute};
469
 
470
  $current_setting = get_option( $id_attribute, $value['default'] );
471
 
@@ -496,7 +491,7 @@ class Admin_Interface extends Admin_UI
496
 
497
  $current_setting = apply_filters( $this->plugin_name . '_' . $id_attribute . '_get_setting' , $current_setting );
498
 
499
- $$id_attribute = $current_setting;
500
  }
501
  }
502
 
@@ -515,7 +510,7 @@ class Admin_Interface extends Admin_UI
515
 
516
  if ( trim( $option_name ) != '' ) {
517
  update_option( $option_name, $new_settings );
518
- $$option_name = $new_settings;
519
  }
520
 
521
  foreach ( $options as $value ) {
@@ -543,7 +538,7 @@ class Admin_Interface extends Admin_UI
543
 
544
  if ( trim( $option_name ) == '' || $value['separate_option'] != false ) {
545
  update_option( $id_attribute, $new_single_setting );
546
- $$id_attribute = $new_single_setting;
547
  }
548
  }
549
  }
@@ -1360,7 +1355,7 @@ class Admin_Interface extends Admin_UI
1360
  */
1361
 
1362
  public function admin_forms( $options, $form_key, $option_name = '', $form_messages = array() ) {
1363
- global ${$this->plugin_prefix.'fonts_face'}, ${$this->plugin_prefix.'uploader'}, $current_subtab;
1364
 
1365
  $new_settings = array(); $new_single_setting = ''; // :)
1366
  $admin_message = '';
@@ -1890,7 +1885,7 @@ class Admin_Interface extends Admin_UI
1890
  <div class="a3rev-ui-google-api-key-description"><?php echo sprintf( __( "Enter your existing Google Fonts API Key below. Don't have a key? Visit <a href='%s' target='_blank'>Google Developer API</a> to create a key", 'a3-lazy-load' ), 'https://developers.google.com/fonts/docs/developer_api#APIKey' ); ?></div>
1891
  <div class="a3rev-ui-google-api-key-inside
1892
  <?php
1893
- if ( ${$this->plugin_prefix.'fonts_face'}->is_valid_google_api_key() ) {
1894
  echo 'a3rev-ui-google-valid-key';
1895
  } elseif ( '' != $google_api_key ) {
1896
  echo 'a3rev-ui-google-unvalid-key';
@@ -2712,7 +2707,7 @@ class Admin_Interface extends Admin_UI
2712
  >
2713
  <optgroup label="<?php _e( '-- Default Fonts --', 'a3-lazy-load' ); ?>">
2714
  <?php
2715
- foreach ( ${$this->plugin_prefix.'fonts_face'}->get_default_fonts() as $val => $text ) {
2716
  ?>
2717
  <option value="<?php echo esc_attr( $val ); ?>" <?php
2718
  selected( esc_attr( $val ), esc_attr( $face ) );
@@ -2723,7 +2718,7 @@ class Admin_Interface extends Admin_UI
2723
  </optgroup>
2724
  <optgroup label="<?php _e( '-- Google Fonts --', 'a3-lazy-load' ); ?>">
2725
  <?php
2726
- foreach ( ${$this->plugin_prefix.'fonts_face'}->get_google_fonts() as $font ) {
2727
  ?>
2728
  <option value="<?php echo esc_attr( $font['name'] ); ?>" <?php
2729
  selected( esc_attr( $font['name'] ), esc_attr( $face ) );
@@ -3396,7 +3391,7 @@ class Admin_Interface extends Admin_UI
3396
  </th>
3397
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3398
  <?php echo $description; ?>
3399
- <?php echo ${$this->plugin_prefix.'uploader'}->upload_input( $name_attribute, $id_attribute, $option_value, $attachment_id, $value['default'], $value['name'], $class, esc_attr( $value['css'] ) , '', $strip_methods );?>
3400
  </td>
3401
  </tr><?php
3402
 
298
  /*-----------------------------------------------------------------------------------*/
299
  public function admin_includes() {
300
  // Includes Font Face Lib
301
+ $GLOBALS[$this->plugin_prefix.'fonts_face'] = new Fonts_Face();
 
302
 
303
  // Includes Uploader Lib
304
+ $GLOBALS[$this->plugin_prefix.'uploader'] = new Uploader();
 
305
  }
306
 
307
  /*-----------------------------------------------------------------------------------*/
423
  $new_settings = array(); $new_single_setting = ''; // :)
424
 
425
  // Get settings for option values is an array and it's in single option name for all settings
426
+ if ( trim( $option_name ) != '' ) {
 
 
427
  $default_settings = $this->get_settings_default( $options, $option_name );
428
 
429
  $current_settings = get_option( $option_name );
433
  $current_settings = array_map( array( $this, 'admin_stripslashes' ), $current_settings );
434
  $current_settings = apply_filters( $this->plugin_name . '_' . $option_name . '_get_settings' , $current_settings );
435
 
436
+ $GLOBALS[$option_name] = $current_settings;
437
 
438
  }
439
 
461
  }
462
 
463
  if ( trim( $option_name ) == '' || $value['separate_option'] != false ) {
 
464
 
465
  $current_setting = get_option( $id_attribute, $value['default'] );
466
 
491
 
492
  $current_setting = apply_filters( $this->plugin_name . '_' . $id_attribute . '_get_setting' , $current_setting );
493
 
494
+ $GLOBALS[$id_attribute] = $current_setting;
495
  }
496
  }
497
 
510
 
511
  if ( trim( $option_name ) != '' ) {
512
  update_option( $option_name, $new_settings );
513
+ $GLOBALS[$option_name] = $new_settings;
514
  }
515
 
516
  foreach ( $options as $value ) {
538
 
539
  if ( trim( $option_name ) == '' || $value['separate_option'] != false ) {
540
  update_option( $id_attribute, $new_single_setting );
541
+ $GLOBALS[$id_attribute] = $new_single_setting;
542
  }
543
  }
544
  }
1355
  */
1356
 
1357
  public function admin_forms( $options, $form_key, $option_name = '', $form_messages = array() ) {
1358
+ global $current_subtab;
1359
 
1360
  $new_settings = array(); $new_single_setting = ''; // :)
1361
  $admin_message = '';
1885
  <div class="a3rev-ui-google-api-key-description"><?php echo sprintf( __( "Enter your existing Google Fonts API Key below. Don't have a key? Visit <a href='%s' target='_blank'>Google Developer API</a> to create a key", 'a3-lazy-load' ), 'https://developers.google.com/fonts/docs/developer_api#APIKey' ); ?></div>
1886
  <div class="a3rev-ui-google-api-key-inside
1887
  <?php
1888
+ if ( $GLOBALS[$this->plugin_prefix.'fonts_face']->is_valid_google_api_key() ) {
1889
  echo 'a3rev-ui-google-valid-key';
1890
  } elseif ( '' != $google_api_key ) {
1891
  echo 'a3rev-ui-google-unvalid-key';
2707
  >
2708
  <optgroup label="<?php _e( '-- Default Fonts --', 'a3-lazy-load' ); ?>">
2709
  <?php
2710
+ foreach ( $GLOBALS[$this->plugin_prefix.'fonts_face']->get_default_fonts() as $val => $text ) {
2711
  ?>
2712
  <option value="<?php echo esc_attr( $val ); ?>" <?php
2713
  selected( esc_attr( $val ), esc_attr( $face ) );
2718
  </optgroup>
2719
  <optgroup label="<?php _e( '-- Google Fonts --', 'a3-lazy-load' ); ?>">
2720
  <?php
2721
+ foreach ( $GLOBALS[$this->plugin_prefix.'fonts_face']->get_google_fonts() as $font ) {
2722
  ?>
2723
  <option value="<?php echo esc_attr( $font['name'] ); ?>" <?php
2724
  selected( esc_attr( $font['name'] ), esc_attr( $face ) );
3391
  </th>
3392
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3393
  <?php echo $description; ?>
3394
+ <?php echo $GLOBALS[$this->plugin_prefix.'uploader']->upload_input( $name_attribute, $id_attribute, $option_value, $attachment_id, $value['default'], $value['name'], $class, esc_attr( $value['css'] ) , '', $strip_methods );?>
3395
  </td>
3396
  </tr><?php
3397
 
admin/admin-pages/admin-settings-page.php CHANGED
@@ -105,13 +105,12 @@ class Settings extends FrameWork\Admin_UI
105
  /* Show Settings Page */
106
  /*-----------------------------------------------------------------------------------*/
107
  public function admin_settings_page() {
108
- global ${$this->plugin_prefix.'admin_init'};
109
 
110
- ${$this->plugin_prefix.'admin_init'}->admin_settings_page( $this->page_data() );
111
 
112
  //$my_page_data = $this->page_data();
113
  //$my_page_data = array_values( $my_page_data );
114
- //${$this->plugin_prefix.'admin_init'}->admin_settings_page( $my_page_data[1] );
115
  }
116
 
117
  /*-----------------------------------------------------------------------------------*/
105
  /* Show Settings Page */
106
  /*-----------------------------------------------------------------------------------*/
107
  public function admin_settings_page() {
 
108
 
109
+ $GLOBALS[$this->plugin_prefix.'admin_init']->admin_settings_page( $this->page_data() );
110
 
111
  //$my_page_data = $this->page_data();
112
  //$my_page_data = array_values( $my_page_data );
113
+ //$GLOBALS[$this->plugin_prefix.'admin_init']->admin_settings_page( $my_page_data[1] );
114
  }
115
 
116
  /*-----------------------------------------------------------------------------------*/
admin/admin-ui.php CHANGED
@@ -144,7 +144,7 @@ class Admin_UI
144
  // Check it is a valid request
145
  if ( ! is_wp_error( $respone_api ) ) {
146
 
147
- $json_string = get_magic_quotes_gpc() ? stripslashes( $respone_api['body'] ) : $respone_api['body'];
148
  $response_map = json_decode( $json_string, true );
149
 
150
  // Make sure that the valid response from google is not an error message
144
  // Check it is a valid request
145
  if ( ! is_wp_error( $respone_api ) ) {
146
 
147
+ $json_string = version_compare( PHP_VERSION, '7.4', '>=' ) || get_magic_quotes_gpc() ? stripslashes( $respone_api['body'] ) : $respone_api['body'];
148
  $response_map = json_decode( $json_string, true );
149
 
150
  // Make sure that the valid response from google is not an error message
admin/includes/fonts_face.php CHANGED
@@ -451,7 +451,7 @@ class Fonts_Face extends Admin_UI
451
  // Check it is a valid request
452
  if ( ! is_wp_error( $respone_api ) ) {
453
 
454
- $json_string = get_magic_quotes_gpc() ? stripslashes( $respone_api['body'] ) : $respone_api['body'];
455
  $response_fonts = json_decode( $json_string, true );
456
 
457
  // Make sure that the valid response from google is not an error message
@@ -470,7 +470,7 @@ class Fonts_Face extends Admin_UI
470
  $response = wp_remote_get( $this->admin_plugin_url() . '/assets/webfonts/webfonts.json', array( 'timeout' => 120 ) );
471
  $webfonts = wp_remote_retrieve_body( $response );
472
  if ( ! empty( $webfonts ) ) {
473
- $json_string = get_magic_quotes_gpc() ? stripslashes( $webfonts ) : $webfonts;
474
  $response_fonts = json_decode( $json_string, true );
475
  }
476
  }
@@ -524,7 +524,7 @@ class Fonts_Face extends Admin_UI
524
  $response = wp_remote_get( $this->admin_plugin_url() . '/assets/webfonts/webfonts.json', array( 'timeout' => 120 ) );
525
  $webfonts = wp_remote_retrieve_body( $response );
526
  if ( ! empty( $webfonts ) ) {
527
- $json_string = get_magic_quotes_gpc() ? stripslashes( $webfonts ) : $webfonts;
528
  $response_fonts = json_decode( $json_string, true );
529
  }
530
  }
451
  // Check it is a valid request
452
  if ( ! is_wp_error( $respone_api ) ) {
453
 
454
+ $json_string = version_compare( PHP_VERSION, '7.4', '>=' ) || get_magic_quotes_gpc() ? stripslashes( $respone_api['body'] ) : $respone_api['body'];
455
  $response_fonts = json_decode( $json_string, true );
456
 
457
  // Make sure that the valid response from google is not an error message
470
  $response = wp_remote_get( $this->admin_plugin_url() . '/assets/webfonts/webfonts.json', array( 'timeout' => 120 ) );
471
  $webfonts = wp_remote_retrieve_body( $response );
472
  if ( ! empty( $webfonts ) ) {
473
+ $json_string = version_compare( PHP_VERSION, '7.4', '>=' ) || get_magic_quotes_gpc() ? stripslashes( $webfonts ) : $webfonts;
474
  $response_fonts = json_decode( $json_string, true );
475
  }
476
  }
524
  $response = wp_remote_get( $this->admin_plugin_url() . '/assets/webfonts/webfonts.json', array( 'timeout' => 120 ) );
525
  $webfonts = wp_remote_retrieve_body( $response );
526
  if ( ! empty( $webfonts ) ) {
527
+ $json_string = version_compare( PHP_VERSION, '7.4', '>=' ) || get_magic_quotes_gpc() ? stripslashes( $webfonts ) : $webfonts;
528
  $response_fonts = json_decode( $json_string, true );
529
  }
530
  }
admin/less/lib/lessc.inc.php CHANGED
@@ -634,7 +634,7 @@ class a3_lessc {
634
 
635
  // check for a rest
636
  $last = end($args);
637
- if ($last[0] == "rest") {
638
  $rest = array_slice($orderedValues, count($args) - 1);
639
  $this->set($last[1], $this->reduce(array("list", " ", $rest)));
640
  }
@@ -719,7 +719,7 @@ class a3_lessc {
719
  if ($suffix !== null &&
720
  $subProp[0] == "assign" &&
721
  is_string($subProp[1]) &&
722
- $subProp[1]{0} != $this->vPrefix)
723
  {
724
  $subProp[2] = array(
725
  'list', ' ',
@@ -1770,7 +1770,7 @@ class a3_lessc {
1770
  $this->pushEnv();
1771
  $parser = new a3_lessc_parser($this, __METHOD__);
1772
  foreach ($args as $name => $strValue) {
1773
- if ($name{0} != '@') $name = '@'.$name;
1774
  $parser->count = 0;
1775
  $parser->buffer = (string)$strValue;
1776
  if (!$parser->propertyValue($value)) {
@@ -2427,7 +2427,7 @@ class a3_lessc_parser {
2427
  $hidden = true;
2428
  if (!isset($block->args)) {
2429
  foreach ($block->tags as $tag) {
2430
- if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
2431
  $hidden = false;
2432
  break;
2433
  }
@@ -2481,7 +2481,7 @@ class a3_lessc_parser {
2481
  protected function fixTags($tags) {
2482
  // move @ tags out of variable namespace
2483
  foreach ($tags as &$tag) {
2484
- if ($tag{0} == $this->lessc->vPrefix)
2485
  $tag[0] = $this->lessc->mPrefix;
2486
  }
2487
  return $tags;
634
 
635
  // check for a rest
636
  $last = end($args);
637
+ if ( ! is_bool( $last ) && $last[0] == "rest") {
638
  $rest = array_slice($orderedValues, count($args) - 1);
639
  $this->set($last[1], $this->reduce(array("list", " ", $rest)));
640
  }
719
  if ($suffix !== null &&
720
  $subProp[0] == "assign" &&
721
  is_string($subProp[1]) &&
722
+ $subProp[1][0] != $this->vPrefix)
723
  {
724
  $subProp[2] = array(
725
  'list', ' ',
1770
  $this->pushEnv();
1771
  $parser = new a3_lessc_parser($this, __METHOD__);
1772
  foreach ($args as $name => $strValue) {
1773
+ if ($name[0] != '@') $name = '@'.$name;
1774
  $parser->count = 0;
1775
  $parser->buffer = (string)$strValue;
1776
  if (!$parser->propertyValue($value)) {
2427
  $hidden = true;
2428
  if (!isset($block->args)) {
2429
  foreach ($block->tags as $tag) {
2430
+ if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
2431
  $hidden = false;
2432
  break;
2433
  }
2481
  protected function fixTags($tags) {
2482
  // move @ tags out of variable namespace
2483
  foreach ($tags as &$tag) {
2484
+ if ($tag[0] == $this->lessc->vPrefix)
2485
  $tag[0] = $this->lessc->mPrefix;
2486
  }
2487
  return $tags;
admin/settings/template-settings/global-settings.php CHANGED
@@ -114,9 +114,7 @@ class Global_Panel extends FrameWork\Admin_UI
114
  /* Set default settings with function called from Admin Interface */
115
  /*-----------------------------------------------------------------------------------*/
116
  public function set_default_settings() {
117
- global ${$this->plugin_prefix.'admin_interface'};
118
-
119
- ${$this->plugin_prefix.'admin_interface'}->reset_settings( $this->form_fields, $this->option_name, false );
120
  }
121
 
122
  /*-----------------------------------------------------------------------------------*/
@@ -136,9 +134,7 @@ class Global_Panel extends FrameWork\Admin_UI
136
  /* Get settings with function called from Admin Interface */
137
  /*-----------------------------------------------------------------------------------*/
138
  public function get_settings() {
139
- global ${$this->plugin_prefix.'admin_interface'};
140
-
141
- ${$this->plugin_prefix.'admin_interface'}->get_settings( $this->form_fields, $this->option_name );
142
  }
143
 
144
  /**
@@ -182,10 +178,9 @@ class Global_Panel extends FrameWork\Admin_UI
182
  /* Call the form from Admin Interface
183
  /*-----------------------------------------------------------------------------------*/
184
  public function settings_form() {
185
- global ${$this->plugin_prefix.'admin_interface'};
186
 
187
  $output = '';
188
- $output .= ${$this->plugin_prefix.'admin_interface'}->admin_forms( $this->form_fields, $this->form_key, $this->option_name, $this->form_messages );
189
 
190
  return $output;
191
  }
114
  /* Set default settings with function called from Admin Interface */
115
  /*-----------------------------------------------------------------------------------*/
116
  public function set_default_settings() {
117
+ $GLOBALS[$this->plugin_prefix.'admin_interface']->reset_settings( $this->form_fields, $this->option_name, false );
 
 
118
  }
119
 
120
  /*-----------------------------------------------------------------------------------*/
134
  /* Get settings with function called from Admin Interface */
135
  /*-----------------------------------------------------------------------------------*/
136
  public function get_settings() {
137
+ $GLOBALS[$this->plugin_prefix.'admin_interface']->get_settings( $this->form_fields, $this->option_name );
 
 
138
  }
139
 
140
  /**
178
  /* Call the form from Admin Interface
179
  /*-----------------------------------------------------------------------------------*/
180
  public function settings_form() {
 
181
 
182
  $output = '';
183
+ $output .= $GLOBALS[$this->plugin_prefix.'admin_interface']->admin_forms( $this->form_fields, $this->form_key, $this->option_name, $this->form_messages );
184
 
185
  return $output;
186
  }
admin/tabs/template-settings/global-settings-tab.php CHANGED
@@ -123,9 +123,7 @@ class Global_Settings extends FrameWork\Admin_UI
123
  $a3_lazy_load_global_settings_panel->settings_form();
124
  $this->plugin_extension_end();
125
 
126
- //global ${$this->plugin_prefix.'admin_init'};
127
-
128
- //${$this->plugin_prefix.'admin_init'}->admin_settings_tab( $this->parent_page, $this->tab_data() );
129
 
130
  }
131
  }
123
  $a3_lazy_load_global_settings_panel->settings_form();
124
  $this->plugin_extension_end();
125
 
126
+ //$GLOBALS[$this->plugin_prefix.'admin_init']->admin_settings_tab( $this->parent_page, $this->tab_data() );
 
 
127
 
128
  }
129
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: a3rev, a3rev Software, nguyencongtuan
3
  Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
4
  Requires at least: 4.9
5
  Tested up to: 5.3.2
6
- Stable tag: 2.3.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -204,6 +204,13 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
204
 
205
  == Changelog ==
206
 
 
 
 
 
 
 
 
207
  = 2.3.0 - 2020/02/25 =
208
  * This feature release adds support for horizontal scroll images plus a bug fix for compatibility with Revolution Slider
209
  * Feature - Add support for lazy loading images in a container that have horizontal scroll
@@ -480,6 +487,9 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
480
 
481
  == Upgrade Notice ==
482
 
 
 
 
483
  = 2.3.0 =
484
  This feature release adds support for horizontal scroll images plus a bug fix for compatibility with Revolution Slider
485
 
3
  Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
4
  Requires at least: 4.9
5
  Tested up to: 5.3.2
6
+ Stable tag: 2.3.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
204
 
205
  == Changelog ==
206
 
207
+ = 2.3.1 - 2020/02/29 =
208
+ * This maintenance release contains various PHP code updates to resolve PHP warnings and depreciations in PHP 7.0 to 7.4
209
+ * Fix - Update global ${$this- to $GLOBALS[$this to resolve 7.0+ PHP warnings
210
+ * Fix - Update global ${$option} to $GLOBALS[$option] to resolve 7.0+ PHP warnings
211
+ * Fix - Update less PHP lib that use square brackets [] instead of curly braces {} for Array , depreciated in PHP 7.4
212
+ * Fix - Validate for do not use get_magic_quotes_gpc function for PHP 7.4
213
+
214
  = 2.3.0 - 2020/02/25 =
215
  * This feature release adds support for horizontal scroll images plus a bug fix for compatibility with Revolution Slider
216
  * Feature - Add support for lazy loading images in a container that have horizontal scroll
487
 
488
  == Upgrade Notice ==
489
 
490
+ = 2.3.1 =
491
+ This maintenance release contains various PHP code updates to resolve PHP warnings and depreciations in PHP 7.0 to 7.4
492
+
493
  = 2.3.0 =
494
  This feature release adds support for horizontal scroll images plus a bug fix for compatibility with Revolution Slider
495