a3 Lazy Load - Version 2.5.0

Version Description

This release is for compatibility with WordPress major version 6.0 plus includes various tweaks to harden the plugins security

Download this release

Release Info

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

Code changes from version 2.4.9 to 2.5.0

a3-lazy-load.php CHANGED
@@ -2,11 +2,11 @@
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.4.9
6
  Author: a3rev Software
7
  Author URI: https://a3rev.com/
8
  Requires at least: 5.6
9
- Tested up to: 5.9
10
  Text Domain: a3-lazy-load
11
  Domain Path: /languages
12
  License: GPLv2 or later
@@ -31,7 +31,7 @@ define('A3_LAZY_LOAD_IMAGES_URL', A3_LAZY_LOAD_URL . '/assets/images');
31
 
32
  define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
33
  define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
34
- define( 'A3_LAZY_VERSION', '2.4.9' );
35
  define( 'A3_LAZY_LOAD_G_FONTS', false );
36
 
37
  use \A3Rev\LazyLoad\FrameWork;
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.5.0
6
  Author: a3rev Software
7
  Author URI: https://a3rev.com/
8
  Requires at least: 5.6
9
+ Tested up to: 6.0
10
  Text Domain: a3-lazy-load
11
  Domain Path: /languages
12
  License: GPLv2 or later
31
 
32
  define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
33
  define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
34
+ define( 'A3_LAZY_VERSION', '2.5.0' );
35
  define( 'A3_LAZY_LOAD_G_FONTS', false );
36
 
37
  use \A3Rev\LazyLoad\FrameWork;
admin/admin-init.php CHANGED
@@ -199,7 +199,7 @@ class Admin_Init extends Admin_UI
199
  <?php
200
  if ( $page_data !== false) {
201
  echo esc_html( $page_data['page_title'] );
202
- if ( isset( $page_data['view_doc'] ) ) echo $page_data['view_doc'];
203
  }
204
  ?>
205
  </h1>
@@ -281,7 +281,7 @@ class Admin_Init extends Admin_UI
281
  $separate_text = '';
282
  $activated_first_subtab = false;
283
  foreach ( $subtabs as $subtab ) {
284
- echo '<li>' . $separate_text . '<a href="#' . trim( esc_attr( $subtab['name'] ) ) . '" class="';
285
  if ( $current_subtab == '' && $activated_first_subtab === false ) {
286
  echo 'current';
287
  $activated_first_subtab = true;
199
  <?php
200
  if ( $page_data !== false) {
201
  echo esc_html( $page_data['page_title'] );
202
+ if ( isset( $page_data['view_doc'] ) ) echo wp_kses_post( $page_data['view_doc'] );
203
  }
204
  ?>
205
  </h1>
281
  $separate_text = '';
282
  $activated_first_subtab = false;
283
  foreach ( $subtabs as $subtab ) {
284
+ echo '<li>' . esc_html( $separate_text ) . '<a href="#' . trim( esc_attr( $subtab['name'] ) ) . '" class="';
285
  if ( $current_subtab == '' && $activated_first_subtab === false ) {
286
  echo 'current';
287
  $activated_first_subtab = true;
admin/admin-interface.php CHANGED
@@ -180,11 +180,11 @@ class Admin_Interface extends Admin_UI
180
  public function a3_admin_ui_event() {
181
  check_ajax_referer( $this->plugin_name. '_a3_admin_ui_event', 'security' );
182
  if ( isset( $_REQUEST['type'] ) ) {
183
- switch ( trim( $_REQUEST['type'] ) ) {
184
  case 'open_close_panel_box':
185
- $form_key = sanitize_key( $_REQUEST['form_key'] );
186
- $box_id = sanitize_text_field( $_REQUEST['box_id'] );
187
- $is_open = $_REQUEST['is_open'];
188
 
189
  $user_id = get_current_user_id();
190
  $opened_box = get_user_meta( $user_id, $this->plugin_name . '-' . trim( $form_key ), true );
@@ -200,7 +200,7 @@ class Admin_Interface extends Admin_UI
200
  break;
201
 
202
  case 'check_new_version':
203
- $transient_name = sanitize_key( $_REQUEST['transient_name'] );
204
  delete_transient( $transient_name );
205
 
206
  $new_version = '';
@@ -237,8 +237,8 @@ class Admin_Interface extends Admin_UI
237
  break;
238
 
239
  case 'validate_google_api_key':
240
- $g_key = sanitize_text_field( $_REQUEST['g_key'] );
241
- $g_key_type = sanitize_text_field( $_REQUEST['g_key_type'] );
242
 
243
  $is_valid = false;
244
  if ( ! empty( $g_key ) ) {
@@ -596,10 +596,19 @@ class Admin_Interface extends Admin_UI
596
  /*-----------------------------------------------------------------------------------*/
597
 
598
  public function save_settings( $options, $option_name = '' ) {
 
 
 
 
 
 
599
 
600
  if ( !is_array( $options ) || count( $options ) < 1 ) return;
601
 
602
  if ( empty( $_POST ) ) return false;
 
 
 
603
 
604
  $update_options = array();
605
  $update_separate_options = array();
@@ -716,13 +725,13 @@ class Admin_Interface extends Admin_UI
716
  if ( trim( $option_name ) == '' || $value['separate_option'] != false ) {
717
  if ( $key != false ) {
718
  if ( isset( $_POST[ $id_attribute ][ $key ] ) ) {
719
- $option_value = sanitize_text_field( $_POST[ $id_attribute ][ $key ] );
720
  } else {
721
  $option_value = '';
722
  }
723
  } else {
724
  if ( isset( $_POST[ $id_attribute ] ) ) {
725
- $option_value = sanitize_text_field( $_POST[ $id_attribute ] );
726
  } else {
727
  $option_value = '';
728
  }
@@ -731,13 +740,13 @@ class Admin_Interface extends Admin_UI
731
  } else {
732
  if ( $key != false ) {
733
  if ( isset( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
734
- $option_value = sanitize_text_field( $_POST[ $option_name ][ $id_attribute ][ $key ] );
735
  } else {
736
  $option_value = '';
737
  }
738
  } else {
739
  if ( isset( $_POST[ $option_name ][ $id_attribute ] ) ) {
740
- $option_value = sanitize_text_field( $_POST[ $option_name ][ $id_attribute ] );
741
  } else {
742
  $option_value = '';
743
  }
@@ -774,30 +783,30 @@ class Admin_Interface extends Admin_UI
774
 
775
  // sanitize content for wp_editor type
776
  if ( 'wp_editor' === $value['type'] ) {
777
- $option_value = wp_kses_post_deep( $_POST[ $id_attribute ][ $key ] );
778
  } elseif ( 'email' === $value['type'] ) {
779
  if ( is_array( $_POST[ $id_attribute ][ $key ] ) ) {
780
- $option_value = array_map( 'sanitize_email', $_POST[ $id_attribute ][ $key ] );
781
  } else {
782
- $option_value = sanitize_email( $_POST[ $id_attribute ][ $key ] );
783
  }
784
  } elseif ( 'color' === $value['type'] ) {
785
  if ( is_array( $_POST[ $id_attribute ][ $key ] ) ) {
786
- $option_value = array_map( 'sanitize_hex_color', $_POST[ $id_attribute ][ $key ] );
787
  } else {
788
- $option_value = sanitize_hex_color( $_POST[ $id_attribute ][ $key ] );
789
  }
790
  } elseif ( 'textarea' === $value['type'] ) {
791
  if ( is_array( $_POST[ $id_attribute ][ $key ] ) ) {
792
- $option_value = array_map( 'sanitize_textarea_field', $_POST[ $id_attribute ][ $key ] );
793
  } else {
794
- $option_value = sanitize_textarea_field( $_POST[ $id_attribute ][ $key ] );
795
  }
796
  } else {
797
  if ( is_array( $_POST[ $id_attribute ][ $key ] ) ) {
798
- $option_value = array_map( 'sanitize_text_field', $_POST[ $id_attribute ][ $key ] );
799
  } else {
800
- $option_value = sanitize_text_field( $_POST[ $id_attribute ][ $key ] );
801
  }
802
  }
803
 
@@ -809,30 +818,30 @@ class Admin_Interface extends Admin_UI
809
 
810
  // sanitize content for wp_editor type
811
  if ( 'wp_editor' === $value['type'] ) {
812
- $option_value = wp_kses_post_deep( $_POST[ $id_attribute ] );
813
  } elseif ( 'email' === $value['type'] ) {
814
  if ( is_array( $_POST[ $id_attribute ] ) ) {
815
- $option_value = array_map( 'sanitize_email', $_POST[ $id_attribute ] );
816
  } else {
817
- $option_value = sanitize_email( $_POST[ $id_attribute ] );
818
  }
819
  } elseif ( 'color' === $value['type'] ) {
820
  if ( is_array( $_POST[ $id_attribute ] ) ) {
821
- $option_value = array_map( 'sanitize_hex_color', $_POST[ $id_attribute ] );
822
  } else {
823
- $option_value = sanitize_hex_color( $_POST[ $id_attribute ] );
824
  }
825
  } elseif ( 'textarea' === $value['type'] ) {
826
  if ( is_array( $_POST[ $id_attribute ] ) ) {
827
- $option_value = array_map( 'sanitize_textarea_field', $_POST[ $id_attribute ] );
828
  } else {
829
- $option_value = sanitize_textarea_field( $_POST[ $id_attribute ] );
830
  }
831
  } else {
832
  if ( is_array( $_POST[ $id_attribute ] ) ) {
833
- $option_value = array_map( 'sanitize_text_field', $_POST[ $id_attribute ] );
834
  } else {
835
- $option_value = sanitize_text_field( $_POST[ $id_attribute ] );
836
  }
837
  }
838
 
@@ -847,30 +856,30 @@ class Admin_Interface extends Admin_UI
847
 
848
  // sanitize content for wp_editor type
849
  if ( 'wp_editor' === $value['type'] ) {
850
- $option_value = wp_kses_post_deep( $_POST[ $option_name ][ $id_attribute ][ $key ] );
851
  } elseif ( 'email' === $value['type'] ) {
852
  if ( is_array( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
853
- $option_value = array_map( 'sanitize_email', $_POST[ $option_name ][ $id_attribute ][ $key ] );
854
  } else {
855
- $option_value = sanitize_email( $_POST[ $option_name ][ $id_attribute ][ $key ] );
856
  }
857
  } elseif ( 'color' === $value['type'] ) {
858
  if ( is_array( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
859
- $option_value = array_map( 'sanitize_hex_color', $_POST[ $option_name ][ $id_attribute ][ $key ] );
860
  } else {
861
- $option_value = sanitize_hex_color( $_POST[ $option_name ][ $id_attribute ][ $key ] );
862
  }
863
  } elseif ( 'textarea' === $value['type'] ) {
864
  if ( is_array( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
865
- $option_value = array_map( 'sanitize_textarea_field', $_POST[ $option_name ][ $id_attribute ][ $key ] );
866
  } else {
867
- $option_value = sanitize_textarea_field( $_POST[ $option_name ][ $id_attribute ][ $key ] );
868
  }
869
  } else {
870
  if ( is_array( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
871
- $option_value = array_map( 'sanitize_text_field', $_POST[ $option_name ][ $id_attribute ][ $key ] );
872
  } else {
873
- $option_value = sanitize_text_field( $_POST[ $option_name ][ $id_attribute ][ $key ] );
874
  }
875
  }
876
 
@@ -882,30 +891,30 @@ class Admin_Interface extends Admin_UI
882
 
883
  // sanitize content for wp_editor type
884
  if ( 'wp_editor' === $value['type'] ) {
885
- $option_value = wp_kses_post_deep( $_POST[ $option_name ][ $id_attribute ] );
886
  } elseif ( 'email' === $value['type'] ) {
887
  if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) {
888
- $option_value = array_map( 'sanitize_email', $_POST[ $option_name ][ $id_attribute ] );
889
  } else {
890
- $option_value = sanitize_email( $_POST[ $option_name ][ $id_attribute ] );
891
  }
892
  } elseif ( 'color' === $value['type'] ) {
893
  if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) {
894
- $option_value = array_map( 'sanitize_hex_color', $_POST[ $option_name ][ $id_attribute ] );
895
  } else {
896
- $option_value = sanitize_hex_color( $_POST[ $option_name ][ $id_attribute ] );
897
  }
898
  } elseif ( 'textarea' === $value['type'] ) {
899
  if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) {
900
- $option_value = array_map( 'sanitize_textarea_field', $_POST[ $option_name ][ $id_attribute ] );
901
  } else {
902
- $option_value = sanitize_textarea_field( $_POST[ $option_name ][ $id_attribute ] );
903
  }
904
  } else {
905
  if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) {
906
- $option_value = array_map( 'sanitize_text_field', $_POST[ $option_name ][ $id_attribute ] );
907
  } else {
908
- $option_value = sanitize_text_field( $_POST[ $option_name ][ $id_attribute ] );
909
  }
910
  }
911
 
@@ -1441,7 +1450,7 @@ class Admin_Interface extends Admin_UI
1441
  if ( !is_array( $options ) || count( $options ) < 1 ) return '';
1442
  ?>
1443
 
1444
- <?php echo $admin_message; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
1445
  <div class="a3rev_panel_container" style="visibility:hidden; height:0; overflow:hidden;" >
1446
  <form action="" method="post">
1447
  <?php do_action( $this->plugin_name . '-' . trim( $form_key ) . '_settings_start' ); ?>
@@ -1481,11 +1490,7 @@ class Admin_Interface extends Admin_UI
1481
  if ( ! isset( $value['separate_option'] ) ) $value['separate_option'] = false;
1482
 
1483
  // Custom attribute handling
1484
- $custom_attributes = array();
1485
-
1486
- if ( ! empty( $value['custom_attributes'] ) && is_array( $value['custom_attributes'] ) )
1487
- foreach ( $value['custom_attributes'] as $attribute => $attribute_value )
1488
- $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
1489
 
1490
  // Description handling
1491
  if ( $value['desc_tip'] === true ) {
@@ -1597,7 +1602,7 @@ class Admin_Interface extends Admin_UI
1597
 
1598
  if ( $tip && in_array( $value['type'], array( 'checkbox' ) ) ) {
1599
 
1600
- $tip = '<p class="description">' . esc_html( $tip ) . '</p>';
1601
 
1602
  } elseif ( $tip ) {
1603
 
@@ -1846,7 +1851,7 @@ class Admin_Interface extends Admin_UI
1846
  $box_handle_class .= 'box_active';
1847
  }
1848
 
1849
- if ( isset( $_GET['box_open'] ) && sanitize_text_field( $_GET['box_open'] ) == $value['id'] ) {
1850
  $opened_class = 'box_open';
1851
  }
1852
 
@@ -1854,9 +1859,9 @@ class Admin_Interface extends Admin_UI
1854
  echo '<div id="'. esc_attr( $value['id'] ) . '" class="a3rev_panel_box '. esc_attr( $value['class'] ) .'" style="'. esc_attr( $value['css'] ) .'">' . "\n\n";
1855
 
1856
  // open box handle
1857
- echo '<div data-form-key="'. esc_attr( trim( $form_key ) ) .'" data-box-id="'. esc_attr( $heading_box_id ) .'" class="a3rev_panel_box_handle ' . $box_handle_class .'" >' . "\n\n";
1858
 
1859
- echo ( ! empty( $value['name'] ) ) ? '<h3 class="a3-plugin-ui-panel-box '. $toggle_box_class . ' ' . $opened_class . '">'. esc_html( $value['name'] ) .' '. wptexturize( $view_doc ) .'</h3>' : '';
1860
 
1861
  if ( stristr( $value['class'], 'pro_feature_fields' ) !== false && ! empty( $value['id'] ) ) $this->upgrade_top_message( true, sanitize_title( $value['id'] ) );
1862
  elseif ( stristr( $value['class'], 'pro_feature_fields' ) !== false ) $this->upgrade_top_message( true );
@@ -1865,7 +1870,7 @@ class Admin_Interface extends Admin_UI
1865
  echo '</div>' . "\n\n";
1866
 
1867
  // open box inside
1868
- echo '<div id="'. esc_attr( $value['id'] ) . '_box_inside" class="a3rev_panel_box_inside '.$opened_class.'" >' . "\n\n";
1869
 
1870
  echo '<div class="a3rev_panel_inner">' . "\n\n";
1871
 
@@ -1882,12 +1887,12 @@ class Admin_Interface extends Admin_UI
1882
  if ( stristr( $value['class'], 'pro_feature_fields' ) !== false && ! empty( $value['id'] ) ) $this->upgrade_top_message( true, sanitize_title( $value['id'] ) );
1883
  elseif ( stristr( $value['class'], 'pro_feature_fields' ) !== false ) $this->upgrade_top_message( true );
1884
 
1885
- echo ( ! empty( $value['name'] ) ) ? '<h3>'. esc_html( $value['name'] ) .' '. wptexturize( $view_doc ) .'</h3>' : '';
1886
  }
1887
 
1888
  if ( ! empty( $value['desc'] ) ) {
1889
  echo '<div class="a3rev_panel_box_description" >' . "\n\n";
1890
- echo wpautop( wptexturize( $value['desc'] ) );
1891
  echo '</div>' . "\n\n";
1892
  }
1893
 
@@ -1908,8 +1913,8 @@ class Admin_Interface extends Admin_UI
1908
 
1909
  ?><tr valign="top">
1910
  <th scope="row" class="titledesc">
1911
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
1912
- <label for="<?php echo esc_attr( $this->google_api_key_option ); ?>"><?php echo __( 'Google Fonts API', 'a3-lazy-load' ); ?></label>
1913
  </th>
1914
  <td class="forminp forminp-onoff_checkbox forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
1915
  <input
@@ -1921,13 +1926,13 @@ class Admin_Interface extends Admin_UI
1921
  type="checkbox"
1922
  value="1"
1923
  <?php checked( $google_api_key_enable, 1 ); ?>
1924
- /> <span class="description" style="margin-left:5px;"><?php echo __( 'ON to connect to Google Fonts API and have auto font updates direct from Google.', 'a3-lazy-load' ); ?></span>
1925
 
1926
  <div>&nbsp;</div>
1927
  <div class="a3rev-ui-google-api-key-container" style="<?php if( 1 != $google_api_key_enable ) { echo 'display: none;'; } ?>">
1928
  <?php
1929
  if ( ! empty( $description ) ) {
1930
- echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */
1931
  } else {
1932
  ?>
1933
  <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" ), 'https://developers.google.com/fonts/docs/developer_api#APIKey' ); ?></div>
@@ -1949,16 +1954,16 @@ class Admin_Interface extends Admin_UI
1949
  style="<?php echo esc_attr( $value['css'] ); ?>"
1950
  value="<?php echo esc_attr( $google_api_key ); ?>"
1951
  class="a3rev-ui-text a3rev-ui-google-api-key a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
1952
- placeholder="<?php echo __( 'Google Fonts API Key' ); ?>"
1953
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
1954
  />
1955
  <button
1956
  name="<?php echo esc_attr( $this->google_api_key_option ); ?>_validate_bt"
1957
  id="<?php echo esc_attr( $this->google_api_key_option ); ?>_validate_bt"
1958
  type="button"
1959
- class="a3rev-ui-google-api-key-validate-button a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-button"><?php echo __( 'Validate' ); ?></button>
1960
- <p class="a3rev-ui-google-valid-key-message"><?php echo __( 'Your Google API Key is valid and automatic font updates are enabled.' ); ?></p>
1961
- <p class="a3rev-ui-google-unvalid-key-message"><?php echo __( 'Please enter a valid Google API Key.' ); ?></p>
1962
  </div>
1963
  </div>
1964
  </td>
@@ -1976,8 +1981,8 @@ class Admin_Interface extends Admin_UI
1976
 
1977
  ?><tr valign="top">
1978
  <th scope="row" class="titledesc">
1979
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
1980
- <label for="<?php echo esc_attr( $this->google_map_api_key_option ); ?>"><?php echo __( 'Google Maps API', 'a3-lazy-load' ); ?></label>
1981
  </th>
1982
  <td class="forminp forminp-onoff_checkbox forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
1983
  <input
@@ -1989,13 +1994,13 @@ class Admin_Interface extends Admin_UI
1989
  type="checkbox"
1990
  value="1"
1991
  <?php checked( $google_map_api_key_enable, 1 ); ?>
1992
- /> <span class="description" style="margin-left:5px;"><?php echo __( 'Switch ON to connect to Google Maps API', 'a3-lazy-load' ); ?></span>
1993
 
1994
  <div>&nbsp;</div>
1995
  <div class="a3rev-ui-google-api-key-container" style="<?php if( 1 != $google_map_api_key_enable ) { echo 'display: none;'; } ?>">
1996
  <?php
1997
  if ( ! empty( $description ) ) {
1998
- echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */
1999
  } else {
2000
  ?>
2001
  <div class="a3rev-ui-google-api-key-description" style="margin-bottom:5px;"><?php echo sprintf( __( "Enter your Google Maps API Key and save changes, or go to <a href='%s' target='_blank'>Google Maps API</a> to create a new key. The key must have the Geocoding API, Maps Embed API and Maps JavaScript API as a minimum." ), 'https://developers.google.com/maps/documentation/javascript/get-api-key' ); ?></div>
@@ -2016,17 +2021,17 @@ class Admin_Interface extends Admin_UI
2016
  type="text"
2017
  style="<?php echo esc_attr( $value['css'] ); ?>"
2018
  value="<?php echo esc_attr( $google_map_api_key ); ?>"
2019
- class="a3rev-ui-text a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2020
- placeholder="<?php echo __( 'Google Map API Key', 'a3-lazy-load' ); ?>"
2021
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2022
  />
2023
  <button
2024
  name="<?php echo esc_attr( $this->google_map_api_key_option ); ?>_validate_bt"
2025
  id="<?php echo esc_attr( $this->google_map_api_key_option ); ?>_validate_bt"
2026
  type="button"
2027
- class="a3rev-ui-google-api-key-validate-button a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-button"><?php echo __( 'Validate' ); ?></button>
2028
- <p class="a3rev-ui-google-valid-key-message"><?php echo __( 'Your Google API Key is valid.' ); ?></p>
2029
- <p class="a3rev-ui-google-unvalid-key-message"><?php echo __( 'Please enter a valid Google API Key.' ); ?></p>
2030
  </div>
2031
  </div>
2032
  </td>
@@ -2058,7 +2063,7 @@ class Admin_Interface extends Admin_UI
2058
 
2059
  ?><tr valign="top">
2060
  <td colspan="2">
2061
- <p class="a3rev-ui-check-version-message <?php echo esc_attr( $check_version_class ); ?>"><?php echo $version_message; ?></p>
2062
  </td>
2063
  </tr><?php
2064
 
@@ -2074,19 +2079,19 @@ class Admin_Interface extends Admin_UI
2074
  $submit_data = json_encode( $value['submit_data'] );
2075
 
2076
  ?><tr valign="top">
2077
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
2078
  <td class="forminp">
2079
 
2080
  <div class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-control">
2081
 
2082
  <button
2083
- name="<?php echo $name_attribute; // XSS ok ?>"
2084
  id="<?php echo esc_attr( $id_attribute ); ?>"
2085
  data-submit_data="<?php echo esc_attr( $submit_data ); ?>"
2086
  type="button"
2087
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-button <?php echo esc_attr( $value['class'] ); ?>"
2088
  style="<?php echo esc_attr( $value['css'] ); ?>"
2089
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2090
  ><?php echo esc_html( $button_name ); ?></button>
2091
  <span class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-successed"><?php echo esc_html( $successed_text ); ?></span>
2092
  <span class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-errors"><?php echo esc_html( $errors_text ); ?></span>
@@ -2099,7 +2104,7 @@ class Admin_Interface extends Admin_UI
2099
  </div>
2100
 
2101
  </div>
2102
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2103
  </td>
2104
  </tr><?php
2105
 
@@ -2147,20 +2152,20 @@ class Admin_Interface extends Admin_UI
2147
  $multi_ajax = json_encode( $multi_ajax );
2148
 
2149
  ?><tr valign="top">
2150
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
2151
  <td class="forminp">
2152
 
2153
  <div class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-control">
2154
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2155
  <button
2156
  data-resubmit="<?php echo $resubmit ? 1 : 0 ; ?>"
2157
- name="<?php echo $name_attribute; // XSS ok ?>"
2158
  id="<?php echo esc_attr( $id_attribute ); ?>"
2159
  data-multi_ajax="<?php echo esc_attr( $multi_ajax ); ?>"
2160
  type="button"
2161
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-button <?php echo esc_attr( $value['class'] ); ?>"
2162
  style="<?php echo esc_attr( $value['css'] ); ?>"
2163
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2164
  <?php if ( ! empty( $confirm_message ) ) { ?>
2165
  data-confirm_message="<?php echo esc_attr( $confirm_message ); ?>"
2166
  <?php } ?>
@@ -2245,8 +2250,8 @@ class Admin_Interface extends Admin_UI
2245
 
2246
  ?><tr valign="top">
2247
  <th scope="row" class="titledesc">
2248
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2249
- <label for="<?php echo esc_attr( $this->toggle_box_open_option ); ?>"><?php echo __( 'Open Box Display', 'a3-lazy-load' ); ?></label>
2250
  </th>
2251
  <td class="forminp forminp-onoff_checkbox forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2252
  <input
@@ -2258,8 +2263,8 @@ class Admin_Interface extends Admin_UI
2258
  type="checkbox"
2259
  value="1"
2260
  <?php checked( $option_value, 1 ); ?>
2261
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2262
- /> <span class="description" style="margin-left:5px;"><?php echo __( 'ON and each admin panel setting box OPEN | CLOSED position are saved each time changes are SAVED.', 'a3-lazy-load' ); ?></span>
2263
  </td>
2264
  </tr><?php
2265
  break;
@@ -2274,20 +2279,20 @@ class Admin_Interface extends Admin_UI
2274
 
2275
  ?><tr valign="top">
2276
  <th scope="row" class="titledesc">
2277
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2278
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2279
  </th>
2280
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2281
  <input
2282
- name="<?php echo $name_attribute; // XSS ok ?>"
2283
  id="<?php echo esc_attr( $id_attribute ); ?>"
2284
  type="<?php echo esc_attr( $type ); ?>"
2285
  style="<?php echo esc_attr( $value['css'] ); ?>"
2286
  value="<?php echo esc_attr( $option_value ); ?>"
2287
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2288
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
2289
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2290
- /> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2291
  </td>
2292
  </tr><?php
2293
  break;
@@ -2296,23 +2301,22 @@ class Admin_Interface extends Admin_UI
2296
  case 'color' :
2297
 
2298
  if ( trim( $value['default'] ) == '' ) $value['default'] = '#515151';
2299
- $default_color = ' data-default-color="' . esc_attr( $value['default'] ) . '"';
2300
  if ( '' == trim( $option_value ) ) $option_value = 'transparent';
2301
 
2302
  ?><tr valign="top">
2303
  <th scope="row" class="titledesc">
2304
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2305
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2306
  </th>
2307
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2308
  <input
2309
- name="<?php echo $name_attribute; // XSS ok ?>"
2310
  id="<?php echo esc_attr( $id_attribute ); ?>"
2311
  type="text"
2312
  value="<?php echo esc_attr( $option_value ); ?>"
2313
  class="a3rev-color-picker"
2314
- <?php echo $default_color // XSS ok; ?>
2315
- /> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2316
  </td>
2317
  </tr><?php
2318
 
@@ -2325,37 +2329,36 @@ class Admin_Interface extends Admin_UI
2325
  $enable = $option_value['enable'];
2326
 
2327
  if ( trim( $value['default']['color'] ) == '' ) $value['default']['color'] = '#515151';
2328
- $default_color = ' data-default-color="' . esc_attr( $value['default']['color'] ) . '"';
2329
 
2330
  $color = $option_value['color'];
2331
  if ( '' == trim( $color ) ) $color = 'transparent';
2332
 
2333
  ?><tr valign="top">
2334
  <th scope="row" class="titledesc">
2335
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2336
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2337
  </th>
2338
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2339
  <input
2340
- name="<?php echo $name_attribute; ?>[enable]"
2341
  id="<?php echo esc_attr( $id_attribute ); ?>"
2342
  class="a3rev-ui-bg_color-enable a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
2343
- checked_label="<?php _e( 'ON', 'a3-lazy-load' ); ?>"
2344
- unchecked_label="<?php _e( 'OFF', 'a3-lazy-load' ); ?>"
2345
  type="checkbox"
2346
  value="1"
2347
  <?php checked( 1, $enable ); ?>
2348
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2349
- /> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2350
  <div style="clear:both;"></div>
2351
  <div class="a3rev-ui-bg_color-enable-container">
2352
  <input
2353
- name="<?php echo $name_attribute; ?>[color]"
2354
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
2355
  type="text"
2356
  value="<?php echo esc_attr( $color ); ?>"
2357
  class="a3rev-color-picker"
2358
- <?php echo $default_color; // XSS ok ?>
2359
  />
2360
  </div>
2361
  </td>
@@ -2368,19 +2371,19 @@ class Admin_Interface extends Admin_UI
2368
 
2369
  ?><tr valign="top">
2370
  <th scope="row" class="titledesc">
2371
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2372
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2373
  </th>
2374
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2375
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2376
 
2377
  <textarea
2378
- name="<?php echo $name_attribute; // XSS ok ?>"
2379
  id="<?php echo esc_attr( $id_attribute ); ?>"
2380
  style="<?php echo esc_attr( $value['css'] ); ?>"
2381
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2382
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
2383
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2384
  ><?php echo esc_textarea( $option_value ); ?></textarea>
2385
  </td>
2386
  </tr><?php
@@ -2404,17 +2407,17 @@ class Admin_Interface extends Admin_UI
2404
 
2405
  ?><tr valign="top">
2406
  <th scope="row" class="titledesc">
2407
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2408
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2409
  </th>
2410
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2411
  <select
2412
- name="<?php echo $name_attribute; // XSS ok ?><?php if ( $value['type'] == 'multiselect' ) echo '[]'; ?>"
2413
  id="<?php echo esc_attr( $id_attribute ); ?>"
2414
  style="<?php echo esc_attr( $value['css'] ); ?>"
2415
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2416
  data-placeholder="<?php echo esc_html( $value['placeholder'] ); ?>"
2417
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2418
  <?php if ( $value['type'] == 'multiselect' ) echo 'multiple="multiple"'; ?>
2419
  <?php if ( $is_ajax ) {
2420
  echo 'options_url="'.esc_url( $value['options_url'] ).'"';
@@ -2459,7 +2462,7 @@ class Admin_Interface extends Admin_UI
2459
  }
2460
  }
2461
  ?>
2462
- </select> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2463
  </td>
2464
  </tr><?php
2465
  break;
@@ -2471,12 +2474,12 @@ class Admin_Interface extends Admin_UI
2471
 
2472
  ?><tr valign="top">
2473
  <th scope="row" class="titledesc">
2474
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2475
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2476
  </th>
2477
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2478
  <fieldset>
2479
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2480
  <ul>
2481
  <?php
2482
  if ( is_array( $value['options'] ) && count( $value['options'] ) > 0 ) {
@@ -2484,14 +2487,14 @@ class Admin_Interface extends Admin_UI
2484
  ?>
2485
  <li>
2486
  <label><input
2487
- name="<?php echo $name_attribute; // XSS ok ?>"
2488
  value="<?php echo esc_attr( $val ); ?>"
2489
  type="radio"
2490
  style="<?php echo esc_attr( $value['css'] ); ?>"
2491
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2492
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2493
  <?php checked( $val, $option_value ); ?>
2494
- /> <span class="description" style="margin-left:5px;"><?php echo esc_html( $text ); ?></span></label>
2495
  </li>
2496
  <?php
2497
  }
@@ -2510,12 +2513,12 @@ class Admin_Interface extends Admin_UI
2510
 
2511
  ?><tr valign="top">
2512
  <th scope="row" class="titledesc">
2513
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2514
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2515
  </th>
2516
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2517
  <fieldset>
2518
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2519
  <ul>
2520
  <?php
2521
  if ( is_array( $value['onoff_options'] ) && count( $value['onoff_options'] ) > 0 ) {
@@ -2527,7 +2530,7 @@ class Admin_Interface extends Admin_UI
2527
  ?>
2528
  <li>
2529
  <input
2530
- name="<?php echo $name_attribute; // XSS ok ?>"
2531
  <?php if ( $i_option['val'] == $option_value ) echo ' checkbox-disabled="true" ' ; ?>
2532
  class="a3rev-ui-onoff_radio <?php echo esc_attr( $value['class'] ); ?>"
2533
  checked_label="<?php echo esc_html( $i_option['checked_label'] ); ?>"
@@ -2535,8 +2538,8 @@ class Admin_Interface extends Admin_UI
2535
  type="radio"
2536
  value="<?php echo esc_attr( stripslashes( $i_option['val'] ) ); ?>"
2537
  <?php checked( esc_attr( stripslashes( $i_option['val'] ) ), $option_value ); ?>
2538
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2539
- /> <span class="description" style="margin-left:5px;"><?php echo wptexturize( $i_option['text'] ); ?></span>
2540
  </li>
2541
  <?php
2542
  }
@@ -2563,7 +2566,7 @@ class Admin_Interface extends Admin_UI
2563
  if ( $value['show_if_checked'] == 'option' ) echo 'show_options_if_checked';
2564
  ?>">
2565
  <th scope="row" class="titledesc">
2566
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2567
  </th>
2568
  <td class="forminp forminp-checkbox">
2569
  <fieldset>
@@ -2579,17 +2582,17 @@ class Admin_Interface extends Admin_UI
2579
  }
2580
 
2581
  ?>
2582
- <legend class="screen-reader-text"><span><?php echo esc_html( $value['name'] ); ?></span></legend>
2583
 
2584
  <label for="<?php echo esc_attr( $id_attribute ); ?>">
2585
  <input
2586
- name="<?php echo $name_attribute; // XSS ok ?>"
2587
  id="<?php echo esc_attr( $id_attribute ); ?>"
2588
  type="checkbox"
2589
  value="<?php echo esc_attr( stripslashes( $value['checked_value'] ) ); ?>"
2590
  <?php checked( $option_value, esc_attr( stripslashes( $value['checked_value'] ) ) ); ?>
2591
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2592
- /> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></label> <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2593
  <?php
2594
 
2595
  if ( ! isset( $value['checkboxgroup'] ) || ( isset( $value['checkboxgroup'] ) && $value['checkboxgroup'] == 'end' ) ) {
@@ -2615,12 +2618,12 @@ class Admin_Interface extends Admin_UI
2615
 
2616
  ?><tr valign="top">
2617
  <th scope="row" class="titledesc">
2618
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2619
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2620
  </th>
2621
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2622
  <input
2623
- name="<?php echo $name_attribute; // XSS ok ?>"
2624
  id="<?php echo esc_attr( $id_attribute ); ?>"
2625
  class="a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
2626
  checked_label="<?php echo esc_html( $value['checked_label'] ); ?>"
@@ -2628,8 +2631,8 @@ class Admin_Interface extends Admin_UI
2628
  type="checkbox"
2629
  value="<?php echo esc_attr( stripslashes( $value['checked_value'] ) ); ?>"
2630
  <?php checked( $option_value, esc_attr( stripslashes( $value['checked_value'] ) ) ); ?>
2631
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2632
- /> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2633
  </td>
2634
  </tr><?php
2635
 
@@ -2644,12 +2647,12 @@ class Admin_Interface extends Admin_UI
2644
 
2645
  ?><tr valign="top">
2646
  <th scope="row" class="titledesc">
2647
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2648
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
2649
  </th>
2650
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2651
  <input
2652
- name="<?php echo $name_attribute; // XSS ok ?>"
2653
  id="<?php echo esc_attr( $id_attribute ); ?>"
2654
  class="a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
2655
  checked_label="<?php echo esc_html( $value['checked_label'] ); ?>"
@@ -2657,8 +2660,8 @@ class Admin_Interface extends Admin_UI
2657
  type="checkbox"
2658
  value="<?php echo esc_attr( stripslashes( $value['checked_value'] ) ); ?>"
2659
  <?php checked( $option_value, esc_attr( stripslashes( $value['checked_value'] ) ) ); ?>
2660
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2661
- /> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2662
  </td>
2663
  </tr><?php
2664
 
@@ -2669,17 +2672,16 @@ class Admin_Interface extends Admin_UI
2669
 
2670
  $width = $option_value['width'];
2671
  $height = $option_value['height'];
2672
- $crop = checked( 1, $option_value['crop'], false );
2673
 
2674
  ?><tr valign="top">
2675
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
2676
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2677
 
2678
- <label><?php _e( 'Width', 'a3-lazy-load' ); ?> <input name="<?php echo $name_attribute; ?>[width]" id="<?php echo esc_attr( $id_attribute ); ?>-width" type="text" class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-width" value="<?php echo esc_attr( $width ); ?>" /></label>
2679
 
2680
- <label><?php _e( 'Height', 'a3-lazy-load' ); ?> <input name="<?php echo $name_attribute; ?>[height]" id="<?php echo esc_attr( $id_attribute ); ?>-height" type="text" class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-height" value="<?php echo esc_attr( $height ); ?>" /></label>
2681
 
2682
- <label><?php _e( 'Hard Crop', 'a3-lazy-load' ); ?> <input name="<?php echo $name_attribute; ?>[crop]" id="<?php echo esc_attr( $id_attribute ); ?>-crop" type="checkbox" class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-crop" <?php echo $crop; ?> /></label>
2683
 
2684
  </td>
2685
  </tr><?php
@@ -2707,9 +2709,9 @@ class Admin_Interface extends Admin_UI
2707
  $args = wp_parse_args( $value['args'], $args );
2708
 
2709
  ?><tr valign="top">
2710
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
2711
  <td class="forminp">
2712
- <?php echo str_replace(' id=', " data-placeholder='" . esc_html( $value['placeholder'] ) . "' style='" . esc_attr( $value['css'] ) . "' class='" . esc_attr( $value['class'] ) . "' id=", wp_dropdown_pages( $args ) ); ?> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2713
  </td>
2714
  </tr><?php
2715
  break;
@@ -2717,8 +2719,6 @@ class Admin_Interface extends Admin_UI
2717
  // Font Control
2718
  case 'typography':
2719
 
2720
- $default_color = ' data-default-color="' . esc_attr( $value['default']['color'] ) . '"';
2721
-
2722
  if ( ! isset( $option_value['line_height'] ) ) {
2723
  $option_value['line_height'] = '1.4em';
2724
  }
@@ -2730,13 +2730,13 @@ class Admin_Interface extends Admin_UI
2730
  $color = $option_value['color'];
2731
 
2732
  ?><tr valign="top">
2733
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
2734
  <td class="forminp">
2735
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2736
  <div class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-control">
2737
  <!-- Font Size -->
2738
  <select
2739
- name="<?php echo $name_attribute; ?>[size]"
2740
  id="<?php echo esc_attr( $id_attribute ); ?>-size"
2741
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-size chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2742
  >
@@ -2752,7 +2752,7 @@ class Admin_Interface extends Admin_UI
2752
  </select>
2753
  <!-- Line Height -->
2754
  <select
2755
- name="<?php echo $name_attribute; ?>[line_height]"
2756
  id="<?php echo esc_attr( $id_attribute ); ?>-line_height"
2757
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-line_height chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2758
  >
@@ -2768,11 +2768,11 @@ class Admin_Interface extends Admin_UI
2768
  </select>
2769
  <!-- Font Face -->
2770
  <select
2771
- name="<?php echo $name_attribute; ?>[face]"
2772
  id="<?php echo esc_attr( $id_attribute ); ?>-face"
2773
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-face chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2774
  >
2775
- <optgroup label="<?php _e( '-- Default Fonts --', 'a3-lazy-load' ); ?>">
2776
  <?php
2777
  foreach ( $GLOBALS[$this->plugin_prefix.'fonts_face']->get_default_fonts() as $val => $text ) {
2778
  ?>
@@ -2783,7 +2783,7 @@ class Admin_Interface extends Admin_UI
2783
  }
2784
  ?>
2785
  </optgroup>
2786
- <optgroup label="<?php _e( '-- Google Fonts --', 'a3-lazy-load' ); ?>">
2787
  <?php
2788
  foreach ( $GLOBALS[$this->plugin_prefix.'fonts_face']->get_google_fonts() as $font ) {
2789
  ?>
@@ -2798,7 +2798,7 @@ class Admin_Interface extends Admin_UI
2798
 
2799
  <!-- Font Weight -->
2800
  <select
2801
- name="<?php echo $name_attribute; ?>[style]"
2802
  id="<?php echo esc_attr( $id_attribute ); ?>-style"
2803
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-style chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2804
  >
@@ -2815,16 +2815,16 @@ class Admin_Interface extends Admin_UI
2815
 
2816
  <!-- Font Color -->
2817
  <input
2818
- name="<?php echo $name_attribute; ?>[color]"
2819
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
2820
  type="text"
2821
  value="<?php echo esc_attr( $color ); ?>"
2822
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-color a3rev-color-picker"
2823
- <?php echo $default_color; // XSS ok ?>
2824
  />
2825
 
2826
  <!-- Preview Button -->
2827
- <div class="a3rev-ui-typography-preview"><a href="#" class="a3rev-ui-typography-preview-button button submit-button" title="<?php _e( 'Preview your customized typography settings', 'a3-lazy-load'); ?>"><span>&nbsp;</span></a></div>
2828
 
2829
  </div>
2830
 
@@ -2839,7 +2839,6 @@ class Admin_Interface extends Admin_UI
2839
  if ( ! is_array( $value['default'] ) ) $value['default'] = array();
2840
 
2841
  // For Border Styles
2842
- $default_color = ' data-default-color="' . esc_attr( $value['default']['color'] ) . '"';
2843
 
2844
  $width = $option_value['width'];
2845
  $style = $option_value['style'];
@@ -2884,13 +2883,13 @@ class Admin_Interface extends Admin_UI
2884
  $bottom_right_corner = intval( $bottom_right_corner );
2885
 
2886
  ?><tr valign="top">
2887
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
2888
  <td class="forminp forminp-border_corner">
2889
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
2890
  <div class="a3rev-ui-settings-control">
2891
  <!-- Border Width -->
2892
  <select
2893
- name="<?php echo $name_attribute; ?>[width]"
2894
  id="<?php echo esc_attr( $id_attribute ); ?>-width"
2895
  class="a3rev-ui-border_styles-width chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2896
  >
@@ -2907,7 +2906,7 @@ class Admin_Interface extends Admin_UI
2907
 
2908
  <!-- Border Style -->
2909
  <select
2910
- name="<?php echo $name_attribute; ?>[style]"
2911
  id="<?php echo esc_attr( $id_attribute ); ?>-style"
2912
  class="a3rev-ui-border_styles-style chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2913
  >
@@ -2924,36 +2923,36 @@ class Admin_Interface extends Admin_UI
2924
 
2925
  <!-- Border Color -->
2926
  <input
2927
- name="<?php echo $name_attribute; ?>[color]"
2928
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
2929
  type="text"
2930
  value="<?php echo esc_attr( $color ); ?>"
2931
  class="a3rev-ui-border_styles-color a3rev-color-picker"
2932
- <?php echo $default_color; // XSS ok ?>
2933
  />
2934
 
2935
  <!-- Preview Button -->
2936
- <div class="a3rev-ui-settings-preview"><a href="#" class="a3rev-ui-border-preview-button a3rev-ui-settings-preview-button button submit-button" title="<?php _e( 'Preview your customized border settings', 'a3-lazy-load' ); ?>"><span>&nbsp;</span></a></div>
2937
- <span class="description" style="margin-left:5px;"><?php echo __( '0px = No Border', 'a3-lazy-load' ); ?></span>
2938
  <div style="clear:both; margin-bottom:10px"></div>
2939
 
2940
  <!-- Border Corner : Rounded or Square -->
2941
  <input
2942
- name="<?php echo $name_attribute; ?>[corner]"
2943
  id="<?php echo esc_attr( $id_attribute ); ?>"
2944
  class="a3rev-ui-border-corner a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
2945
- checked_label="<?php _e( 'Rounded', 'a3-lazy-load' ); ?>"
2946
- unchecked_label="<?php _e( 'Square', 'a3-lazy-load' ); ?>"
2947
  type="checkbox"
2948
  value="rounded"
2949
  <?php checked( 'rounded', $corner ); ?>
2950
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
2951
  />
2952
 
2953
  <!-- Border Rounded Value -->
2954
  <div class="a3rev-ui-border-corner-value-container">
2955
  <div class="a3rev-ui-border_corner-top_left">
2956
- <span class="a3rev-ui-border_corner-span"><?php _e( 'Top Left Corner', 'a3-lazy-load' ); ?></span>
2957
  <div class="a3rev-ui-slide-container">
2958
  <div class="a3rev-ui-slide-container-start">
2959
  <div class="a3rev-ui-slide-container-end">
@@ -2963,7 +2962,7 @@ class Admin_Interface extends Admin_UI
2963
  <div class="a3rev-ui-slide-result-container">
2964
  <input
2965
  readonly="readonly"
2966
- name="<?php echo $name_attribute; ?>[top_left_corner]"
2967
  id="<?php echo esc_attr( $id_attribute ); ?>-top_left_corner"
2968
  type="text"
2969
  value="<?php echo esc_attr( $top_left_corner ); ?>"
@@ -2973,7 +2972,7 @@ class Admin_Interface extends Admin_UI
2973
  </div>
2974
  </div>
2975
  <div class="a3rev-ui-border_corner-top_right">
2976
- <span class="a3rev-ui-border_corner-span"><?php _e( 'Top Right Corner', 'a3-lazy-load' ); ?></span>
2977
  <div class="a3rev-ui-slide-container">
2978
  <div class="a3rev-ui-slide-container-start">
2979
  <div class="a3rev-ui-slide-container-end">
@@ -2983,7 +2982,7 @@ class Admin_Interface extends Admin_UI
2983
  <div class="a3rev-ui-slide-result-container">
2984
  <input
2985
  readonly="readonly"
2986
- name="<?php echo $name_attribute; ?>[top_right_corner]"
2987
  id="<?php echo esc_attr( $id_attribute ); ?>-top_right_corner"
2988
  type="text"
2989
  value="<?php echo esc_attr( $top_right_corner ); ?>"
@@ -2993,7 +2992,7 @@ class Admin_Interface extends Admin_UI
2993
  </div>
2994
  </div>
2995
  <div class="a3rev-ui-border_corner-bottom_right">
2996
- <span class="a3rev-ui-border_corner-span"><?php _e( 'Bottom Right Corner', 'a3-lazy-load' ); ?></span>
2997
  <div class="a3rev-ui-slide-container">
2998
  <div class="a3rev-ui-slide-container-start">
2999
  <div class="a3rev-ui-slide-container-end">
@@ -3003,7 +3002,7 @@ class Admin_Interface extends Admin_UI
3003
  <div class="a3rev-ui-slide-result-container">
3004
  <input
3005
  readonly="readonly"
3006
- name="<?php echo $name_attribute; ?>[bottom_right_corner]"
3007
  id="<?php echo esc_attr( $id_attribute ); ?>-bottom_right_corner"
3008
  type="text"
3009
  value="<?php echo esc_attr( $bottom_right_corner ); ?>"
@@ -3013,7 +3012,7 @@ class Admin_Interface extends Admin_UI
3013
  </div>
3014
  </div>
3015
  <div class="a3rev-ui-border_corner-bottom_left">
3016
- <span class="a3rev-ui-border_corner-span"><?php _e( 'Bottom Left Corner', 'a3-lazy-load' ); ?></span>
3017
  <div class="a3rev-ui-slide-container">
3018
  <div class="a3rev-ui-slide-container-start">
3019
  <div class="a3rev-ui-slide-container-end">
@@ -3023,7 +3022,7 @@ class Admin_Interface extends Admin_UI
3023
  <div class="a3rev-ui-slide-result-container">
3024
  <input
3025
  readonly="readonly"
3026
- name="<?php echo $name_attribute; ?>[bottom_left_corner]"
3027
  id="<?php echo esc_attr( $id_attribute ); ?>-bottom_left_corner"
3028
  type="text"
3029
  value="<?php echo esc_attr( $bottom_left_corner ); ?>"
@@ -3043,21 +3042,19 @@ class Admin_Interface extends Admin_UI
3043
 
3044
  // Border Style Control
3045
  case 'border_styles':
3046
-
3047
- $default_color = ' data-default-color="' . esc_attr( $value['default']['color'] ) . '"';
3048
-
3049
  $width = $option_value['width'];
3050
  $style = $option_value['style'];
3051
  $color = $option_value['color'];
3052
 
3053
  ?><tr valign="top">
3054
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
3055
  <td class="forminp">
3056
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3057
  <div class="a3rev-ui-settings-control">
3058
  <!-- Border Width -->
3059
  <select
3060
- name="<?php echo $name_attribute; ?>[width]"
3061
  id="<?php echo esc_attr( $id_attribute ); ?>-width"
3062
  class="a3rev-ui-border_styles-width chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3063
  >
@@ -3074,7 +3071,7 @@ class Admin_Interface extends Admin_UI
3074
 
3075
  <!-- Border Style -->
3076
  <select
3077
- name="<?php echo $name_attribute; ?>[style]"
3078
  id="<?php echo esc_attr( $id_attribute ); ?>-style"
3079
  class="a3rev-ui-border_styles-style chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3080
  >
@@ -3091,17 +3088,17 @@ class Admin_Interface extends Admin_UI
3091
 
3092
  <!-- Border Color -->
3093
  <input
3094
- name="<?php echo $name_attribute; ?>[color]"
3095
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
3096
  type="text"
3097
  value="<?php echo esc_attr( $color ); ?>"
3098
  class="a3rev-ui-border_styles-color a3rev-color-picker"
3099
- <?php echo $default_color; // XSS ok ?>
3100
  />
3101
 
3102
  <!-- Preview Button -->
3103
- <div class="a3rev-ui-settings-preview"><a href="#" class="a3rev-ui-border-preview-button a3rev-ui-settings-preview-button button submit-button" title="<?php _e( 'Preview your customized border styles settings', 'a3-lazy-load' ); ?>"><span>&nbsp;</span></a></div>
3104
- <span class="description" style="margin-left:5px;"><?php echo __( '0px = No Border', 'a3-lazy-load' ); ?></span>
3105
  </div>
3106
 
3107
  </td>
@@ -3150,29 +3147,29 @@ class Admin_Interface extends Admin_UI
3150
  $bottom_right_corner = intval( $bottom_right_corner );
3151
 
3152
  ?><tr valign="top">
3153
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
3154
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3155
  <div class="a3rev-ui-settings-control">
3156
  <!-- Border Corner : Rounded or Square -->
3157
  <input
3158
- name="<?php echo $name_attribute; ?>[corner]"
3159
  id="<?php echo esc_attr( $id_attribute ); ?>"
3160
  class="a3rev-ui-border-corner a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
3161
- checked_label="<?php _e( 'Rounded', 'a3-lazy-load' ); ?>"
3162
- unchecked_label="<?php _e( 'Square', 'a3-lazy-load' ); ?>"
3163
  type="checkbox"
3164
  value="rounded"
3165
  <?php checked( 'rounded', $corner ); ?>
3166
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
3167
  />
3168
 
3169
  <!-- Preview Button -->
3170
- <div class="a3rev-ui-settings-preview"><a href="#" class="a3rev-ui-border-preview-button a3rev-ui-settings-preview-button button submit-button" title="<?php _e( 'Preview your customized border settings', 'a3-lazy-load' ); ?>"><span>&nbsp;</span></a></div>
3171
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3172
  <!-- Border Rounded Value -->
3173
  <div class="a3rev-ui-border-corner-value-container">
3174
  <div class="a3rev-ui-border_corner-top_left">
3175
- <span class="a3rev-ui-border_corner-span"><?php _e( 'Top Left Corner', 'a3-lazy-load' ); ?></span>
3176
  <div class="a3rev-ui-slide-container">
3177
  <div class="a3rev-ui-slide-container-start">
3178
  <div class="a3rev-ui-slide-container-end">
@@ -3182,7 +3179,7 @@ class Admin_Interface extends Admin_UI
3182
  <div class="a3rev-ui-slide-result-container">
3183
  <input
3184
  readonly="readonly"
3185
- name="<?php echo $name_attribute; ?>[top_left_corner]"
3186
  id="<?php echo esc_attr( $id_attribute ); ?>-top_left_corner"
3187
  type="text"
3188
  value="<?php echo esc_attr( $top_left_corner ); ?>"
@@ -3192,7 +3189,7 @@ class Admin_Interface extends Admin_UI
3192
  </div>
3193
  </div>
3194
  <div class="a3rev-ui-border_corner-top_right">
3195
- <span class="a3rev-ui-border_corner-span"><?php _e( 'Top Right Corner', 'a3-lazy-load' ); ?></span>
3196
  <div class="a3rev-ui-slide-container">
3197
  <div class="a3rev-ui-slide-container-start">
3198
  <div class="a3rev-ui-slide-container-end">
@@ -3202,7 +3199,7 @@ class Admin_Interface extends Admin_UI
3202
  <div class="a3rev-ui-slide-result-container">
3203
  <input
3204
  readonly="readonly"
3205
- name="<?php echo $name_attribute; ?>[top_right_corner]"
3206
  id="<?php echo esc_attr( $id_attribute ); ?>-top_right_corner"
3207
  type="text"
3208
  value="<?php echo esc_attr( $top_right_corner ); ?>"
@@ -3212,7 +3209,7 @@ class Admin_Interface extends Admin_UI
3212
  </div>
3213
  </div>
3214
  <div class="a3rev-ui-border_corner-bottom_right">
3215
- <span class="a3rev-ui-border_corner-span"><?php _e( 'Bottom Right Corner', 'a3-lazy-load' ); ?></span>
3216
  <div class="a3rev-ui-slide-container">
3217
  <div class="a3rev-ui-slide-container-start">
3218
  <div class="a3rev-ui-slide-container-end">
@@ -3222,7 +3219,7 @@ class Admin_Interface extends Admin_UI
3222
  <div class="a3rev-ui-slide-result-container">
3223
  <input
3224
  readonly="readonly"
3225
- name="<?php echo $name_attribute; ?>[bottom_right_corner]"
3226
  id="<?php echo esc_attr( $id_attribute ); ?>-bottom_right_corner"
3227
  type="text"
3228
  value="<?php echo esc_attr( $bottom_right_corner ); ?>"
@@ -3232,7 +3229,7 @@ class Admin_Interface extends Admin_UI
3232
  </div>
3233
  </div>
3234
  <div class="a3rev-ui-border_corner-bottom_left">
3235
- <span class="a3rev-ui-border_corner-span"><?php _e( 'Bottom Left Corner', 'a3-lazy-load' ); ?></span>
3236
  <div class="a3rev-ui-slide-container">
3237
  <div class="a3rev-ui-slide-container-start">
3238
  <div class="a3rev-ui-slide-container-end">
@@ -3242,7 +3239,7 @@ class Admin_Interface extends Admin_UI
3242
  <div class="a3rev-ui-slide-result-container">
3243
  <input
3244
  readonly="readonly"
3245
- name="<?php echo $name_attribute; ?>[bottom_left_corner]"
3246
  id="<?php echo esc_attr( $id_attribute ); ?>-bottom_left_corner"
3247
  type="text"
3248
  value="<?php echo esc_attr( $bottom_left_corner ); ?>"
@@ -3262,9 +3259,7 @@ class Admin_Interface extends Admin_UI
3262
 
3263
  // Box Shadow Control
3264
  case 'box_shadow':
3265
-
3266
- $default_color = ' data-default-color="' . esc_attr( $value['default']['color'] ) . '"';
3267
-
3268
  if ( ! isset( $option_value['enable'] ) ) $option_value['enable'] = 0;
3269
  $enable = $option_value['enable'];
3270
  if ( ! isset( $option_value['inset'] ) ) $option_value['inset'] = '';
@@ -3276,29 +3271,29 @@ class Admin_Interface extends Admin_UI
3276
  $inset = $option_value['inset'];
3277
 
3278
  ?><tr valign="top">
3279
- <th scope="row" class="titledesc"><?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?><?php echo esc_html( $value['name'] ); ?></th>
3280
  <td class="forminp forminp-box_shadow">
3281
  <input
3282
- name="<?php echo $name_attribute; ?>[enable]"
3283
  id="<?php echo esc_attr( $id_attribute ); ?>"
3284
  class="a3rev-ui-box_shadow-enable a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
3285
- checked_label="<?php _e( 'ON', 'a3-lazy-load' ); ?>"
3286
- unchecked_label="<?php _e( 'OFF', 'a3-lazy-load' ); ?>"
3287
  type="checkbox"
3288
  value="1"
3289
  <?php checked( 1, $enable ); ?>
3290
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
3291
  />
3292
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3293
  <div style="clear:both;"></div>
3294
  <div class="a3rev-ui-box_shadow-enable-container">
3295
  <div class="a3rev-ui-settings-control">
3296
  <!-- Box Horizontal Shadow Size -->
3297
  <select
3298
- name="<?php echo $name_attribute; ?>[h_shadow]"
3299
  id="<?php echo esc_attr( $id_attribute ); ?>-h_shadow"
3300
  class="a3rev-ui-box_shadow-h_shadow chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3301
- data-placeholder="<?php _e( 'Horizontal Shadow', 'a3-lazy-load' ); ?>"
3302
  >
3303
  <?php
3304
  for ( $i = -20; $i <= 20; $i++ ) {
@@ -3313,10 +3308,10 @@ class Admin_Interface extends Admin_UI
3313
 
3314
  <!-- Box Vertical Shadow Size -->
3315
  <select
3316
- name="<?php echo $name_attribute; ?>[v_shadow]"
3317
  id="<?php echo esc_attr( $id_attribute ); ?>-v_shadow"
3318
  class="a3rev-ui-box_shadow-v_shadow chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3319
- data-placeholder="<?php _e( 'Vertical Shadow', 'a3-lazy-load' ); ?>"
3320
  >
3321
  <?php
3322
  for ( $i = -20; $i <= 20; $i++ ) {
@@ -3331,10 +3326,10 @@ class Admin_Interface extends Admin_UI
3331
 
3332
  <!-- Box Blur Distance -->
3333
  <select
3334
- name="<?php echo $name_attribute; ?>[blur]"
3335
  id="<?php echo esc_attr( $id_attribute ); ?>-blur"
3336
  class="a3rev-ui-box_shadow-blur chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3337
- data-placeholder="<?php _e( 'Blur Distance', 'a3-lazy-load' ); ?>"
3338
  >
3339
  <?php
3340
  for ( $i = 0; $i <= 20; $i++ ) {
@@ -3349,10 +3344,10 @@ class Admin_Interface extends Admin_UI
3349
 
3350
  <!-- Box Spread -->
3351
  <select
3352
- name="<?php echo $name_attribute; ?>[spread]"
3353
  id="<?php echo esc_attr( $id_attribute ); ?>-spread"
3354
  class="a3rev-ui-box_shadow-spread chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3355
- data-placeholder="<?php _e( 'Spread Size', 'a3-lazy-load' ); ?>"
3356
  >
3357
  <?php
3358
  for ( $i = 0; $i <= 20; $i++ ) {
@@ -3367,29 +3362,29 @@ class Admin_Interface extends Admin_UI
3367
 
3368
  <!-- Box Shadow Inset -->
3369
  <input
3370
- name="<?php echo $name_attribute; ?>[inset]"
3371
  id="<?php echo esc_attr( $id_attribute ); ?>"
3372
  class="a3rev-ui-box_shadow-inset a3rev-ui-onoff_checkbox"
3373
- checked_label="<?php _e( 'INNER', 'a3-lazy-load' ); ?>"
3374
- unchecked_label="<?php _e( 'OUTER', 'a3-lazy-load' ); ?>"
3375
  type="checkbox"
3376
  value="inset"
3377
  <?php checked( 'inset', $inset ); ?>
3378
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
3379
  />
3380
 
3381
  <!-- Box Shadow Color -->
3382
  <input
3383
- name="<?php echo $name_attribute; ?>[color]"
3384
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
3385
  type="text"
3386
  value="<?php echo esc_attr( $color ); ?>"
3387
  class="a3rev-ui-box_shadow-color a3rev-color-picker"
3388
- <?php echo $default_color; // XSS ok ?>
3389
  />
3390
 
3391
  <!-- Preview Button -->
3392
- <div class="a3rev-ui-settings-preview"><a href="#" class="a3rev-ui-box_shadow-preview-button a3rev-ui-settings-preview-button button submit-button" title="<?php _e( 'Preview your customized box shadow settings', 'a3-lazy-load'); ?>"><span>&nbsp;</span></a></div>
3393
  </div>
3394
  <div style="clear:both;"></div>
3395
  </div>
@@ -3409,8 +3404,8 @@ class Admin_Interface extends Admin_UI
3409
 
3410
  ?><tr valign="top">
3411
  <th scope="row" class="titledesc">
3412
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3413
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
3414
  </th>
3415
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3416
  <div class="a3rev-ui-slide-container">
@@ -3420,13 +3415,13 @@ class Admin_Interface extends Admin_UI
3420
  <div class="a3rev-ui-slide-result-container">
3421
  <input
3422
  readonly="readonly"
3423
- name="<?php echo $name_attribute; // XSS ok ?>"
3424
  id="<?php echo esc_attr( $id_attribute ); ?>"
3425
  type="text"
3426
  value="<?php echo esc_attr( $option_value ); ?>"
3427
  class="a3rev-ui-slider"
3428
- <?php echo implode( ' ', $custom_attributes ); // XSS ok ?>
3429
- /> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3430
  </div>
3431
  </div>
3432
  </td>
@@ -3453,12 +3448,12 @@ class Admin_Interface extends Admin_UI
3453
 
3454
  ?><tr valign="top">
3455
  <th scope="row" class="titledesc">
3456
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3457
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
3458
  </th>
3459
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3460
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3461
- <?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 );?>
3462
  </td>
3463
  </tr><?php
3464
 
@@ -3471,11 +3466,11 @@ class Admin_Interface extends Admin_UI
3471
 
3472
  ?><tr valign="top">
3473
  <th scope="row" class="titledesc">
3474
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3475
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
3476
  </th>
3477
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3478
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3479
  <?php remove_all_filters('mce_external_plugins'); ?>
3480
  <?php wp_editor( $option_value,
3481
  $id_attribute,
@@ -3495,11 +3490,11 @@ class Admin_Interface extends Admin_UI
3495
 
3496
  ?><tr valign="top">
3497
  <th scope="row" class="titledesc">
3498
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3499
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
3500
  </th>
3501
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3502
- <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3503
  <div class="a3rev-ui-array_textfields-container">
3504
  <?php
3505
  foreach ( $value['ids'] as $text_field ) {
@@ -3556,13 +3551,13 @@ class Admin_Interface extends Admin_UI
3556
  }
3557
  ?>
3558
  <label><input
3559
- name="<?php echo $name_attribute; // XSS ok ?>"
3560
  id="<?php echo esc_attr( $id_attribute ); ?>"
3561
  type="text"
3562
  style="<?php echo esc_attr( $text_field['css'] ); ?>"
3563
  value="<?php echo esc_attr( $option_value ); ?>"
3564
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $text_field['class'] ); ?>"
3565
- /> <span><?php echo esc_html( $text_field['name'] ); ?></span></label>
3566
  <?php
3567
  }
3568
  ?>
@@ -3576,26 +3571,26 @@ class Admin_Interface extends Admin_UI
3576
  // Time Picker Control
3577
  case 'time_picker':
3578
 
3579
- $class = 'a3rev-ui-' . sanitize_title( $value['type'] ) . ' ' . esc_attr( $value['class'] );
3580
 
3581
  ?><tr valign="top">
3582
  <th scope="row" class="titledesc">
3583
- <?php echo $tip; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3584
- <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo esc_html( $value['name'] ); ?></label>
3585
  </th>
3586
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3587
  <input
3588
  readonly="readonly"
3589
- name="<?php echo $name_attribute; // XSS ok ?>"
3590
  id="<?php echo esc_attr( $id_attribute ); ?>"
3591
  type="text"
3592
  value="<?php echo esc_attr( $option_value ); ?>"
3593
- class="<?php echo $class; ?>"
3594
  <?php if ( ! empty( $value['time_step'] ) ) { ?>data-time_step="<?php echo esc_attr( $value['time_step'] ); ?>"<?php } ?>
3595
  <?php if ( ! empty( $value['time_min'] ) ) { ?>data-time_min="<?php echo esc_attr( $value['time_min'] ); ?>"<?php } ?>
3596
  <?php if ( ! empty( $value['time_max'] ) ) { ?>data-time_max="<?php echo esc_attr( $value['time_max'] ); ?>"<?php } ?>
3597
  <?php if ( ! empty( $value['time_allow'] ) ) { ?>data-time_max="<?php echo esc_attr( $value['time_allow'] ); ?>"<?php } ?>
3598
- /> <?php echo $description; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?>
3599
  </td>
3600
  </tr><?php
3601
 
@@ -3691,8 +3686,9 @@ class Admin_Interface extends Admin_UI
3691
  </div> <!-- Close Panel Row -->
3692
  <?php do_action( $this->plugin_name . '-' . trim( $form_key ) . '_settings_end' ); ?>
3693
  <p class="submit">
3694
- <input type="submit" value="<?php _e('Save changes', 'a3-lazy-load'); ?>" class="button button-primary" name="bt_save_settings" />
3695
- <input type="submit" name="bt_reset_settings" class="button" value="<?php _e('Reset Settings', 'a3-lazy-load'); ?>" />
 
3696
  <input type="hidden" name="form_name_action" value="<?php echo esc_attr( $form_key ); ?>" />
3697
  <input type="hidden" class="last_tab" name="subtab" value="#<?php echo esc_attr( $current_subtab ); ?>" />
3698
  </p>
@@ -3780,7 +3776,7 @@ class Admin_Interface extends Admin_UI
3780
  // open box handle
3781
  echo '<div data-form-key="custom-boxes" data-box-id="'. esc_attr( $heading_box_id ) .'" class="a3rev_panel_box_handle" >' . "\n\n";
3782
 
3783
- echo ( ! empty( $options['name'] ) ) ? '<h3 class="a3-plugin-ui-panel-box '. $toggle_box_class . ' ' . $opened_class . '">'. esc_html( $options['name'] ) .' '. wptexturize( $view_doc ) .'</h3>' : '';
3784
 
3785
  if ( stristr( $options['class'], 'pro_feature_fields' ) !== false && ! empty( $options['id'] ) ) $this->upgrade_top_message( true, sanitize_title( $options['id'] ) );
3786
  elseif ( stristr( $options['class'], 'pro_feature_fields' ) !== false ) $this->upgrade_top_message( true );
@@ -3789,7 +3785,7 @@ class Admin_Interface extends Admin_UI
3789
  echo '</div>' . "\n\n";
3790
 
3791
  // open box inside
3792
- echo '<div id="'. esc_attr( $options['id'] ) . '_box_inside" class="a3rev_panel_box_inside '.$opened_class.'" style="padding-top: 10px;" >' . "\n\n";
3793
 
3794
  echo '<div class="a3rev_panel_inner">' . "\n\n";
3795
 
@@ -3798,16 +3794,16 @@ class Admin_Interface extends Admin_UI
3798
  if ( stristr( $options['class'], 'pro_feature_fields' ) !== false && ! empty( $options['id'] ) ) $this->upgrade_top_message( true, sanitize_title( $options['id'] ) );
3799
  elseif ( stristr( $options['class'], 'pro_feature_fields' ) !== false ) $this->upgrade_top_message( true );
3800
 
3801
- echo ( ! empty( $options['name'] ) ) ? '<h3>'. esc_html( $options['name'] ) .' '. wptexturize( $view_doc ) .'</h3>' : '';
3802
  }
3803
 
3804
  if ( ! empty( $options['desc'] ) ) {
3805
  echo '<div class="a3rev_panel_box_description" >' . "\n\n";
3806
- echo wpautop( wptexturize( $options['desc'] ) );
3807
  echo '</div>' . "\n\n";
3808
  }
3809
 
3810
- echo $settings_html;
3811
 
3812
  echo '</div>';
3813
 
@@ -3833,6 +3829,74 @@ class Admin_Interface extends Admin_UI
3833
  return $values;
3834
  }
3835
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3836
  /*-----------------------------------------------------------------------------------*/
3837
  /* hextorgb() */
3838
  /* Convert Hex to RGB for color */
@@ -3873,8 +3937,12 @@ class Admin_Interface extends Admin_UI
3873
  public function generate_border_css( $option ) {
3874
 
3875
  $border_css = '';
3876
-
3877
- $border_css .= 'border: ' . esc_attr( $option['width'] ) . ' ' . esc_attr( $option['style'] ) . ' ' . esc_attr( $option['color'] ) .' !important;';
 
 
 
 
3878
 
3879
  if ( isset( $option['corner'] ) && esc_attr( $option['corner'] ) == 'rounded' ) {
3880
  if ( ! isset( $option['rounded_value'] ) ) $option['rounded_value'] = 0;
@@ -3892,8 +3960,7 @@ class Admin_Interface extends Admin_UI
3892
  $border_css .= '-webkit-border-radius: 0px !important;';
3893
  }
3894
 
3895
- return $border_css;
3896
-
3897
  }
3898
 
3899
  /*-----------------------------------------------------------------------------------*/
@@ -3903,11 +3970,14 @@ class Admin_Interface extends Admin_UI
3903
  public function generate_border_style_css( $option ) {
3904
 
3905
  $border_style_css = '';
 
 
 
 
 
 
3906
 
3907
- $border_style_css .= 'border: ' . esc_attr( $option['width'] ) . ' ' . esc_attr( $option['style'] ) . ' ' . esc_attr( $option['color'] ) .' !important;';
3908
-
3909
- return $border_style_css;
3910
-
3911
  }
3912
 
3913
  /*-----------------------------------------------------------------------------------*/
@@ -3934,8 +4004,7 @@ class Admin_Interface extends Admin_UI
3934
  $border_corner_css .= '-webkit-border-radius: 0px !important;';
3935
  }
3936
 
3937
- return $border_corner_css;
3938
-
3939
  }
3940
 
3941
  /*-----------------------------------------------------------------------------------*/
@@ -3957,8 +4026,7 @@ class Admin_Interface extends Admin_UI
3957
  $shadow_css .= '-webkit-box-shadow: none !important ;';
3958
  }
3959
 
3960
- return $shadow_css;
3961
-
3962
  }
3963
 
3964
  /*-----------------------------------------------------------------------------------*/
@@ -3987,8 +4055,7 @@ class Admin_Interface extends Admin_UI
3987
  $return_css .= 'background-color: transparent !important ;';
3988
  }
3989
 
3990
- return $return_css;
3991
-
3992
  }
3993
 
3994
  }
180
  public function a3_admin_ui_event() {
181
  check_ajax_referer( $this->plugin_name. '_a3_admin_ui_event', 'security' );
182
  if ( isset( $_REQUEST['type'] ) ) {
183
+ switch ( trim( sanitize_text_field( wp_unslash( $_REQUEST['type'] ) ) ) ) {
184
  case 'open_close_panel_box':
185
+ $form_key = sanitize_key( wp_unslash( $_REQUEST['form_key'] ) );
186
+ $box_id = sanitize_text_field( wp_unslash( $_REQUEST['box_id'] ) );
187
+ $is_open = isset( $_REQUEST['is_open'] ) ? (int) $_REQUEST['is_open'] :0 ;
188
 
189
  $user_id = get_current_user_id();
190
  $opened_box = get_user_meta( $user_id, $this->plugin_name . '-' . trim( $form_key ), true );
200
  break;
201
 
202
  case 'check_new_version':
203
+ $transient_name = sanitize_key( wp_unslash( $_REQUEST['transient_name'] ) );
204
  delete_transient( $transient_name );
205
 
206
  $new_version = '';
237
  break;
238
 
239
  case 'validate_google_api_key':
240
+ $g_key = sanitize_text_field( wp_unslash( $_REQUEST['g_key'] ) );
241
+ $g_key_type = sanitize_text_field( wp_unslash( $_REQUEST['g_key_type'] ) );
242
 
243
  $is_valid = false;
244
  if ( ! empty( $g_key ) ) {
596
  /*-----------------------------------------------------------------------------------*/
597
 
598
  public function save_settings( $options, $option_name = '' ) {
599
+
600
+ check_admin_referer( 'save_settings_' . $this->plugin_name );
601
+
602
+ if ( ! current_user_can( 'manage_options' ) ) {
603
+ return false;
604
+ }
605
 
606
  if ( !is_array( $options ) || count( $options ) < 1 ) return;
607
 
608
  if ( empty( $_POST ) ) return false;
609
+
610
+ $this->update_google_map_api_key();
611
+ $GLOBALS[$this->plugin_prefix.'fonts_face']->update_google_font_api_key();
612
 
613
  $update_options = array();
614
  $update_separate_options = array();
725
  if ( trim( $option_name ) == '' || $value['separate_option'] != false ) {
726
  if ( $key != false ) {
727
  if ( isset( $_POST[ $id_attribute ][ $key ] ) ) {
728
+ $option_value = sanitize_text_field( wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
729
  } else {
730
  $option_value = '';
731
  }
732
  } else {
733
  if ( isset( $_POST[ $id_attribute ] ) ) {
734
+ $option_value = sanitize_text_field( wp_unslash( $_POST[ $id_attribute ] ) );
735
  } else {
736
  $option_value = '';
737
  }
740
  } else {
741
  if ( $key != false ) {
742
  if ( isset( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
743
+ $option_value = sanitize_text_field( wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
744
  } else {
745
  $option_value = '';
746
  }
747
  } else {
748
  if ( isset( $_POST[ $option_name ][ $id_attribute ] ) ) {
749
+ $option_value = sanitize_text_field( wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
750
  } else {
751
  $option_value = '';
752
  }
783
 
784
  // sanitize content for wp_editor type
785
  if ( 'wp_editor' === $value['type'] ) {
786
+ $option_value = wp_kses_post_deep( wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
787
  } elseif ( 'email' === $value['type'] ) {
788
  if ( is_array( $_POST[ $id_attribute ][ $key ] ) ) {
789
+ $option_value = array_map( 'sanitize_email', wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
790
  } else {
791
+ $option_value = sanitize_email( wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
792
  }
793
  } elseif ( 'color' === $value['type'] ) {
794
  if ( is_array( $_POST[ $id_attribute ][ $key ] ) ) {
795
+ $option_value = array_map( 'sanitize_hex_color', wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
796
  } else {
797
+ $option_value = sanitize_hex_color( wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
798
  }
799
  } elseif ( 'textarea' === $value['type'] ) {
800
  if ( is_array( $_POST[ $id_attribute ][ $key ] ) ) {
801
+ $option_value = array_map( 'sanitize_textarea_field', wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
802
  } else {
803
+ $option_value = sanitize_textarea_field( wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
804
  }
805
  } else {
806
  if ( is_array( $_POST[ $id_attribute ][ $key ] ) ) {
807
+ $option_value = array_map( 'sanitize_text_field', wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
808
  } else {
809
+ $option_value = sanitize_text_field( wp_unslash( $_POST[ $id_attribute ][ $key ] ) );
810
  }
811
  }
812
 
818
 
819
  // sanitize content for wp_editor type
820
  if ( 'wp_editor' === $value['type'] ) {
821
+ $option_value = wp_kses_post_deep( wp_unslash( $_POST[ $id_attribute ] ) );
822
  } elseif ( 'email' === $value['type'] ) {
823
  if ( is_array( $_POST[ $id_attribute ] ) ) {
824
+ $option_value = array_map( 'sanitize_email', wp_unslash( $_POST[ $id_attribute ] ) );
825
  } else {
826
+ $option_value = sanitize_email( wp_unslash( $_POST[ $id_attribute ] ) );
827
  }
828
  } elseif ( 'color' === $value['type'] ) {
829
  if ( is_array( $_POST[ $id_attribute ] ) ) {
830
+ $option_value = array_map( 'sanitize_hex_color', wp_unslash( $_POST[ $id_attribute ] ) );
831
  } else {
832
+ $option_value = sanitize_hex_color( wp_unslash( $_POST[ $id_attribute ] ) );
833
  }
834
  } elseif ( 'textarea' === $value['type'] ) {
835
  if ( is_array( $_POST[ $id_attribute ] ) ) {
836
+ $option_value = array_map( 'sanitize_textarea_field', wp_unslash( $_POST[ $id_attribute ] ) );
837
  } else {
838
+ $option_value = sanitize_textarea_field( wp_unslash( $_POST[ $id_attribute ] ) );
839
  }
840
  } else {
841
  if ( is_array( $_POST[ $id_attribute ] ) ) {
842
+ $option_value = array_map( 'sanitize_text_field', wp_unslash( $_POST[ $id_attribute ] ) );
843
  } else {
844
+ $option_value = sanitize_text_field( wp_unslash( $_POST[ $id_attribute ] ) );
845
  }
846
  }
847
 
856
 
857
  // sanitize content for wp_editor type
858
  if ( 'wp_editor' === $value['type'] ) {
859
+ $option_value = wp_kses_post_deep( wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
860
  } elseif ( 'email' === $value['type'] ) {
861
  if ( is_array( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
862
+ $option_value = array_map( 'sanitize_email', wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
863
  } else {
864
+ $option_value = sanitize_email( wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
865
  }
866
  } elseif ( 'color' === $value['type'] ) {
867
  if ( is_array( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
868
+ $option_value = array_map( 'sanitize_hex_color', wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
869
  } else {
870
+ $option_value = sanitize_hex_color( wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
871
  }
872
  } elseif ( 'textarea' === $value['type'] ) {
873
  if ( is_array( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
874
+ $option_value = array_map( 'sanitize_textarea_field', wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
875
  } else {
876
+ $option_value = sanitize_textarea_field( wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
877
  }
878
  } else {
879
  if ( is_array( $_POST[ $option_name ][ $id_attribute ][ $key ] ) ) {
880
+ $option_value = array_map( 'sanitize_text_field', wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
881
  } else {
882
+ $option_value = sanitize_text_field( wp_unslash( $_POST[ $option_name ][ $id_attribute ][ $key ] ) );
883
  }
884
  }
885
 
891
 
892
  // sanitize content for wp_editor type
893
  if ( 'wp_editor' === $value['type'] ) {
894
+ $option_value = wp_kses_post_deep( wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
895
  } elseif ( 'email' === $value['type'] ) {
896
  if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) {
897
+ $option_value = array_map( 'sanitize_email', wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
898
  } else {
899
+ $option_value = sanitize_email( wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
900
  }
901
  } elseif ( 'color' === $value['type'] ) {
902
  if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) {
903
+ $option_value = array_map( 'sanitize_hex_color', wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
904
  } else {
905
+ $option_value = sanitize_hex_color( wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
906
  }
907
  } elseif ( 'textarea' === $value['type'] ) {
908
  if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) {
909
+ $option_value = array_map( 'sanitize_textarea_field', wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
910
  } else {
911
+ $option_value = sanitize_textarea_field( wp_unslash( _POST[ $option_name ][ $id_attribute ] ) );
912
  }
913
  } else {
914
  if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) {
915
+ $option_value = array_map( 'sanitize_text_field', wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
916
  } else {
917
+ $option_value = sanitize_text_field( wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) );
918
  }
919
  }
920
 
1450
  if ( !is_array( $options ) || count( $options ) < 1 ) return '';
1451
  ?>
1452
 
1453
+ <?php $this->esc_description_e( $admin_message ); ?>
1454
  <div class="a3rev_panel_container" style="visibility:hidden; height:0; overflow:hidden;" >
1455
  <form action="" method="post">
1456
  <?php do_action( $this->plugin_name . '-' . trim( $form_key ) . '_settings_start' ); ?>
1490
  if ( ! isset( $value['separate_option'] ) ) $value['separate_option'] = false;
1491
 
1492
  // Custom attribute handling
1493
+ $custom_attributes = isset( $value['custom_attributes'] ) ? $value['custom_attributes'] : array();
 
 
 
 
1494
 
1495
  // Description handling
1496
  if ( $value['desc_tip'] === true ) {
1602
 
1603
  if ( $tip && in_array( $value['type'], array( 'checkbox' ) ) ) {
1604
 
1605
+ $tip = '<p class="description">' . wp_kses_post( $tip ) . '</p>';
1606
 
1607
  } elseif ( $tip ) {
1608
 
1851
  $box_handle_class .= 'box_active';
1852
  }
1853
 
1854
+ if ( isset( $_GET['box_open'] ) && sanitize_text_field( wp_unslash( $_GET['box_open'] ) ) == $value['id'] ) {
1855
  $opened_class = 'box_open';
1856
  }
1857
 
1859
  echo '<div id="'. esc_attr( $value['id'] ) . '" class="a3rev_panel_box '. esc_attr( $value['class'] ) .'" style="'. esc_attr( $value['css'] ) .'">' . "\n\n";
1860
 
1861
  // open box handle
1862
+ echo '<div data-form-key="'. esc_attr( trim( $form_key ) ) .'" data-box-id="'. esc_attr( $heading_box_id ) .'" class="a3rev_panel_box_handle ' . esc_attr( $box_handle_class ) .'" >' . "\n\n";
1863
 
1864
+ echo ( ! empty( $value['name'] ) ) ? '<h3 class="a3-plugin-ui-panel-box '. esc_attr( $toggle_box_class ) . ' ' . esc_attr( $opened_class ) . '">'. wp_kses_post( $value['name'] ) .' '. wp_kses_post( wptexturize( $view_doc ) ) .'</h3>' : '';
1865
 
1866
  if ( stristr( $value['class'], 'pro_feature_fields' ) !== false && ! empty( $value['id'] ) ) $this->upgrade_top_message( true, sanitize_title( $value['id'] ) );
1867
  elseif ( stristr( $value['class'], 'pro_feature_fields' ) !== false ) $this->upgrade_top_message( true );
1870
  echo '</div>' . "\n\n";
1871
 
1872
  // open box inside
1873
+ echo '<div id="'. esc_attr( $value['id'] ) . '_box_inside" class="a3rev_panel_box_inside '. esc_attr( $opened_class ) .'" >' . "\n\n";
1874
 
1875
  echo '<div class="a3rev_panel_inner">' . "\n\n";
1876
 
1887
  if ( stristr( $value['class'], 'pro_feature_fields' ) !== false && ! empty( $value['id'] ) ) $this->upgrade_top_message( true, sanitize_title( $value['id'] ) );
1888
  elseif ( stristr( $value['class'], 'pro_feature_fields' ) !== false ) $this->upgrade_top_message( true );
1889
 
1890
+ echo ( ! empty( $value['name'] ) ) ? '<h3>'. wp_kses_post( $value['name'] ) .' '. wp_kses_post( wptexturize( $view_doc ) ) .'</h3>' : '';
1891
  }
1892
 
1893
  if ( ! empty( $value['desc'] ) ) {
1894
  echo '<div class="a3rev_panel_box_description" >' . "\n\n";
1895
+ echo wp_kses_post( wpautop( wptexturize( $value['desc'] ) ) );
1896
  echo '</div>' . "\n\n";
1897
  }
1898
 
1913
 
1914
  ?><tr valign="top">
1915
  <th scope="row" class="titledesc">
1916
+ <?php echo wp_kses_post( $tip ); ?>
1917
+ <label for="<?php echo esc_attr( $this->google_api_key_option ); ?>"><?php esc_html_e( 'Google Fonts API', 'a3-lazy-load' ); ?></label>
1918
  </th>
1919
  <td class="forminp forminp-onoff_checkbox forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
1920
  <input
1926
  type="checkbox"
1927
  value="1"
1928
  <?php checked( $google_api_key_enable, 1 ); ?>
1929
+ /> <span class="description" style="margin-left:5px;"><?php esc_html_e( 'ON to connect to Google Fonts API and have auto font updates direct from Google.', 'a3-lazy-load' ); ?></span>
1930
 
1931
  <div>&nbsp;</div>
1932
  <div class="a3rev-ui-google-api-key-container" style="<?php if( 1 != $google_api_key_enable ) { echo 'display: none;'; } ?>">
1933
  <?php
1934
  if ( ! empty( $description ) ) {
1935
+ $this->esc_description_e( $description );
1936
  } else {
1937
  ?>
1938
  <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" ), 'https://developers.google.com/fonts/docs/developer_api#APIKey' ); ?></div>
1954
  style="<?php echo esc_attr( $value['css'] ); ?>"
1955
  value="<?php echo esc_attr( $google_api_key ); ?>"
1956
  class="a3rev-ui-text a3rev-ui-google-api-key a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
1957
+ placeholder="<?php esc_attr_e( 'Google Fonts API Key' ); ?>"
1958
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
1959
  />
1960
  <button
1961
  name="<?php echo esc_attr( $this->google_api_key_option ); ?>_validate_bt"
1962
  id="<?php echo esc_attr( $this->google_api_key_option ); ?>_validate_bt"
1963
  type="button"
1964
+ class="a3rev-ui-google-api-key-validate-button a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-button"><?php esc_html_e( 'Validate' ); ?></button>
1965
+ <p class="a3rev-ui-google-valid-key-message"><?php esc_html_e( 'Your Google API Key is valid and automatic font updates are enabled.' ); ?></p>
1966
+ <p class="a3rev-ui-google-unvalid-key-message"><?php esc_html_e( 'Please enter a valid Google API Key.' ); ?></p>
1967
  </div>
1968
  </div>
1969
  </td>
1981
 
1982
  ?><tr valign="top">
1983
  <th scope="row" class="titledesc">
1984
+ <?php echo wp_kses_post( $tip ); ?>
1985
+ <label for="<?php echo esc_attr( $this->google_map_api_key_option ); ?>"><?php esc_html_e( 'Google Maps API', 'a3-lazy-load' ); ?></label>
1986
  </th>
1987
  <td class="forminp forminp-onoff_checkbox forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
1988
  <input
1994
  type="checkbox"
1995
  value="1"
1996
  <?php checked( $google_map_api_key_enable, 1 ); ?>
1997
+ /> <span class="description" style="margin-left:5px;"><?php esc_html_e( 'Switch ON to connect to Google Maps API', 'a3-lazy-load' ); ?></span>
1998
 
1999
  <div>&nbsp;</div>
2000
  <div class="a3rev-ui-google-api-key-container" style="<?php if( 1 != $google_map_api_key_enable ) { echo 'display: none;'; } ?>">
2001
  <?php
2002
  if ( ! empty( $description ) ) {
2003
+ $this->esc_description_e( $description );
2004
  } else {
2005
  ?>
2006
  <div class="a3rev-ui-google-api-key-description" style="margin-bottom:5px;"><?php echo sprintf( __( "Enter your Google Maps API Key and save changes, or go to <a href='%s' target='_blank'>Google Maps API</a> to create a new key. The key must have the Geocoding API, Maps Embed API and Maps JavaScript API as a minimum." ), 'https://developers.google.com/maps/documentation/javascript/get-api-key' ); ?></div>
2021
  type="text"
2022
  style="<?php echo esc_attr( $value['css'] ); ?>"
2023
  value="<?php echo esc_attr( $google_map_api_key ); ?>"
2024
+ class="a3rev-ui-text a3rev-ui-google-api-key a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2025
+ placeholder="<?php esc_attr_e( 'Google Map API Key' ); ?>"
2026
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2027
  />
2028
  <button
2029
  name="<?php echo esc_attr( $this->google_map_api_key_option ); ?>_validate_bt"
2030
  id="<?php echo esc_attr( $this->google_map_api_key_option ); ?>_validate_bt"
2031
  type="button"
2032
+ class="a3rev-ui-google-api-key-validate-button a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-button"><?php esc_html_e( 'Validate' ); ?></button>
2033
+ <p class="a3rev-ui-google-valid-key-message"><?php esc_html_e( 'Your Google API Key is valid.' ); ?></p>
2034
+ <p class="a3rev-ui-google-unvalid-key-message"><?php esc_html_e( 'Please enter a valid Google API Key.' ); ?></p>
2035
  </div>
2036
  </div>
2037
  </td>
2063
 
2064
  ?><tr valign="top">
2065
  <td colspan="2">
2066
+ <p class="a3rev-ui-check-version-message <?php echo esc_attr( $check_version_class ); ?>"><?php $this->esc_description_e( $version_message ); ?></p>
2067
  </td>
2068
  </tr><?php
2069
 
2079
  $submit_data = json_encode( $value['submit_data'] );
2080
 
2081
  ?><tr valign="top">
2082
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
2083
  <td class="forminp">
2084
 
2085
  <div class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-control">
2086
 
2087
  <button
2088
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2089
  id="<?php echo esc_attr( $id_attribute ); ?>"
2090
  data-submit_data="<?php echo esc_attr( $submit_data ); ?>"
2091
  type="button"
2092
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-button <?php echo esc_attr( $value['class'] ); ?>"
2093
  style="<?php echo esc_attr( $value['css'] ); ?>"
2094
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2095
  ><?php echo esc_html( $button_name ); ?></button>
2096
  <span class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-successed"><?php echo esc_html( $successed_text ); ?></span>
2097
  <span class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-errors"><?php echo esc_html( $errors_text ); ?></span>
2104
  </div>
2105
 
2106
  </div>
2107
+ <?php $this->esc_description_e( $description ); ?>
2108
  </td>
2109
  </tr><?php
2110
 
2152
  $multi_ajax = json_encode( $multi_ajax );
2153
 
2154
  ?><tr valign="top">
2155
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
2156
  <td class="forminp">
2157
 
2158
  <div class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-control">
2159
+ <?php $this->esc_description_e( $description ); ?>
2160
  <button
2161
  data-resubmit="<?php echo $resubmit ? 1 : 0 ; ?>"
2162
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2163
  id="<?php echo esc_attr( $id_attribute ); ?>"
2164
  data-multi_ajax="<?php echo esc_attr( $multi_ajax ); ?>"
2165
  type="button"
2166
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-button <?php echo esc_attr( $value['class'] ); ?>"
2167
  style="<?php echo esc_attr( $value['css'] ); ?>"
2168
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2169
  <?php if ( ! empty( $confirm_message ) ) { ?>
2170
  data-confirm_message="<?php echo esc_attr( $confirm_message ); ?>"
2171
  <?php } ?>
2250
 
2251
  ?><tr valign="top">
2252
  <th scope="row" class="titledesc">
2253
+ <?php echo wp_kses_post( $tip ); ?>
2254
+ <label for="<?php echo esc_attr( $this->toggle_box_open_option ); ?>"><?php esc_html_e( 'Open Box Display', 'a3-lazy-load' ); ?></label>
2255
  </th>
2256
  <td class="forminp forminp-onoff_checkbox forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2257
  <input
2263
  type="checkbox"
2264
  value="1"
2265
  <?php checked( $option_value, 1 ); ?>
2266
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2267
+ /> <span class="description" style="margin-left:5px;"><?php esc_html_e( 'ON and each admin panel setting box OPEN | CLOSED position are saved each time changes are SAVED.', 'a3-lazy-load' ); ?></span>
2268
  </td>
2269
  </tr><?php
2270
  break;
2279
 
2280
  ?><tr valign="top">
2281
  <th scope="row" class="titledesc">
2282
+ <?php echo wp_kses_post( $tip ); ?>
2283
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2284
  </th>
2285
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2286
  <input
2287
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2288
  id="<?php echo esc_attr( $id_attribute ); ?>"
2289
  type="<?php echo esc_attr( $type ); ?>"
2290
  style="<?php echo esc_attr( $value['css'] ); ?>"
2291
  value="<?php echo esc_attr( $option_value ); ?>"
2292
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2293
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
2294
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2295
+ /> <?php $this->esc_description_e( $description ); ?>
2296
  </td>
2297
  </tr><?php
2298
  break;
2301
  case 'color' :
2302
 
2303
  if ( trim( $value['default'] ) == '' ) $value['default'] = '#515151';
 
2304
  if ( '' == trim( $option_value ) ) $option_value = 'transparent';
2305
 
2306
  ?><tr valign="top">
2307
  <th scope="row" class="titledesc">
2308
+ <?php echo wp_kses_post( $tip ); ?>
2309
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2310
  </th>
2311
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2312
  <input
2313
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2314
  id="<?php echo esc_attr( $id_attribute ); ?>"
2315
  type="text"
2316
  value="<?php echo esc_attr( $option_value ); ?>"
2317
  class="a3rev-color-picker"
2318
+ data-default-color="<?php echo esc_attr( $value['default'] ); ?>"
2319
+ /> <?php $this->esc_description_e( $description ); ?>
2320
  </td>
2321
  </tr><?php
2322
 
2329
  $enable = $option_value['enable'];
2330
 
2331
  if ( trim( $value['default']['color'] ) == '' ) $value['default']['color'] = '#515151';
 
2332
 
2333
  $color = $option_value['color'];
2334
  if ( '' == trim( $color ) ) $color = 'transparent';
2335
 
2336
  ?><tr valign="top">
2337
  <th scope="row" class="titledesc">
2338
+ <?php echo wp_kses_post( $tip ); ?>
2339
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2340
  </th>
2341
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2342
  <input
2343
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[enable]"
2344
  id="<?php echo esc_attr( $id_attribute ); ?>"
2345
  class="a3rev-ui-bg_color-enable a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
2346
+ checked_label="<?php esc_attr_e( 'ON', 'a3-lazy-load' ); ?>"
2347
+ unchecked_label="<?php esc_attr_e( 'OFF', 'a3-lazy-load' ); ?>"
2348
  type="checkbox"
2349
  value="1"
2350
  <?php checked( 1, $enable ); ?>
2351
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2352
+ /> <?php $this->esc_description_e( $description ); ?>
2353
  <div style="clear:both;"></div>
2354
  <div class="a3rev-ui-bg_color-enable-container">
2355
  <input
2356
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[color]"
2357
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
2358
  type="text"
2359
  value="<?php echo esc_attr( $color ); ?>"
2360
  class="a3rev-color-picker"
2361
+ data-default-color="<?php echo esc_attr( $value['default']['color'] ); ?>"
2362
  />
2363
  </div>
2364
  </td>
2371
 
2372
  ?><tr valign="top">
2373
  <th scope="row" class="titledesc">
2374
+ <?php echo wp_kses_post( $tip ); ?>
2375
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2376
  </th>
2377
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2378
+ <?php $this->esc_description_e( $description ); ?>
2379
 
2380
  <textarea
2381
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2382
  id="<?php echo esc_attr( $id_attribute ); ?>"
2383
  style="<?php echo esc_attr( $value['css'] ); ?>"
2384
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2385
  placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
2386
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2387
  ><?php echo esc_textarea( $option_value ); ?></textarea>
2388
  </td>
2389
  </tr><?php
2407
 
2408
  ?><tr valign="top">
2409
  <th scope="row" class="titledesc">
2410
+ <?php echo wp_kses_post( $tip ); ?>
2411
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2412
  </th>
2413
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2414
  <select
2415
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?><?php if ( $value['type'] == 'multiselect' ) echo '[]'; ?>"
2416
  id="<?php echo esc_attr( $id_attribute ); ?>"
2417
  style="<?php echo esc_attr( $value['css'] ); ?>"
2418
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2419
  data-placeholder="<?php echo esc_html( $value['placeholder'] ); ?>"
2420
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2421
  <?php if ( $value['type'] == 'multiselect' ) echo 'multiple="multiple"'; ?>
2422
  <?php if ( $is_ajax ) {
2423
  echo 'options_url="'.esc_url( $value['options_url'] ).'"';
2462
  }
2463
  }
2464
  ?>
2465
+ </select> <?php $this->esc_description_e( $description ); ?>
2466
  </td>
2467
  </tr><?php
2468
  break;
2474
 
2475
  ?><tr valign="top">
2476
  <th scope="row" class="titledesc">
2477
+ <?php echo wp_kses_post( $tip ); ?>
2478
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2479
  </th>
2480
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2481
  <fieldset>
2482
+ <?php $this->esc_description_e( $description ); ?>
2483
  <ul>
2484
  <?php
2485
  if ( is_array( $value['options'] ) && count( $value['options'] ) > 0 ) {
2487
  ?>
2488
  <li>
2489
  <label><input
2490
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2491
  value="<?php echo esc_attr( $val ); ?>"
2492
  type="radio"
2493
  style="<?php echo esc_attr( $value['css'] ); ?>"
2494
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $value['class'] ); ?>"
2495
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2496
  <?php checked( $val, $option_value ); ?>
2497
+ /> <span class="description" style="margin-left:5px;"><?php echo wp_kses_post( $text ); ?></span></label>
2498
  </li>
2499
  <?php
2500
  }
2513
 
2514
  ?><tr valign="top">
2515
  <th scope="row" class="titledesc">
2516
+ <?php echo wp_kses_post( $tip ); ?>
2517
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2518
  </th>
2519
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2520
  <fieldset>
2521
+ <?php $this->esc_description_e( $description ); ?>
2522
  <ul>
2523
  <?php
2524
  if ( is_array( $value['onoff_options'] ) && count( $value['onoff_options'] ) > 0 ) {
2530
  ?>
2531
  <li>
2532
  <input
2533
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2534
  <?php if ( $i_option['val'] == $option_value ) echo ' checkbox-disabled="true" ' ; ?>
2535
  class="a3rev-ui-onoff_radio <?php echo esc_attr( $value['class'] ); ?>"
2536
  checked_label="<?php echo esc_html( $i_option['checked_label'] ); ?>"
2538
  type="radio"
2539
  value="<?php echo esc_attr( stripslashes( $i_option['val'] ) ); ?>"
2540
  <?php checked( esc_attr( stripslashes( $i_option['val'] ) ), $option_value ); ?>
2541
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2542
+ /> <span class="description" style="margin-left:5px;"><?php echo wp_kses_post( wptexturize( $i_option['text'] ) ); ?></span>
2543
  </li>
2544
  <?php
2545
  }
2566
  if ( $value['show_if_checked'] == 'option' ) echo 'show_options_if_checked';
2567
  ?>">
2568
  <th scope="row" class="titledesc">
2569
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2570
  </th>
2571
  <td class="forminp forminp-checkbox">
2572
  <fieldset>
2582
  }
2583
 
2584
  ?>
2585
+ <legend class="screen-reader-text"><span><?php echo wp_kses_post( $value['name'] ); ?></span></legend>
2586
 
2587
  <label for="<?php echo esc_attr( $id_attribute ); ?>">
2588
  <input
2589
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2590
  id="<?php echo esc_attr( $id_attribute ); ?>"
2591
  type="checkbox"
2592
  value="<?php echo esc_attr( stripslashes( $value['checked_value'] ) ); ?>"
2593
  <?php checked( $option_value, esc_attr( stripslashes( $value['checked_value'] ) ) ); ?>
2594
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2595
+ /> <?php $this->esc_description_e( $description ); ?></label> <?php echo wp_kses_post( $tip ); ?>
2596
  <?php
2597
 
2598
  if ( ! isset( $value['checkboxgroup'] ) || ( isset( $value['checkboxgroup'] ) && $value['checkboxgroup'] == 'end' ) ) {
2618
 
2619
  ?><tr valign="top">
2620
  <th scope="row" class="titledesc">
2621
+ <?php echo wp_kses_post( $tip ); ?>
2622
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2623
  </th>
2624
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2625
  <input
2626
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2627
  id="<?php echo esc_attr( $id_attribute ); ?>"
2628
  class="a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
2629
  checked_label="<?php echo esc_html( $value['checked_label'] ); ?>"
2631
  type="checkbox"
2632
  value="<?php echo esc_attr( stripslashes( $value['checked_value'] ) ); ?>"
2633
  <?php checked( $option_value, esc_attr( stripslashes( $value['checked_value'] ) ) ); ?>
2634
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2635
+ /> <?php $this->esc_description_e( $description ); ?>
2636
  </td>
2637
  </tr><?php
2638
 
2647
 
2648
  ?><tr valign="top">
2649
  <th scope="row" class="titledesc">
2650
+ <?php echo wp_kses_post( $tip ); ?>
2651
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
2652
  </th>
2653
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2654
  <input
2655
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
2656
  id="<?php echo esc_attr( $id_attribute ); ?>"
2657
  class="a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
2658
  checked_label="<?php echo esc_html( $value['checked_label'] ); ?>"
2660
  type="checkbox"
2661
  value="<?php echo esc_attr( stripslashes( $value['checked_value'] ) ); ?>"
2662
  <?php checked( $option_value, esc_attr( stripslashes( $value['checked_value'] ) ) ); ?>
2663
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2664
+ /> <?php $this->esc_description_e( $description ); ?>
2665
  </td>
2666
  </tr><?php
2667
 
2672
 
2673
  $width = $option_value['width'];
2674
  $height = $option_value['height'];
 
2675
 
2676
  ?><tr valign="top">
2677
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
2678
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
2679
 
2680
+ <label><?php esc_html_e( 'Width', 'a3-lazy-load' ); ?> <input name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[width]" id="<?php echo esc_attr( $id_attribute ); ?>-width" type="text" class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-width" value="<?php echo esc_attr( $width ); ?>" /></label>
2681
 
2682
+ <label><?php esc_html_e( 'Height', 'a3-lazy-load' ); ?> <input name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[height]" id="<?php echo esc_attr( $id_attribute ); ?>-height" type="text" class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-height" value="<?php echo esc_attr( $height ); ?>" /></label>
2683
 
2684
+ <label><?php esc_html_e( 'Hard Crop', 'a3-lazy-load' ); ?> <input name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[crop]" id="<?php echo esc_attr( $id_attribute ); ?>-crop" type="checkbox" class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-crop" <?php echo checked( 1, $option_value['crop'], false ); ?> /></label>
2685
 
2686
  </td>
2687
  </tr><?php
2709
  $args = wp_parse_args( $value['args'], $args );
2710
 
2711
  ?><tr valign="top">
2712
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
2713
  <td class="forminp">
2714
+ <?php echo str_replace(' id=', " data-placeholder='" . esc_html( $value['placeholder'] ) . "' style='" . esc_attr( $value['css'] ) . "' class='" . esc_attr( $value['class'] ) . "' id=", wp_dropdown_pages( $args ) ); ?> <?php $this->esc_description_e( $description ); ?>
2715
  </td>
2716
  </tr><?php
2717
  break;
2719
  // Font Control
2720
  case 'typography':
2721
 
 
 
2722
  if ( ! isset( $option_value['line_height'] ) ) {
2723
  $option_value['line_height'] = '1.4em';
2724
  }
2730
  $color = $option_value['color'];
2731
 
2732
  ?><tr valign="top">
2733
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
2734
  <td class="forminp">
2735
+ <?php $this->esc_description_e( $description ); ?>
2736
  <div class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-control">
2737
  <!-- Font Size -->
2738
  <select
2739
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[size]"
2740
  id="<?php echo esc_attr( $id_attribute ); ?>-size"
2741
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-size chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2742
  >
2752
  </select>
2753
  <!-- Line Height -->
2754
  <select
2755
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[line_height]"
2756
  id="<?php echo esc_attr( $id_attribute ); ?>-line_height"
2757
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-line_height chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2758
  >
2768
  </select>
2769
  <!-- Font Face -->
2770
  <select
2771
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[face]"
2772
  id="<?php echo esc_attr( $id_attribute ); ?>-face"
2773
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-face chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2774
  >
2775
+ <optgroup label="<?php esc_attr_e( '-- Default Fonts --', 'a3-lazy-load' ); ?>">
2776
  <?php
2777
  foreach ( $GLOBALS[$this->plugin_prefix.'fonts_face']->get_default_fonts() as $val => $text ) {
2778
  ?>
2783
  }
2784
  ?>
2785
  </optgroup>
2786
+ <optgroup label="<?php esc_attr_e( '-- Google Fonts --', 'a3-lazy-load' ); ?>">
2787
  <?php
2788
  foreach ( $GLOBALS[$this->plugin_prefix.'fonts_face']->get_google_fonts() as $font ) {
2789
  ?>
2798
 
2799
  <!-- Font Weight -->
2800
  <select
2801
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[style]"
2802
  id="<?php echo esc_attr( $id_attribute ); ?>-style"
2803
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-style chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2804
  >
2815
 
2816
  <!-- Font Color -->
2817
  <input
2818
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[color]"
2819
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
2820
  type="text"
2821
  value="<?php echo esc_attr( $color ); ?>"
2822
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>-color a3rev-color-picker"
2823
+ data-default-color="<?php echo esc_attr( $value['default']['color'] ); ?>"
2824
  />
2825
 
2826
  <!-- Preview Button -->
2827
+ <div class="a3rev-ui-typography-preview"><a href="#" class="a3rev-ui-typography-preview-button button submit-button" title="<?php esc_attr_e( 'Preview your customized typography settings', 'a3-lazy-load'); ?>"><span>&nbsp;</span></a></div>
2828
 
2829
  </div>
2830
 
2839
  if ( ! is_array( $value['default'] ) ) $value['default'] = array();
2840
 
2841
  // For Border Styles
 
2842
 
2843
  $width = $option_value['width'];
2844
  $style = $option_value['style'];
2883
  $bottom_right_corner = intval( $bottom_right_corner );
2884
 
2885
  ?><tr valign="top">
2886
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
2887
  <td class="forminp forminp-border_corner">
2888
+ <?php $this->esc_description_e( $description ); ?>
2889
  <div class="a3rev-ui-settings-control">
2890
  <!-- Border Width -->
2891
  <select
2892
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[width]"
2893
  id="<?php echo esc_attr( $id_attribute ); ?>-width"
2894
  class="a3rev-ui-border_styles-width chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2895
  >
2906
 
2907
  <!-- Border Style -->
2908
  <select
2909
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[style]"
2910
  id="<?php echo esc_attr( $id_attribute ); ?>-style"
2911
  class="a3rev-ui-border_styles-style chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
2912
  >
2923
 
2924
  <!-- Border Color -->
2925
  <input
2926
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[color]"
2927
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
2928
  type="text"
2929
  value="<?php echo esc_attr( $color ); ?>"
2930
  class="a3rev-ui-border_styles-color a3rev-color-picker"
2931
+ data-default-color="<?php echo esc_attr( $value['default']['color'] ); ?>"
2932
  />
2933
 
2934
  <!-- Preview Button -->
2935
+ <div class="a3rev-ui-settings-preview"><a href="#" class="a3rev-ui-border-preview-button a3rev-ui-settings-preview-button button submit-button" title="<?php esc_attr_e( 'Preview your customized border settings', 'a3-lazy-load' ); ?>"><span>&nbsp;</span></a></div>
2936
+ <span class="description" style="margin-left:5px;"><?php esc_html_e( '0px = No Border', 'a3-lazy-load' ); ?></span>
2937
  <div style="clear:both; margin-bottom:10px"></div>
2938
 
2939
  <!-- Border Corner : Rounded or Square -->
2940
  <input
2941
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[corner]"
2942
  id="<?php echo esc_attr( $id_attribute ); ?>"
2943
  class="a3rev-ui-border-corner a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
2944
+ checked_label="<?php esc_attr_e( 'Rounded', 'a3-lazy-load' ); ?>"
2945
+ unchecked_label="<?php esc_attr_e( 'Square', 'a3-lazy-load' ); ?>"
2946
  type="checkbox"
2947
  value="rounded"
2948
  <?php checked( 'rounded', $corner ); ?>
2949
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
2950
  />
2951
 
2952
  <!-- Border Rounded Value -->
2953
  <div class="a3rev-ui-border-corner-value-container">
2954
  <div class="a3rev-ui-border_corner-top_left">
2955
+ <span class="a3rev-ui-border_corner-span"><?php esc_html_e( 'Top Left Corner', 'a3-lazy-load' ); ?></span>
2956
  <div class="a3rev-ui-slide-container">
2957
  <div class="a3rev-ui-slide-container-start">
2958
  <div class="a3rev-ui-slide-container-end">
2962
  <div class="a3rev-ui-slide-result-container">
2963
  <input
2964
  readonly="readonly"
2965
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[top_left_corner]"
2966
  id="<?php echo esc_attr( $id_attribute ); ?>-top_left_corner"
2967
  type="text"
2968
  value="<?php echo esc_attr( $top_left_corner ); ?>"
2972
  </div>
2973
  </div>
2974
  <div class="a3rev-ui-border_corner-top_right">
2975
+ <span class="a3rev-ui-border_corner-span"><?php esc_html_e( 'Top Right Corner', 'a3-lazy-load' ); ?></span>
2976
  <div class="a3rev-ui-slide-container">
2977
  <div class="a3rev-ui-slide-container-start">
2978
  <div class="a3rev-ui-slide-container-end">
2982
  <div class="a3rev-ui-slide-result-container">
2983
  <input
2984
  readonly="readonly"
2985
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[top_right_corner]"
2986
  id="<?php echo esc_attr( $id_attribute ); ?>-top_right_corner"
2987
  type="text"
2988
  value="<?php echo esc_attr( $top_right_corner ); ?>"
2992
  </div>
2993
  </div>
2994
  <div class="a3rev-ui-border_corner-bottom_right">
2995
+ <span class="a3rev-ui-border_corner-span"><?php esc_html_e( 'Bottom Right Corner', 'a3-lazy-load' ); ?></span>
2996
  <div class="a3rev-ui-slide-container">
2997
  <div class="a3rev-ui-slide-container-start">
2998
  <div class="a3rev-ui-slide-container-end">
3002
  <div class="a3rev-ui-slide-result-container">
3003
  <input
3004
  readonly="readonly"
3005
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[bottom_right_corner]"
3006
  id="<?php echo esc_attr( $id_attribute ); ?>-bottom_right_corner"
3007
  type="text"
3008
  value="<?php echo esc_attr( $bottom_right_corner ); ?>"
3012
  </div>
3013
  </div>
3014
  <div class="a3rev-ui-border_corner-bottom_left">
3015
+ <span class="a3rev-ui-border_corner-span"><?php esc_html_e( 'Bottom Left Corner', 'a3-lazy-load' ); ?></span>
3016
  <div class="a3rev-ui-slide-container">
3017
  <div class="a3rev-ui-slide-container-start">
3018
  <div class="a3rev-ui-slide-container-end">
3022
  <div class="a3rev-ui-slide-result-container">
3023
  <input
3024
  readonly="readonly"
3025
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[bottom_left_corner]"
3026
  id="<?php echo esc_attr( $id_attribute ); ?>-bottom_left_corner"
3027
  type="text"
3028
  value="<?php echo esc_attr( $bottom_left_corner ); ?>"
3042
 
3043
  // Border Style Control
3044
  case 'border_styles':
3045
+
 
 
3046
  $width = $option_value['width'];
3047
  $style = $option_value['style'];
3048
  $color = $option_value['color'];
3049
 
3050
  ?><tr valign="top">
3051
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
3052
  <td class="forminp">
3053
+ <?php $this->esc_description_e( $description ); ?>
3054
  <div class="a3rev-ui-settings-control">
3055
  <!-- Border Width -->
3056
  <select
3057
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[width]"
3058
  id="<?php echo esc_attr( $id_attribute ); ?>-width"
3059
  class="a3rev-ui-border_styles-width chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3060
  >
3071
 
3072
  <!-- Border Style -->
3073
  <select
3074
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[style]"
3075
  id="<?php echo esc_attr( $id_attribute ); ?>-style"
3076
  class="a3rev-ui-border_styles-style chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3077
  >
3088
 
3089
  <!-- Border Color -->
3090
  <input
3091
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[color]"
3092
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
3093
  type="text"
3094
  value="<?php echo esc_attr( $color ); ?>"
3095
  class="a3rev-ui-border_styles-color a3rev-color-picker"
3096
+ data-default-color="<?php echo esc_attr( $value['default']['color'] ); ?>"
3097
  />
3098
 
3099
  <!-- Preview Button -->
3100
+ <div class="a3rev-ui-settings-preview"><a href="#" class="a3rev-ui-border-preview-button a3rev-ui-settings-preview-button button submit-button" title="<?php esc_attr_e( 'Preview your customized border styles settings', 'a3-lazy-load' ); ?>"><span>&nbsp;</span></a></div>
3101
+ <span class="description" style="margin-left:5px;"><?php esc_html_e( '0px = No Border', 'a3-lazy-load' ); ?></span>
3102
  </div>
3103
 
3104
  </td>
3147
  $bottom_right_corner = intval( $bottom_right_corner );
3148
 
3149
  ?><tr valign="top">
3150
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
3151
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3152
  <div class="a3rev-ui-settings-control">
3153
  <!-- Border Corner : Rounded or Square -->
3154
  <input
3155
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[corner]"
3156
  id="<?php echo esc_attr( $id_attribute ); ?>"
3157
  class="a3rev-ui-border-corner a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
3158
+ checked_label="<?php esc_attr_e( 'Rounded', 'a3-lazy-load' ); ?>"
3159
+ unchecked_label="<?php esc_attr_e( 'Square', 'a3-lazy-load' ); ?>"
3160
  type="checkbox"
3161
  value="rounded"
3162
  <?php checked( 'rounded', $corner ); ?>
3163
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
3164
  />
3165
 
3166
  <!-- Preview Button -->
3167
+ <div class="a3rev-ui-settings-preview"><a href="#" class="a3rev-ui-border-preview-button a3rev-ui-settings-preview-button button submit-button" title="<?php esc_attr_e( 'Preview your customized border settings', 'a3-lazy-load' ); ?>"><span>&nbsp;</span></a></div>
3168
+ <?php $this->esc_description_e( $description ); ?>
3169
  <!-- Border Rounded Value -->
3170
  <div class="a3rev-ui-border-corner-value-container">
3171
  <div class="a3rev-ui-border_corner-top_left">
3172
+ <span class="a3rev-ui-border_corner-span"><?php esc_html_e( 'Top Left Corner', 'a3-lazy-load' ); ?></span>
3173
  <div class="a3rev-ui-slide-container">
3174
  <div class="a3rev-ui-slide-container-start">
3175
  <div class="a3rev-ui-slide-container-end">
3179
  <div class="a3rev-ui-slide-result-container">
3180
  <input
3181
  readonly="readonly"
3182
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[top_left_corner]"
3183
  id="<?php echo esc_attr( $id_attribute ); ?>-top_left_corner"
3184
  type="text"
3185
  value="<?php echo esc_attr( $top_left_corner ); ?>"
3189
  </div>
3190
  </div>
3191
  <div class="a3rev-ui-border_corner-top_right">
3192
+ <span class="a3rev-ui-border_corner-span"><?php esc_html_e( 'Top Right Corner', 'a3-lazy-load' ); ?></span>
3193
  <div class="a3rev-ui-slide-container">
3194
  <div class="a3rev-ui-slide-container-start">
3195
  <div class="a3rev-ui-slide-container-end">
3199
  <div class="a3rev-ui-slide-result-container">
3200
  <input
3201
  readonly="readonly"
3202
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[top_right_corner]"
3203
  id="<?php echo esc_attr( $id_attribute ); ?>-top_right_corner"
3204
  type="text"
3205
  value="<?php echo esc_attr( $top_right_corner ); ?>"
3209
  </div>
3210
  </div>
3211
  <div class="a3rev-ui-border_corner-bottom_right">
3212
+ <span class="a3rev-ui-border_corner-span"><?php esc_html_e( 'Bottom Right Corner', 'a3-lazy-load' ); ?></span>
3213
  <div class="a3rev-ui-slide-container">
3214
  <div class="a3rev-ui-slide-container-start">
3215
  <div class="a3rev-ui-slide-container-end">
3219
  <div class="a3rev-ui-slide-result-container">
3220
  <input
3221
  readonly="readonly"
3222
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[bottom_right_corner]"
3223
  id="<?php echo esc_attr( $id_attribute ); ?>-bottom_right_corner"
3224
  type="text"
3225
  value="<?php echo esc_attr( $bottom_right_corner ); ?>"
3229
  </div>
3230
  </div>
3231
  <div class="a3rev-ui-border_corner-bottom_left">
3232
+ <span class="a3rev-ui-border_corner-span"><?php esc_html_e( 'Bottom Left Corner', 'a3-lazy-load' ); ?></span>
3233
  <div class="a3rev-ui-slide-container">
3234
  <div class="a3rev-ui-slide-container-start">
3235
  <div class="a3rev-ui-slide-container-end">
3239
  <div class="a3rev-ui-slide-result-container">
3240
  <input
3241
  readonly="readonly"
3242
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[bottom_left_corner]"
3243
  id="<?php echo esc_attr( $id_attribute ); ?>-bottom_left_corner"
3244
  type="text"
3245
  value="<?php echo esc_attr( $bottom_left_corner ); ?>"
3259
 
3260
  // Box Shadow Control
3261
  case 'box_shadow':
3262
+
 
 
3263
  if ( ! isset( $option_value['enable'] ) ) $option_value['enable'] = 0;
3264
  $enable = $option_value['enable'];
3265
  if ( ! isset( $option_value['inset'] ) ) $option_value['inset'] = '';
3271
  $inset = $option_value['inset'];
3272
 
3273
  ?><tr valign="top">
3274
+ <th scope="row" class="titledesc"><?php echo wp_kses_post( $tip ); ?><?php echo wp_kses_post( $value['name'] ); ?></th>
3275
  <td class="forminp forminp-box_shadow">
3276
  <input
3277
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[enable]"
3278
  id="<?php echo esc_attr( $id_attribute ); ?>"
3279
  class="a3rev-ui-box_shadow-enable a3rev-ui-onoff_checkbox <?php echo esc_attr( $value['class'] ); ?>"
3280
+ checked_label="<?php esc_attr_e( 'ON', 'a3-lazy-load' ); ?>"
3281
+ unchecked_label="<?php esc_attr_e( 'OFF', 'a3-lazy-load' ); ?>"
3282
  type="checkbox"
3283
  value="1"
3284
  <?php checked( 1, $enable ); ?>
3285
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
3286
  />
3287
+ <?php $this->esc_description_e( $description ); ?>
3288
  <div style="clear:both;"></div>
3289
  <div class="a3rev-ui-box_shadow-enable-container">
3290
  <div class="a3rev-ui-settings-control">
3291
  <!-- Box Horizontal Shadow Size -->
3292
  <select
3293
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[h_shadow]"
3294
  id="<?php echo esc_attr( $id_attribute ); ?>-h_shadow"
3295
  class="a3rev-ui-box_shadow-h_shadow chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3296
+ data-placeholder="<?php esc_attr_e( 'Horizontal Shadow', 'a3-lazy-load' ); ?>"
3297
  >
3298
  <?php
3299
  for ( $i = -20; $i <= 20; $i++ ) {
3308
 
3309
  <!-- Box Vertical Shadow Size -->
3310
  <select
3311
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[v_shadow]"
3312
  id="<?php echo esc_attr( $id_attribute ); ?>-v_shadow"
3313
  class="a3rev-ui-box_shadow-v_shadow chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3314
+ data-placeholder="<?php esc_attr_e( 'Vertical Shadow', 'a3-lazy-load' ); ?>"
3315
  >
3316
  <?php
3317
  for ( $i = -20; $i <= 20; $i++ ) {
3326
 
3327
  <!-- Box Blur Distance -->
3328
  <select
3329
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[blur]"
3330
  id="<?php echo esc_attr( $id_attribute ); ?>-blur"
3331
  class="a3rev-ui-box_shadow-blur chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3332
+ data-placeholder="<?php esc_attr_e( 'Blur Distance', 'a3-lazy-load' ); ?>"
3333
  >
3334
  <?php
3335
  for ( $i = 0; $i <= 20; $i++ ) {
3344
 
3345
  <!-- Box Spread -->
3346
  <select
3347
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[spread]"
3348
  id="<?php echo esc_attr( $id_attribute ); ?>-spread"
3349
  class="a3rev-ui-box_shadow-spread chzn-select <?php if ( is_rtl() ) { echo 'chzn-rtl'; } ?>"
3350
+ data-placeholder="<?php esc_attr_e( 'Spread Size', 'a3-lazy-load' ); ?>"
3351
  >
3352
  <?php
3353
  for ( $i = 0; $i <= 20; $i++ ) {
3362
 
3363
  <!-- Box Shadow Inset -->
3364
  <input
3365
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[inset]"
3366
  id="<?php echo esc_attr( $id_attribute ); ?>"
3367
  class="a3rev-ui-box_shadow-inset a3rev-ui-onoff_checkbox"
3368
+ checked_label="<?php esc_attr_e( 'INNER', 'a3-lazy-load' ); ?>"
3369
+ unchecked_label="<?php esc_attr_e( 'OUTER', 'a3-lazy-load' ); ?>"
3370
  type="checkbox"
3371
  value="inset"
3372
  <?php checked( 'inset', $inset ); ?>
3373
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
3374
  />
3375
 
3376
  <!-- Box Shadow Color -->
3377
  <input
3378
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); ?>[color]"
3379
  id="<?php echo esc_attr( $id_attribute ); ?>-color"
3380
  type="text"
3381
  value="<?php echo esc_attr( $color ); ?>"
3382
  class="a3rev-ui-box_shadow-color a3rev-color-picker"
3383
+ data-default-color="<?php echo esc_attr( $value['default']['color'] ); ?>"
3384
  />
3385
 
3386
  <!-- Preview Button -->
3387
+ <div class="a3rev-ui-settings-preview"><a href="#" class="a3rev-ui-box_shadow-preview-button a3rev-ui-settings-preview-button button submit-button" title="<?php esc_attr_e( 'Preview your customized box shadow settings', 'a3-lazy-load'); ?>"><span>&nbsp;</span></a></div>
3388
  </div>
3389
  <div style="clear:both;"></div>
3390
  </div>
3404
 
3405
  ?><tr valign="top">
3406
  <th scope="row" class="titledesc">
3407
+ <?php echo wp_kses_post( $tip ); ?>
3408
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
3409
  </th>
3410
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3411
  <div class="a3rev-ui-slide-container">
3415
  <div class="a3rev-ui-slide-result-container">
3416
  <input
3417
  readonly="readonly"
3418
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
3419
  id="<?php echo esc_attr( $id_attribute ); ?>"
3420
  type="text"
3421
  value="<?php echo esc_attr( $option_value ); ?>"
3422
  class="a3rev-ui-slider"
3423
+ <?php $this->esc_attribute_array_e( $custom_attributes ); // WPCS: XSS ok. ?>
3424
+ /> <?php $this->esc_description_e( $description ); ?>
3425
  </div>
3426
  </div>
3427
  </td>
3448
 
3449
  ?><tr valign="top">
3450
  <th scope="row" class="titledesc">
3451
+ <?php echo wp_kses_post( $tip ); ?>
3452
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
3453
  </th>
3454
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3455
+ <?php $this->esc_description_e( $description ); ?>
3456
+ <?php $this->esc_attribute_name_e( $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 ) );?>
3457
  </td>
3458
  </tr><?php
3459
 
3466
 
3467
  ?><tr valign="top">
3468
  <th scope="row" class="titledesc">
3469
+ <?php echo wp_kses_post( $tip ); ?>
3470
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
3471
  </th>
3472
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3473
+ <?php $this->esc_description_e( $description ); ?>
3474
  <?php remove_all_filters('mce_external_plugins'); ?>
3475
  <?php wp_editor( $option_value,
3476
  $id_attribute,
3490
 
3491
  ?><tr valign="top">
3492
  <th scope="row" class="titledesc">
3493
+ <?php echo wp_kses_post( $tip ); ?>
3494
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
3495
  </th>
3496
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3497
+ <?php $this->esc_description_e( $description ); ?>
3498
  <div class="a3rev-ui-array_textfields-container">
3499
  <?php
3500
  foreach ( $value['ids'] as $text_field ) {
3551
  }
3552
  ?>
3553
  <label><input
3554
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
3555
  id="<?php echo esc_attr( $id_attribute ); ?>"
3556
  type="text"
3557
  style="<?php echo esc_attr( $text_field['css'] ); ?>"
3558
  value="<?php echo esc_attr( $option_value ); ?>"
3559
  class="a3rev-ui-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?> <?php echo esc_attr( $text_field['class'] ); ?>"
3560
+ /> <span><?php echo wp_kses_post( $text_field['name'] ); ?></span></label>
3561
  <?php
3562
  }
3563
  ?>
3571
  // Time Picker Control
3572
  case 'time_picker':
3573
 
3574
+ $class = 'a3rev-ui-' . sanitize_title( $value['type'] ) . ' ' . $value['class'];
3575
 
3576
  ?><tr valign="top">
3577
  <th scope="row" class="titledesc">
3578
+ <?php echo wp_kses_post( $tip ); ?>
3579
+ <label for="<?php echo esc_attr( $id_attribute ); ?>"><?php echo wp_kses_post( $value['name'] ); ?></label>
3580
  </th>
3581
  <td class="forminp forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">
3582
  <input
3583
  readonly="readonly"
3584
+ name="<?php $this->esc_attribute_name_e( $name_attribute ); // WPCS: XSS ok. ?>"
3585
  id="<?php echo esc_attr( $id_attribute ); ?>"
3586
  type="text"
3587
  value="<?php echo esc_attr( $option_value ); ?>"
3588
+ class="<?php echo esc_attr( $class ); ?>"
3589
  <?php if ( ! empty( $value['time_step'] ) ) { ?>data-time_step="<?php echo esc_attr( $value['time_step'] ); ?>"<?php } ?>
3590
  <?php if ( ! empty( $value['time_min'] ) ) { ?>data-time_min="<?php echo esc_attr( $value['time_min'] ); ?>"<?php } ?>
3591
  <?php if ( ! empty( $value['time_max'] ) ) { ?>data-time_max="<?php echo esc_attr( $value['time_max'] ); ?>"<?php } ?>
3592
  <?php if ( ! empty( $value['time_allow'] ) ) { ?>data-time_max="<?php echo esc_attr( $value['time_allow'] ); ?>"<?php } ?>
3593
+ /> <?php $this->esc_description_e( $description ); ?>
3594
  </td>
3595
  </tr><?php
3596
 
3686
  </div> <!-- Close Panel Row -->
3687
  <?php do_action( $this->plugin_name . '-' . trim( $form_key ) . '_settings_end' ); ?>
3688
  <p class="submit">
3689
+ <?php wp_nonce_field( 'save_settings_'. $this->plugin_name ); ?>
3690
+ <input type="submit" value="<?php esc_attr_e('Save changes', 'a3-lazy-load'); ?>" class="button button-primary" name="bt_save_settings" />
3691
+ <input type="submit" name="bt_reset_settings" class="button" value="<?php esc_attr_e('Reset Settings', 'a3-lazy-load'); ?>" />
3692
  <input type="hidden" name="form_name_action" value="<?php echo esc_attr( $form_key ); ?>" />
3693
  <input type="hidden" class="last_tab" name="subtab" value="#<?php echo esc_attr( $current_subtab ); ?>" />
3694
  </p>
3776
  // open box handle
3777
  echo '<div data-form-key="custom-boxes" data-box-id="'. esc_attr( $heading_box_id ) .'" class="a3rev_panel_box_handle" >' . "\n\n";
3778
 
3779
+ echo ( ! empty( $options['name'] ) ) ? '<h3 class="a3-plugin-ui-panel-box '. esc_attr( $toggle_box_class ) . ' ' . esc_attr( $opened_class ) . '">'. wp_kses_post( $options['name'] ) .' '. wp_kses_post( wptexturize( $view_doc ) ) .'</h3>' : '';
3780
 
3781
  if ( stristr( $options['class'], 'pro_feature_fields' ) !== false && ! empty( $options['id'] ) ) $this->upgrade_top_message( true, sanitize_title( $options['id'] ) );
3782
  elseif ( stristr( $options['class'], 'pro_feature_fields' ) !== false ) $this->upgrade_top_message( true );
3785
  echo '</div>' . "\n\n";
3786
 
3787
  // open box inside
3788
+ echo '<div id="'. esc_attr( $options['id'] ) . '_box_inside" class="a3rev_panel_box_inside '. esc_attr( $opened_class) .'" style="padding-top: 10px;" >' . "\n\n";
3789
 
3790
  echo '<div class="a3rev_panel_inner">' . "\n\n";
3791
 
3794
  if ( stristr( $options['class'], 'pro_feature_fields' ) !== false && ! empty( $options['id'] ) ) $this->upgrade_top_message( true, sanitize_title( $options['id'] ) );
3795
  elseif ( stristr( $options['class'], 'pro_feature_fields' ) !== false ) $this->upgrade_top_message( true );
3796
 
3797
+ echo ( ! empty( $options['name'] ) ) ? '<h3>'. wp_kses_post( $options['name'] ) .' '. wp_kses_post( wptexturize( $view_doc ) ) .'</h3>' : '';
3798
  }
3799
 
3800
  if ( ! empty( $options['desc'] ) ) {
3801
  echo '<div class="a3rev_panel_box_description" >' . "\n\n";
3802
+ echo wp_kses_post( wpautop( wptexturize( $options['desc'] ) ) );
3803
  echo '</div>' . "\n\n";
3804
  }
3805
 
3806
+ echo wptexturize( $settings_html );
3807
 
3808
  echo '</div>';
3809
 
3829
  return $values;
3830
  }
3831
 
3832
+ /*-----------------------------------------------------------------------------------*/
3833
+ /* Escape for an attribute array before echo */
3834
+ /*-----------------------------------------------------------------------------------*/
3835
+ private function esc_attribute_array_e( $attributes = array() ) {
3836
+ if ( empty( $attributes ) ) {
3837
+ echo '';
3838
+ return true;
3839
+ }
3840
+
3841
+ if ( ! is_array( $attributes ) ) {
3842
+ $attributes = array( $attributes );
3843
+ }
3844
+
3845
+ foreach ( $attributes as $attribute => $attribute_value ) {
3846
+ echo ( esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '" ' );
3847
+ }
3848
+ }
3849
+
3850
+ /*-----------------------------------------------------------------------------------*/
3851
+ /* Escape for attribute name */
3852
+ /*-----------------------------------------------------------------------------------*/
3853
+ private function esc_attribute_name__( $attribute_name = '', $forced_escape = false ) {
3854
+ if ( empty( $attribute_name ) ) {
3855
+ return '';
3856
+ } elseif ( $forced_escape ) {
3857
+ return esc_attr( $attribute_name );
3858
+ } else {
3859
+ return $attribute_name;
3860
+ }
3861
+ }
3862
+
3863
+ /*-----------------------------------------------------------------------------------*/
3864
+ /* Escape for attribute name before echo */
3865
+ /*-----------------------------------------------------------------------------------*/
3866
+ private function esc_attribute_name_e( $attribute_name = '', $forced_escape = false ) {
3867
+ echo $this->esc_attribute_name__( $attribute_name, $forced_escape );
3868
+ }
3869
+
3870
+ /*-----------------------------------------------------------------------------------*/
3871
+ /* Escape for description allow some html before echo */
3872
+ /*-----------------------------------------------------------------------------------*/
3873
+ private function esc_description_e( $description = '' ) {
3874
+ if ( empty( $description ) ) {
3875
+ echo '';
3876
+ return true;
3877
+ }
3878
+
3879
+ $allowedposttags = array();
3880
+ if ( function_exists( 'wp_kses_allowed_html' ) ) {
3881
+ $allowedposttags = wp_kses_allowed_html();
3882
+ }
3883
+
3884
+ $allowed_html = array_merge( $allowedposttags,
3885
+ array(
3886
+ 'input' => array(
3887
+ 'type' => array(),
3888
+ 'class' => array(),
3889
+ 'id' => array(),
3890
+ 'name' => array(),
3891
+ 'value' => array(),
3892
+ 'style =' => array(),
3893
+ )
3894
+ )
3895
+ );
3896
+
3897
+ echo wp_kses( $description, $allowed_html );
3898
+ }
3899
+
3900
  /*-----------------------------------------------------------------------------------*/
3901
  /* hextorgb() */
3902
  /* Convert Hex to RGB for color */
3937
  public function generate_border_css( $option ) {
3938
 
3939
  $border_css = '';
3940
+
3941
+ if ( empty( $option['width'] ) || '0px' == $option['width'] ) {
3942
+ $border_css .= 'border: none !important;';
3943
+ } else {
3944
+ $border_css .= 'border: ' . esc_attr( $option['width'] ) . ' ' . esc_attr( $option['style'] ) . ' ' . esc_attr( $option['color'] ) .' !important;';
3945
+ }
3946
 
3947
  if ( isset( $option['corner'] ) && esc_attr( $option['corner'] ) == 'rounded' ) {
3948
  if ( ! isset( $option['rounded_value'] ) ) $option['rounded_value'] = 0;
3960
  $border_css .= '-webkit-border-radius: 0px !important;';
3961
  }
3962
 
3963
+ return apply_filters( $this->plugin_name . '_generate_border_css', $border_css, $option );
 
3964
  }
3965
 
3966
  /*-----------------------------------------------------------------------------------*/
3970
  public function generate_border_style_css( $option ) {
3971
 
3972
  $border_style_css = '';
3973
+
3974
+ if ( empty( $option['width'] ) || '0px' == $option['width'] ) {
3975
+ $border_style_css .= 'border: none !important;';
3976
+ } else {
3977
+ $border_style_css .= 'border: ' . esc_attr( $option['width'] ) . ' ' . esc_attr( $option['style'] ) . ' ' . esc_attr( $option['color'] ) .' !important;';
3978
+ }
3979
 
3980
+ return apply_filters( $this->plugin_name . '_generate_border_style_css', $border_style_css, $option );
 
 
 
3981
  }
3982
 
3983
  /*-----------------------------------------------------------------------------------*/
4004
  $border_corner_css .= '-webkit-border-radius: 0px !important;';
4005
  }
4006
 
4007
+ return apply_filters( $this->plugin_name . '_generate_border_corner_css', $border_corner_css, $option );
 
4008
  }
4009
 
4010
  /*-----------------------------------------------------------------------------------*/
4026
  $shadow_css .= '-webkit-box-shadow: none !important ;';
4027
  }
4028
 
4029
+ return apply_filters( $this->plugin_name . '_generate_shadow_css', $shadow_css, $option );
 
4030
  }
4031
 
4032
  /*-----------------------------------------------------------------------------------*/
4055
  $return_css .= 'background-color: transparent !important ;';
4056
  }
4057
 
4058
+ return apply_filters( $this->plugin_name . '_generate_background_color_css', $return_css, $option, $transparency );
 
4059
  }
4060
 
4061
  }
admin/admin-ui.php CHANGED
@@ -33,7 +33,7 @@ class Admin_UI
33
  * You must change to correct plugin name that you are working
34
  */
35
 
36
- public $framework_version = '2.5.0';
37
  public $plugin_name = A3_LAZY_LOAD_KEY;
38
  public $plugin_path = A3_LAZY_LOAD_NAME;
39
  public $google_api_key_option = '';
@@ -87,8 +87,6 @@ class Admin_UI
87
  }
88
 
89
  $this->support_url = 'https://wordpress.org/support/plugin/a3-lazy-load/';
90
-
91
- $this->update_google_map_api_key();
92
  }
93
 
94
 
@@ -182,13 +180,20 @@ class Admin_UI
182
  }
183
 
184
  public function update_google_map_api_key() {
 
 
 
 
 
 
185
  // Enable Google Map API Key
186
  if ( isset( $_POST[ $this->google_map_api_key_option . '_enable' ] ) ) {
 
187
  $old_google_map_api_key_enable = get_option( $this->google_map_api_key_option . '_enable', 0 );
188
 
189
  update_option( $this->google_map_api_key_option . '_enable', 1 );
190
 
191
- $option_value = trim( sanitize_text_field( $_POST[ $this->google_map_api_key_option ] ) );
192
  update_option( $this->google_map_api_key_option, $option_value );
193
 
194
  if ( 1 != $old_google_map_api_key_enable ) {
@@ -203,7 +208,7 @@ class Admin_UI
203
 
204
  update_option( $this->google_map_api_key_option . '_enable', 0 );
205
 
206
- $option_value = trim( sanitize_text_field( $_POST[ $this->google_map_api_key_option ] ) );
207
  update_option( $this->google_map_api_key_option, $option_value );
208
 
209
  if ( 0 != $old_google_map_api_key_enable ) {
@@ -254,7 +259,7 @@ class Admin_UI
254
  $output = apply_filters( $this->plugin_name . '_plugin_premium_video', $output );
255
 
256
  if ( $echo )
257
- echo $output;
258
  else
259
  return $output;
260
  }
@@ -275,7 +280,7 @@ class Admin_UI
275
  $output .= '</div>';
276
 
277
  if ( $echo )
278
- echo $output;
279
  else
280
  return $output;
281
  }
@@ -293,7 +298,7 @@ class Admin_UI
293
  }
294
 
295
  if ( $echo )
296
- echo $output;
297
  else
298
  return $output;
299
  }
@@ -327,7 +332,7 @@ class Admin_UI
327
  }
328
 
329
  if ( $echo )
330
- echo $output;
331
  else
332
  return $output;
333
  }
@@ -364,7 +369,7 @@ class Admin_UI
364
  $output = apply_filters( $this->plugin_name . '_plugin_extension_end', $output );
365
 
366
  if ( $echo )
367
- echo $output;
368
  else
369
  return $output;
370
 
@@ -384,7 +389,7 @@ class Admin_UI
384
 
385
  $upgrade_top_message = apply_filters( $this->plugin_name . '_upgrade_top_message', $upgrade_top_message, $setting_id );
386
 
387
- if ( $echo ) echo $upgrade_top_message;
388
  else return $upgrade_top_message;
389
 
390
  }
33
  * You must change to correct plugin name that you are working
34
  */
35
 
36
+ public $framework_version = '2.6.0';
37
  public $plugin_name = A3_LAZY_LOAD_KEY;
38
  public $plugin_path = A3_LAZY_LOAD_NAME;
39
  public $google_api_key_option = '';
87
  }
88
 
89
  $this->support_url = 'https://wordpress.org/support/plugin/a3-lazy-load/';
 
 
90
  }
91
 
92
 
180
  }
181
 
182
  public function update_google_map_api_key() {
183
+ if ( ! current_user_can( 'manage_options' ) ) {
184
+ return false;
185
+ }
186
+
187
+ check_admin_referer( 'save_settings_' . $this->plugin_name );
188
+
189
  // Enable Google Map API Key
190
  if ( isset( $_POST[ $this->google_map_api_key_option . '_enable' ] ) ) {
191
+
192
  $old_google_map_api_key_enable = get_option( $this->google_map_api_key_option . '_enable', 0 );
193
 
194
  update_option( $this->google_map_api_key_option . '_enable', 1 );
195
 
196
+ $option_value = trim( sanitize_text_field( wp_unslash( $_POST[ $this->google_map_api_key_option ] ) ) );
197
  update_option( $this->google_map_api_key_option, $option_value );
198
 
199
  if ( 1 != $old_google_map_api_key_enable ) {
208
 
209
  update_option( $this->google_map_api_key_option . '_enable', 0 );
210
 
211
+ $option_value = trim( sanitize_text_field( wp_unslash( $_POST[ $this->google_map_api_key_option ] ) ) );
212
  update_option( $this->google_map_api_key_option, $option_value );
213
 
214
  if ( 0 != $old_google_map_api_key_enable ) {
259
  $output = apply_filters( $this->plugin_name . '_plugin_premium_video', $output );
260
 
261
  if ( $echo )
262
+ echo wp_kses_post( $output );
263
  else
264
  return $output;
265
  }
280
  $output .= '</div>';
281
 
282
  if ( $echo )
283
+ echo wp_kses_post( $output );
284
  else
285
  return $output;
286
  }
298
  }
299
 
300
  if ( $echo )
301
+ echo wp_kses_post( $output );
302
  else
303
  return $output;
304
  }
332
  }
333
 
334
  if ( $echo )
335
+ echo wp_kses_post( $output );
336
  else
337
  return $output;
338
  }
369
  $output = apply_filters( $this->plugin_name . '_plugin_extension_end', $output );
370
 
371
  if ( $echo )
372
+ echo wp_kses_post( $output );
373
  else
374
  return $output;
375
 
389
 
390
  $upgrade_top_message = apply_filters( $this->plugin_name . '_upgrade_top_message', $upgrade_top_message, $setting_id );
391
 
392
+ if ( $echo ) echo wp_kses_post( $upgrade_top_message );
393
  else return $upgrade_top_message;
394
 
395
  }
admin/includes/fonts_face.php CHANGED
@@ -364,13 +364,46 @@ class Fonts_Face extends Admin_UI
364
  return;
365
  }
366
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  // Enable Google Font API Key
368
  if ( isset( $_POST[ $this->google_api_key_option . '_enable' ] ) ) {
369
  $old_google_api_key_enable = get_option( $this->google_api_key_option . '_enable', 0 );
370
 
371
  update_option( $this->google_api_key_option . '_enable', 1 );
372
 
373
- $option_value = trim( sanitize_text_field( $_POST[ $this->google_api_key_option ] ) );
374
 
375
  $old_google_api_key_option = get_option( $this->google_api_key_option );
376
 
@@ -388,7 +421,7 @@ class Fonts_Face extends Admin_UI
388
 
389
  update_option( $this->google_api_key_option . '_enable', 0 );
390
 
391
- $option_value = trim( sanitize_text_field( $_POST[ $this->google_api_key_option ] ) );
392
  update_option( $this->google_api_key_option, $option_value );
393
 
394
  if ( 0 != $old_google_api_key_enable ) {
@@ -396,27 +429,6 @@ class Fonts_Face extends Admin_UI
396
  delete_transient( $this->google_api_key_option . '_status' );
397
  }
398
  }
399
-
400
- if ( apply_filters( $this->plugin_name . '_new_google_fonts_enable', true ) ) {
401
- $this->is_valid_google_api_key();
402
- $google_fonts = get_option( $this->plugin_name . '_google_font_list', array() );
403
- } else {
404
- $google_fonts = array();
405
- }
406
-
407
- if ( ! is_array( $google_fonts ) || count( $google_fonts ) < 1 ) {
408
- $google_fonts = apply_filters( $this->plugin_name . '_google_fonts', $this->google_fonts );
409
- }
410
-
411
- sort( $google_fonts );
412
-
413
- $new_google_fonts = array();
414
- foreach ( $google_fonts as $row ) {
415
- $new_google_fonts[$row['name']] = $row;
416
- }
417
-
418
- $this->google_fonts = $new_google_fonts;
419
-
420
  }
421
 
422
  public function validate_google_api_key( $g_key = '' ) {
@@ -608,10 +620,14 @@ class Fonts_Face extends Admin_UI
608
  $line_height = $option['line_height'];
609
  }
610
 
 
 
611
  if ( !@$option['style'] && !@$option['size'] && !@$option['color'] )
612
- return 'font-family: '.stripslashes($option["face"]).' !important;';
613
  else
614
- return 'font:'.$option['style'].' '.$option['size'].'/' . $line_height . ' ' .stripslashes($option['face']).' !important; color:'.$option['color'].' !important;';
 
 
615
  }
616
 
617
 
@@ -641,14 +657,20 @@ class Fonts_Face extends Admin_UI
641
  // Output google font css in header
642
  if ( trim( $fonts ) != '' ) {
643
  $fonts = str_replace( " ","+",$fonts);
644
- $output .= "\n<!-- Google Webfonts -->\n";
645
- $output .= '<link href="http'. ( is_ssl() ? 's' : '' ) .'://fonts.googleapis.com/css?family=' . $fonts .'" rel="stylesheet" type="text/css" />'."\n";
646
- $output = str_replace( '|"','"',$output);
 
 
 
 
 
 
647
  }
648
  }
649
 
650
  if ( $echo )
651
- echo $output;
652
  else
653
  return $output;
654
 
364
  return;
365
  }
366
 
367
+ if ( apply_filters( $this->plugin_name . '_new_google_fonts_enable', true ) ) {
368
+ $this->is_valid_google_api_key();
369
+ $google_fonts = get_option( $this->plugin_name . '_google_font_list', array() );
370
+ } else {
371
+ $google_fonts = array();
372
+ }
373
+
374
+ if ( ! is_array( $google_fonts ) || count( $google_fonts ) < 1 ) {
375
+ $google_fonts = apply_filters( $this->plugin_name . '_google_fonts', $this->google_fonts );
376
+ }
377
+
378
+ sort( $google_fonts );
379
+
380
+ $new_google_fonts = array();
381
+ foreach ( $google_fonts as $row ) {
382
+ $new_google_fonts[$row['name']] = $row;
383
+ }
384
+
385
+ $this->google_fonts = $new_google_fonts;
386
+
387
+ }
388
+
389
+ public function update_google_font_api_key() {
390
+ if ( ! current_user_can( 'manage_options' ) ) {
391
+ return false;
392
+ }
393
+
394
+ check_admin_referer( 'save_settings_' . $this->plugin_name );
395
+
396
+ if ( ! $this->is_load_google_fonts ) {
397
+ return;
398
+ }
399
+
400
  // Enable Google Font API Key
401
  if ( isset( $_POST[ $this->google_api_key_option . '_enable' ] ) ) {
402
  $old_google_api_key_enable = get_option( $this->google_api_key_option . '_enable', 0 );
403
 
404
  update_option( $this->google_api_key_option . '_enable', 1 );
405
 
406
+ $option_value = trim( sanitize_text_field( wp_unslash( $_POST[ $this->google_api_key_option ] ) ) );
407
 
408
  $old_google_api_key_option = get_option( $this->google_api_key_option );
409
 
421
 
422
  update_option( $this->google_api_key_option . '_enable', 0 );
423
 
424
+ $option_value = trim( sanitize_text_field( wp_unslash( $_POST[ $this->google_api_key_option ] ) ) );
425
  update_option( $this->google_api_key_option, $option_value );
426
 
427
  if ( 0 != $old_google_api_key_enable ) {
429
  delete_transient( $this->google_api_key_option . '_status' );
430
  }
431
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  }
433
 
434
  public function validate_google_api_key( $g_key = '' ) {
620
  $line_height = $option['line_height'];
621
  }
622
 
623
+ $font_css = '';
624
+
625
  if ( !@$option['style'] && !@$option['size'] && !@$option['color'] )
626
+ $font_css = 'font-family: '.stripslashes($option["face"]).' !important;';
627
  else
628
+ $font_css = 'font:'.$option['style'].' '.$option['size'].'/' . $line_height . ' ' .stripslashes($option['face']).' !important; color:'.$option['color'].' !important;';
629
+
630
+ return apply_filters( $this->plugin_name . '_generate_font_css', $font_css, $option, $em );
631
  }
632
 
633
 
657
  // Output google font css in header
658
  if ( trim( $fonts ) != '' ) {
659
  $fonts = str_replace( " ","+",$fonts);
660
+
661
+ if ( $echo ) {
662
+ echo "\n<!-- Google Webfonts -->\n";
663
+ echo '<link href="http'. ( is_ssl() ? 's' : '' ) .'://fonts.googleapis.com/css?family=' . esc_attr( $fonts ) .'" rel="stylesheet" type="text/css" />'."\n";
664
+ } else {
665
+ $output .= "\n<!-- Google Webfonts -->\n";
666
+ $output .= '<link href="http'. ( is_ssl() ? 's' : '' ) .'://fonts.googleapis.com/css?family=' . esc_attr( $fonts ) .'" rel="stylesheet" type="text/css" />'."\n";
667
+ $output = str_replace( '|"','"',$output);
668
+ }
669
  }
670
  }
671
 
672
  if ( $echo )
673
+ echo '';
674
  else
675
  return $output;
676
 
admin/includes/uploader/class-uploader.php CHANGED
@@ -85,15 +85,20 @@ class Uploader extends Admin_UI
85
  /*-----------------------------------------------------------------------------------*/
86
  /* Get Upload Input Field */
87
  /*-----------------------------------------------------------------------------------*/
88
- public function upload_input ( $name_attribute, $id_attribute = '', $value = '', $attachment_id = 0, $default_value = '', $field_name = '', $class = '', $css = '', $description = '', $strip_methods = true ) {
89
  $output = '';
90
 
91
  if ( trim( $value ) == '' ) $value = trim( $default_value );
92
 
93
  if ( strstr( $name_attribute, ']' ) ) {
94
  $attachment_id_name_attribute = substr_replace( $name_attribute, '_attachment_id', -1, 0 );
 
 
 
95
  } else {
96
  $attachment_id_name_attribute = $name_attribute.'_attachment_id';
 
 
97
  }
98
 
99
  if ( $strip_methods === false ) {
@@ -103,6 +108,7 @@ class Uploader extends Admin_UI
103
  }
104
 
105
  $output .= '<input type="hidden" name="'.$attachment_id_name_attribute.'" id="'.$id_attribute.'_attachment_id" value="'.$attachment_id.'" class=" a3_upload_attachment_id" />';
 
106
  $output .= '<input data-strip-methods="'.$strip_methods.'" type="text" name="'.$name_attribute.'" id="'.$id_attribute.'" value="'.esc_attr( $value ).'" class="'.$id_attribute. ' ' .$class.' a3_upload" style="'.$css.'" rel="'.$field_name.'" /> ';
107
  $output .= '<input id="upload_'.$id_attribute.'" class="a3rev-ui-upload-button a3_upload_button button" type="button" value="'.__( 'Upload', 'a3-lazy-load' ).'" /> '.$description;
108
 
@@ -126,7 +132,7 @@ class Uploader extends Admin_UI
126
 
127
  $title = __( 'View File', 'a3-lazy-load' );
128
 
129
- $output .= '<div class="a3_no_image"><span class="a3_file_link"><a href="'.esc_url( $value ).'" target="_blank" rel="a3_external">'.$title.'</a></span>'.$remove.'</div>';
130
 
131
  }
132
  }
85
  /*-----------------------------------------------------------------------------------*/
86
  /* Get Upload Input Field */
87
  /*-----------------------------------------------------------------------------------*/
88
+ public function upload_input ( $name_attribute, $id_attribute = '', $value = '', $attachment_id = 0, $default_value = '', $field_name = '', $class = '', $css = '', $description = '', $strip_methods = true, $size = 'original' ) {
89
  $output = '';
90
 
91
  if ( trim( $value ) == '' ) $value = trim( $default_value );
92
 
93
  if ( strstr( $name_attribute, ']' ) ) {
94
  $attachment_id_name_attribute = substr_replace( $name_attribute, '_attachment_id', -1, 0 );
95
+
96
+ $attachment_size_name_attribute = substr_replace( $name_attribute, '_attachment_size', -1, 0 );
97
+
98
  } else {
99
  $attachment_id_name_attribute = $name_attribute.'_attachment_id';
100
+
101
+ $attachment_size_name_attribute = $name_attribute.'_attachment_size';
102
  }
103
 
104
  if ( $strip_methods === false ) {
108
  }
109
 
110
  $output .= '<input type="hidden" name="'.$attachment_id_name_attribute.'" id="'.$id_attribute.'_attachment_id" value="'.$attachment_id.'" class=" a3_upload_attachment_id" />';
111
+ $output .= '<input type="hidden" name="'.$attachment_size_name_attribute.'" id="'.$id_attribute.'_attachment_size" value="'.$size.'" class=" a3_upload_attachment_size" />';
112
  $output .= '<input data-strip-methods="'.$strip_methods.'" type="text" name="'.$name_attribute.'" id="'.$id_attribute.'" value="'.esc_attr( $value ).'" class="'.$id_attribute. ' ' .$class.' a3_upload" style="'.$css.'" rel="'.$field_name.'" /> ';
113
  $output .= '<input id="upload_'.$id_attribute.'" class="a3rev-ui-upload-button a3_upload_button button" type="button" value="'.__( 'Upload', 'a3-lazy-load' ).'" /> '.$description;
114
 
132
 
133
  $title = __( 'View File', 'a3-lazy-load' );
134
 
135
+ $output .= '<div class="a3_no_image"><span class="a3_file_link"><a href="'.esc_url( $value ).'" target="_blank" rel="noopener">'.$title.'</a></span>'.$remove.'</div>';
136
 
137
  }
138
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: a3rev, a3rev Software, nguyencongtuan
3
  Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
4
  Requires at least: 5.6
5
- Tested up to: 5.9
6
- Stable tag: 2.4.9
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -198,6 +198,15 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
198
 
199
  == Changelog ==
200
 
 
 
 
 
 
 
 
 
 
201
  = 2.4.9 - 2022/01/21 =
202
  * This is a maintenance release for compatibility with WordPress major version 5.9
203
  * Tweak - Test for compatibility with WordPress 5.9
@@ -591,6 +600,9 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
591
 
592
  == Upgrade Notice ==
593
 
 
 
 
594
  = 2.4.9 =
595
  This is a maintenance release for compatibility with WordPress major version 5.9
596
 
2
  Contributors: a3rev, a3rev Software, nguyencongtuan
3
  Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
4
  Requires at least: 5.6
5
+ Tested up to: 6.0
6
+ Stable tag: 2.5.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
198
 
199
  == Changelog ==
200
 
201
+ = 2.5.0 - 2022/05/24 =
202
+ * This release is for compatibility with WordPress major version 6.0 plus includes various tweaks to harden the plugins security.
203
+ * Tweak - Test for compatibility with WordPress 6.0
204
+ * Framework – Upgrade Plugin Framework to version 2.6.0
205
+ * Security - Various code hardening tweaks.
206
+ * Security - Escape all $-variable
207
+ * Security - Sanitize all $_REQUEST, $_GET, $_POST
208
+ * Security - Apply wp_unslash before sanitize
209
+
210
  = 2.4.9 - 2022/01/21 =
211
  * This is a maintenance release for compatibility with WordPress major version 5.9
212
  * Tweak - Test for compatibility with WordPress 5.9
600
 
601
  == Upgrade Notice ==
602
 
603
+ = 2.5.0 =
604
+ This release is for compatibility with WordPress major version 6.0 plus includes various tweaks to harden the plugins security
605
+
606
  = 2.4.9 =
607
  This is a maintenance release for compatibility with WordPress major version 5.9
608