@@ -298,12 +298,10 @@ public function get_reset_message( $message = '' ) {
298
298
/*-----------------------------------------------------------------------------------*/
299
299
public function admin_includes () {
300
300
// Includes Font Face Lib
301
- global $ {$ this ->plugin_prefix .'fonts_face ' };
302
- $ {$ this ->plugin_prefix .'fonts_face ' } = new Fonts_Face ();
301
+ $ GLOBALS [$ this ->plugin_prefix .'fonts_face ' ] = new Fonts_Face ();
303
302
304
303
// Includes Uploader Lib
305
- global $ {$ this ->plugin_prefix .'uploader ' };
306
- $ {$ this ->plugin_prefix .'uploader ' } = new Uploader ();
304
+ $ GLOBALS [$ this ->plugin_prefix .'uploader ' ] = new Uploader ();
307
305
}
308
306
309
307
/*-----------------------------------------------------------------------------------*/
@@ -425,9 +423,7 @@ public function get_settings( $options, $option_name = '' ) {
425
423
$ new_settings = array (); $ new_single_setting = '' ; // :)
426
424
427
425
// 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
-
426
+ if ( trim ( $ option_name ) != '' ) {
431
427
$ default_settings = $ this ->get_settings_default ( $ options , $ option_name );
432
428
433
429
$ current_settings = get_option ( $ option_name );
@@ -437,7 +433,7 @@ public function get_settings( $options, $option_name = '' ) {
437
433
$ current_settings = array_map ( array ( $ this , 'admin_stripslashes ' ), $ current_settings );
438
434
$ current_settings = apply_filters ( $ this ->plugin_name . '_ ' . $ option_name . '_get_settings ' , $ current_settings );
439
435
440
- $ $ option_name = $ current_settings ;
436
+ $ GLOBALS [ $ option_name] = $ current_settings ;
441
437
442
438
}
443
439
@@ -465,7 +461,6 @@ public function get_settings( $options, $option_name = '' ) {
465
461
}
466
462
467
463
if ( trim ( $ option_name ) == '' || $ value ['separate_option ' ] != false ) {
468
- global $ {$ id_attribute };
469
464
470
465
$ current_setting = get_option ( $ id_attribute , $ value ['default ' ] );
471
466
@@ -496,7 +491,7 @@ public function get_settings( $options, $option_name = '' ) {
496
491
497
492
$ current_setting = apply_filters ( $ this ->plugin_name . '_ ' . $ id_attribute . '_get_setting ' , $ current_setting );
498
493
499
- $ $ id_attribute = $ current_setting ;
494
+ $ GLOBALS [ $ id_attribute] = $ current_setting ;
500
495
}
501
496
}
502
497
@@ -515,7 +510,7 @@ public function get_settings( $options, $option_name = '' ) {
515
510
516
511
if ( trim ( $ option_name ) != '' ) {
517
512
update_option ( $ option_name , $ new_settings );
518
- $ $ option_name = $ new_settings ;
513
+ $ GLOBALS [ $ option_name] = $ new_settings ;
519
514
}
520
515
521
516
foreach ( $ options as $ value ) {
@@ -543,7 +538,7 @@ public function get_settings( $options, $option_name = '' ) {
543
538
544
539
if ( trim ( $ option_name ) == '' || $ value ['separate_option ' ] != false ) {
545
540
update_option ( $ id_attribute , $ new_single_setting );
546
- $ $ id_attribute = $ new_single_setting ;
541
+ $ GLOBALS [ $ id_attribute] = $ new_single_setting ;
547
542
}
548
543
}
549
544
}
@@ -1360,7 +1355,7 @@ public function settings_get_option( $option_name, $default = '' ) {
1360
1355
*/
1361
1356
1362
1357
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 ;
1358
+ global $ current_subtab ;
1364
1359
1365
1360
$ new_settings = array (); $ new_single_setting = '' ; // :)
1366
1361
$ admin_message = '' ;
@@ -1890,7 +1885,7 @@ class="a3rev-ui-onoff_checkbox a3rev-ui-onoff_google_api_key_enable"
1890
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>
1891
1886
<div class="a3rev-ui-google-api-key-inside
1892
1887
<?php
1893
- if ( $ { $ this ->plugin_prefix .'fonts_face ' } ->is_valid_google_api_key () ) {
1888
+ if ( $ GLOBALS [ $ this ->plugin_prefix .'fonts_face ' ] ->is_valid_google_api_key () ) {
1894
1889
echo 'a3rev-ui-google-valid-key ' ;
1895
1890
} elseif ( '' != $ google_api_key ) {
1896
1891
echo 'a3rev-ui-google-unvalid-key ' ;
@@ -2712,7 +2707,7 @@ class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-face
2712
2707
>
2713
2708
<optgroup label="<?php _e ( '-- Default Fonts -- ' , 'a3-lazy-load ' ); ?> ">
2714
2709
<?php
2715
- foreach ( $ { $ this ->plugin_prefix .'fonts_face ' } ->get_default_fonts () as $ val => $ text ) {
2710
+ foreach ( $ GLOBALS [ $ this ->plugin_prefix .'fonts_face ' ] ->get_default_fonts () as $ val => $ text ) {
2716
2711
?>
2717
2712
<option value="<?php echo esc_attr ( $ val ); ?> " <?php
2718
2713
selected ( esc_attr ( $ val ), esc_attr ( $ face ) );
@@ -2723,7 +2718,7 @@ class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-face
2723
2718
</optgroup>
2724
2719
<optgroup label="<?php _e ( '-- Google Fonts -- ' , 'a3-lazy-load ' ); ?> ">
2725
2720
<?php
2726
- foreach ( $ { $ this ->plugin_prefix .'fonts_face ' } ->get_google_fonts () as $ font ) {
2721
+ foreach ( $ GLOBALS [ $ this ->plugin_prefix .'fonts_face ' ] ->get_google_fonts () as $ font ) {
2727
2722
?>
2728
2723
<option value="<?php echo esc_attr ( $ font ['name ' ] ); ?> " <?php
2729
2724
selected ( esc_attr ( $ font ['name ' ] ), esc_attr ( $ face ) );
@@ -3396,7 +3391,7 @@ class="a3rev-ui-slider"
3396
3391
</th>
3397
3392
<td class="forminp forminp-<?php echo esc_attr ( sanitize_title ( $ value ['type ' ] ) ); ?> ">
3398
3393
<?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 );?>
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 );?>
3400
3395
</td>
3401
3396
</tr><?php
3402
3397
0 commit comments