AMP for WP – Accelerated Mobile Pages - Version 0.9.98.5

Version Description

(27th AUGUST 2019) = * Improvements: Compatibility integrated with CDN enabler #3515 * Improvements: banner ux section of AMP panel settings improved #3470 * Improvements: Reduces the size of auto inline css ro avoid validation errors #3115 * Improvements: Tooltip to show description about "Social Share links to AMP" and "No Follow All Your Social Links" #3456 * Improvements: Avada pagebuilder compatibility feature integrated ( it will work when 'AMP PageBuilder Compatibility' extension is activate) #3550 * Improvements: Avia pagebuilder(Enfold) feature integrated ( it will work when 'AMP PageBuilder Compatibility' extension is activate) #3559 * Improvements: Filters to show or hide option on admin settings for Template-mode #3562 * Fixed: When AMP Page builder is checked with Empty Content,Container is missing on AMP view #3488 * Fixed: Validation error when adding featured video with Authentic theme #3535 * Fixed: User Experience issue with Custom Home Page #2348 * Fixed: Serach option should be enabled by default when user selected the design-3 #3485 * Fixed: Logo's resize option should only display when the image is present #3471 * Fixed: Row module settings popup header is overlapped while scrolling the options in AMP Page Builder #3467 * Fixed: labeling of the 'Text font' option in 'Row module settings' of AMP Page builder renamed #3468 * Fixed: When AMP takeover is enabled, the 'visit amp' on admin header should disabled #3502 * Fixed: Homepage amphtml not getting generated when there are no posts added. #3504 * Fixed: AMP cache description is getting overlap with the Checkbox description when amp cache extension is activate #3512 * Fixed: Category module's pagination of AMP Page builder is not working #3509 * Fixed: There is closing tag of 'a' tag in header-bar.php of design bar, for which there is no opening tag #3479 * Fixed: Icons not loading When Icon Font Library is selected to Font Awesome from the AMP options #3501 * Fixed: Shortcode placed with double brackets (i.e., [[shortcode]]) should not execute #3481 * Fixed: One signal push notification should work properly on AMP if any CDN plugin is used #3340 * Fixed: Extra options are being displayed after the search is completed in the AMP Options Panel #2874 * Fixed: In alt attribute's content single quotes should removed #3492 * Fixed: "amphtml" is not generatiing in sorce code when it comes to search results pages in non AMP #3458 * Fixed: Woocommerce archives and shop page support should not be dependent on Archives [Category & Tags] option #3558 * Fixed: noreferrer is getting added automatically, it should have what ever the user passes #3566

Download this release

Release Info

Developer mohammed_kaludi
Plugin Icon 128x128 AMP for WP – Accelerated Mobile Pages
Version 0.9.98.5
Comparing to
See all releases

Code changes from version 0.9.98.4 to 0.9.98.5

Files changed (61) hide show
  1. README.md +30 -1
  2. accelerated-moblie-pages.php +3 -3
  3. changelog.txt +29 -0
  4. components/author-box/author-box.php +2 -2
  5. components/breadcrumb/breadcrumb.php +2 -2
  6. components/categories-tags/categories-tags.php +1 -1
  7. components/comments/comments.php +4 -4
  8. components/components-core.php +2 -2
  9. components/featured-image/featured-image.php +4 -4
  10. components/gdpr/gdpr.php +1 -1
  11. components/loop/loop.php +2 -2
  12. components/search/search.php +1 -1
  13. includes/admin-script.js +54 -2
  14. includes/admin-style.css +7 -1
  15. includes/features/advertisement/ads-functions.php +27 -27
  16. includes/features/analytics/analytics-functions.php +1 -1
  17. includes/features/functions.php +5 -1
  18. includes/features/notice-bar/notice-bar-functions.php +2 -2
  19. includes/features/notice-bar/notice-bar-options.php +1 -9
  20. includes/features/pagebuilders-support/pagebuilders_support.php +52 -1
  21. includes/options/admin-config.php +14 -1
  22. includes/options/redux-core/assets/css/redux-admin.css +11 -0
  23. includes/redirect.php +4 -1
  24. includes/thirdparty-compatibility.php +20 -19
  25. includes/vendor/amp/back-compat/templates-v0-3/meta-taxonomy.php +3 -2
  26. includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php +1 -12
  27. includes/vendor/amp/includes/sanitizers/class-amp-gallery-block-sanitizer.php +1 -1
  28. includes/vendor/amp/includes/sanitizers/class-amp-style-sanitizer.php +1 -1
  29. includes/vendor/amp/includes/widgets/class-amp-widget-categories.php +1 -1
  30. includes/vendor/tinymce-widget/includes/class-widget.php +3 -3
  31. install/index.php +5 -5
  32. pagebuilder/amp-page-builder.php +2 -2
  33. pagebuilder/config/moduleTemplate.php +1 -1
  34. pagebuilder/inc/admin-amp-page-builder.css +1 -1
  35. pagebuilder/inc/adminAjaxContents.php +1 -1
  36. pagebuilder/inc/viewShowFrontData.php +4 -4
  37. pagebuilder/modules/contents-module.php +7 -2
  38. readme.txt +30 -27
  39. templates/category-widget.php +1 -1
  40. templates/customizer/customizer-controls.php +1 -1
  41. templates/design-manager/design-1/archive.php +3 -3
  42. templates/design-manager/design-1/elements/bread-crumbs.php +3 -3
  43. templates/design-manager/design-1/elements/meta-taxonomy.php +1 -1
  44. templates/design-manager/design-1/header-bar.php +0 -1
  45. templates/design-manager/design-1/search.php +2 -2
  46. templates/design-manager/design-1/style.php +2 -2
  47. templates/design-manager/design-2/archive.php +3 -3
  48. templates/design-manager/design-2/elements/bread-crumbs.php +3 -3
  49. templates/design-manager/design-2/elements/related-posts.php +1 -1
  50. templates/design-manager/design-2/search.php +2 -2
  51. templates/design-manager/design-2/style.php +2 -2
  52. templates/design-manager/design-3/archive.php +3 -3
  53. templates/design-manager/design-3/elements/bread-crumbs.php +3 -3
  54. templates/design-manager/design-3/index.php +2 -2
  55. templates/design-manager/design-3/search.php +2 -2
  56. templates/design-manager/design-3/style.php +2 -2
  57. templates/design-manager/swift/style.php +4 -4
  58. templates/features.php +57 -34
  59. templates/frontpage-elements.php +3 -3
  60. templates/template-mode/admin-settings.php +20 -6
  61. templates/template-mode/template-mode.php +1 -1
README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
- Stable tag: 0.9.98.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -189,6 +189,35 @@ You can contact us from [here](https://ampforwp.com/contact/)
189
 
190
  == Changelog ==
191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  = 0.9.98.4 (6th AUGUST 2019) =
193
  * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
194
  * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
+ Stable tag: 0.9.98.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
189
 
190
  == Changelog ==
191
 
192
+ = 0.9.98.5 (27th AUGUST 2019) =
193
+ * Improvements: Compatibility integrated with CDN enabler #3515
194
+ * Improvements: banner ux section of AMP panel settings improved #3470
195
+ * Improvements: Reduces the size of auto inline css ro avoid validation errors #3115
196
+ * Improvements: Tooltip to show description about "Social Share links to AMP" and "No Follow All Your Social Links" #3456
197
+ * Improvements: Avada pagebuilder compatibility feature integrated ( it will work when 'AMP PageBuilder Compatibility' extension is activate) #3550
198
+ * Improvements: Avia pagebuilder(Enfold) feature integrated ( it will work when 'AMP PageBuilder Compatibility' extension is activate) #3559
199
+ * Improvements: Filters to show or hide option on admin settings for Template-mode #3562
200
+ * Fixed: When AMP Page builder is checked with Empty Content,Container is missing on AMP view #3488
201
+ * Fixed: Validation error when adding featured video with Authentic theme #3535
202
+ * Fixed: User Experience issue with Custom Home Page #2348
203
+ * Fixed: Serach option should be enabled by default when user selected the design-3 #3485
204
+ * Fixed: Logo's resize option should only display when the image is present #3471
205
+ * Fixed: Row module settings popup header is overlapped while scrolling the options in AMP Page Builder #3467
206
+ * Fixed: labeling of the 'Text font' option in 'Row module settings' of AMP Page builder renamed #3468
207
+ * Fixed: When AMP takeover is enabled, the 'visit amp' on admin header should disabled #3502
208
+ * Fixed: Homepage amphtml not getting generated when there are no posts added. #3504
209
+ * Fixed: AMP cache description is getting overlap with the Checkbox description when amp cache extension is activate #3512
210
+ * Fixed: Category module's pagination of AMP Page builder is not working #3509
211
+ * Fixed: There is closing tag of 'a' tag in header-bar.php of design bar, for which there is no opening tag #3479
212
+ * Fixed: Icons not loading When Icon Font Library is selected to Font Awesome from the AMP options #3501
213
+ * Fixed: Shortcode placed with double brackets (i.e., [[shortcode]]) should not execute #3481
214
+ * Fixed: One signal push notification should work properly on AMP if any CDN plugin is used #3340
215
+ * Fixed: Extra options are being displayed after the search is completed in the AMP Options Panel #2874
216
+ * Fixed: In alt attribute's content single quotes should removed #3492
217
+ * Fixed: "amphtml" is not generatiing in sorce code when it comes to search results pages in non AMP #3458
218
+ * Fixed: Woocommerce archives and shop page support should not be dependent on Archives [Category & Tags] option #3558
219
+ * Fixed: noreferrer is getting added automatically, it should have what ever the user passes #3566
220
+
221
  = 0.9.98.4 (6th AUGUST 2019) =
222
  * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
223
  * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 0.9.98.4
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','0.9.98.4');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  // any changes to AMP_QUERY_VAR should be refelected here
26
  function ampforwp_generate_endpoint(){
@@ -908,7 +908,7 @@ function ampforwp_get_all_post_types(){
908
  if( !empty($custom_taxonomies) ){
909
  foreach($custom_taxonomies as $taxonomy){
910
  $terms = get_taxonomy( $taxonomy );
911
- $taxonomy_name = $terms->name;
912
  if( isset($terms->name) && !empty($terms->name)){
913
  $post_types[$terms->name] = $terms->name;
914
  }
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.98.5
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','0.9.98.5');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  // any changes to AMP_QUERY_VAR should be refelected here
26
  function ampforwp_generate_endpoint(){
908
  if( !empty($custom_taxonomies) ){
909
  foreach($custom_taxonomies as $taxonomy){
910
  $terms = get_taxonomy( $taxonomy );
911
+ $taxonomy_name = ( isset($terms->name) ? $terms->name : '' );
912
  if( isset($terms->name) && !empty($terms->name)){
913
  $post_types[$terms->name] = $terms->name;
914
  }
changelog.txt CHANGED
@@ -1,5 +1,34 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 0.9.98.4 (6th AUGUST 2019) =
4
  * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
5
  * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
1
  == Changelog ==
2
 
3
+ = 0.9.98.5 (27th AUGUST 2019) =
4
+ * Improvements: Compatibility integrated with CDN enabler #3515
5
+ * Improvements: banner ux section of AMP panel settings improved #3470
6
+ * Improvements: Reduces the size of auto inline css ro avoid validation errors #3115
7
+ * Improvements: Tooltip to show description about "Social Share links to AMP" and "No Follow All Your Social Links" #3456
8
+ * Improvements: Avada pagebuilder compatibility feature integrated ( it will work when 'AMP PageBuilder Compatibility' extension is activate) #3550
9
+ * Improvements: Avia pagebuilder(Enfold) feature integrated ( it will work when 'AMP PageBuilder Compatibility' extension is activate) #3559
10
+ * Improvements: Filters to show or hide option on admin settings for Template-mode #3562
11
+ * Fixed: When AMP Page builder is checked with Empty Content,Container is missing on AMP view #3488
12
+ * Fixed: Validation error when adding featured video with Authentic theme #3535
13
+ * Fixed: User Experience issue with Custom Home Page #2348
14
+ * Fixed: Serach option should be enabled by default when user selected the design-3 #3485
15
+ * Fixed: Logo's resize option should only display when the image is present #3471
16
+ * Fixed: Row module settings popup header is overlapped while scrolling the options in AMP Page Builder #3467
17
+ * Fixed: labeling of the 'Text font' option in 'Row module settings' of AMP Page builder renamed #3468
18
+ * Fixed: When AMP takeover is enabled, the 'visit amp' on admin header should disabled #3502
19
+ * Fixed: Homepage amphtml not getting generated when there are no posts added. #3504
20
+ * Fixed: AMP cache description is getting overlap with the Checkbox description when amp cache extension is activate #3512
21
+ * Fixed: Category module's pagination of AMP Page builder is not working #3509
22
+ * Fixed: There is closing tag of 'a' tag in header-bar.php of design bar, for which there is no opening tag #3479
23
+ * Fixed: Icons not loading When Icon Font Library is selected to Font Awesome from the AMP options #3501
24
+ * Fixed: Shortcode placed with double brackets (i.e., [[shortcode]]) should not execute #3481
25
+ * Fixed: One signal push notification should work properly on AMP if any CDN plugin is used #3340
26
+ * Fixed: Extra options are being displayed after the search is completed in the AMP Options Panel #2874
27
+ * Fixed: In alt attribute's content single quotes should removed #3492
28
+ * Fixed: "amphtml" is not generatiing in sorce code when it comes to search results pages in non AMP #3458
29
+ * Fixed: Woocommerce archives and shop page support should not be dependent on Archives [Category & Tags] option #3558
30
+ * Fixed: noreferrer is getting added automatically, it should have what ever the user passes #3566
31
+
32
  = 0.9.98.4 (6th AUGUST 2019) =
33
  * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
34
  * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
components/author-box/author-box.php CHANGED
@@ -70,13 +70,13 @@ if ( isset($args['show_time']) ) {
70
  }
71
 
72
  ?>
73
- <div class="amp-author <?php echo $class; ?>">
74
  <?php if ( $avatar ) {
75
  $author_avatar_url = ampforwp_get_wp_user_avatar();
76
  if( null == $author_avatar_url ){
77
  $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
78
  } ?>
79
- <div class="amp-author-image <?php echo $author_image_wrapper; ?>">
80
  <amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo esc_attr($avatar_size); ?>" height="<?php echo esc_attr($avatar_size); ?>" layout="fixed"></amp-img>
81
  </div>
82
  <?php } ?>
70
  }
71
 
72
  ?>
73
+ <div class="amp-author <?php echo esc_attr($class); ?>">
74
  <?php if ( $avatar ) {
75
  $author_avatar_url = ampforwp_get_wp_user_avatar();
76
  if( null == $author_avatar_url ){
77
  $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
78
  } ?>
79
+ <div class="amp-author-image <?php echo esc_attr($author_image_wrapper); ?>">
80
  <amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo esc_attr($avatar_size); ?>" height="<?php echo esc_attr($avatar_size); ?>" layout="fixed"></amp-img>
81
  </div>
82
  <?php } ?>
components/breadcrumb/breadcrumb.php CHANGED
@@ -99,7 +99,7 @@
99
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
100
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
101
  }
102
- echo $tags_breadcrumbs;
103
  }
104
  }
105
  if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
@@ -178,7 +178,7 @@
178
  }
179
 
180
  // Display parent pages
181
- echo $parents;
182
 
183
  // Current page
184
 
99
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
100
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
101
  }
102
+ echo $tags_breadcrumbs; // Escaped above
103
  }
104
  }
105
  if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
178
  }
179
 
180
  // Display parent pages
181
+ echo $parents; // Escaped above
182
 
183
  // Current page
184
 
components/categories-tags/categories-tags.php CHANGED
@@ -57,7 +57,7 @@ function ampforwp_framework_get_tags_list($separator=''){
57
  echo ('<span class="amp-tag"> '.esc_html($tag->name).'</span>');
58
  }
59
  if(!empty($separator) && count($ampforwp_tags)-1 > $key){
60
- echo $separator;
61
  }
62
  }?>
63
  </div>
57
  echo ('<span class="amp-tag"> '.esc_html($tag->name).'</span>');
58
  }
59
  if(!empty($separator) && count($ampforwp_tags)-1 > $key){
60
+ echo esc_html($separator);
61
  }
62
  }?>
63
  </div>
components/comments/comments.php CHANGED
@@ -225,8 +225,8 @@ function ampforwp_framework_get_vuukle_comments(){
225
 
226
  $vuukle_html = '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
227
 
228
- <div overflow tabindex="0" role="button" aria-label="Show comments">Show comments</div>';
229
- echo $vuukle_html;
230
  }
231
 
232
  function ampforwp_framework_get_spotim_comments(){
@@ -241,9 +241,9 @@ function ampforwp_framework_get_spotim_comments(){
241
  $spotim_html = '<amp-iframe width="375" height="815" resizable sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation" layout="responsive"
242
  frameborder="0" src="'.esc_url($srcUrl).'">
243
  <amp-img placeholder height="815" layout="fill" src="//amp.spot.im/loader.png"></amp-img>
244
- <div overflow class="spot-im-amp-overflow" tabindex="0" role="button" aria-label="Read more">Load more...</div>
245
  </amp-iframe>';
246
- echo $spotim_html;
247
  }
248
 
249
  // Comments Scripts
225
 
226
  $vuukle_html = '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
227
 
228
+ <div overflow tabindex="0" role="button" aria-label="Show comments">'.esc_html__('Show comments','accelerated-mobile-pages').'</div>';
229
+ echo $vuukle_html; // escaped above
230
  }
231
 
232
  function ampforwp_framework_get_spotim_comments(){
241
  $spotim_html = '<amp-iframe width="375" height="815" resizable sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation" layout="responsive"
242
  frameborder="0" src="'.esc_url($srcUrl).'">
243
  <amp-img placeholder height="815" layout="fill" src="//amp.spot.im/loader.png"></amp-img>
244
+ <div overflow class="spot-im-amp-overflow" tabindex="0" role="button" aria-label="Read more">'.esc_html__('Load more...','accelerated-mobile-pages').'</div>
245
  </amp-iframe>';
246
+ echo $spotim_html; // escaped above
247
  }
248
 
249
  // Comments Scripts
components/components-core.php CHANGED
@@ -173,7 +173,7 @@ function amp_menu($echo=true, $menu_args=array(), $type='header'){
173
  return $amp_menu;
174
  }
175
  else
176
- echo $amp_menu;
177
  }
178
  }
179
  // Alternative Menus
@@ -391,7 +391,7 @@ function amp_header_core(){
391
  <?php $custom_css = ampforwp_get_setting('css_editor');
392
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
393
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
394
- echo $sanitized_css; ?>
395
  </style>
396
  <?php do_action('ampforwp_before_head', $thisTemplate); ?>
397
  </head>
173
  return $amp_menu;
174
  }
175
  else
176
+ echo $amp_menu; // escaped above
177
  }
178
  }
179
  // Alternative Menus
391
  <?php $custom_css = ampforwp_get_setting('css_editor');
392
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
393
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
394
+ echo $sanitized_css; // sanitized above ?>
395
  </style>
396
  <?php do_action('ampforwp_before_head', $thisTemplate); ?>
397
  </head>
components/featured-image/featured-image.php CHANGED
@@ -45,7 +45,7 @@ function ampforwp_framework_get_featured_image(){
45
  else{
46
  $alt = get_the_title( $post_id );
47
  }
48
- $alt = esc_attr($alt);
49
  if( $image ){
50
  if(empty($image[1])){
51
  $image[1] = 1000;
@@ -56,7 +56,7 @@ function ampforwp_framework_get_featured_image(){
56
  if ( empty($srcet) ) {
57
  $srcet = $image[0];
58
  }
59
- $amp_html = "<amp-img src='".esc_url($image[0])."' srcset='".esc_html($srcet)."' width='".esc_attr($image[1])."' height='".esc_attr($image[2])."' layout=responsive alt='".esc_attr($alt)."'></amp-img>";
60
  }
61
  }
62
  elseif ( ampforwp_is_custom_field_featured_image() ) {
@@ -64,7 +64,7 @@ function ampforwp_framework_get_featured_image(){
64
  $amp_img_width = ampforwp_cf_featured_image_src('width');
65
  $amp_img_height = ampforwp_cf_featured_image_src('height');
66
  if( $amp_img_src ){
67
- $amp_html = "<amp-img src='$amp_img_src' width=$amp_img_width height=$amp_img_height layout='responsive' ></amp-img>";
68
  }
69
  }
70
  elseif( true == ampforwp_get_setting('ampforwp-featured-image-from-content') && ampforwp_get_featured_image_from_content() ){
@@ -73,7 +73,7 @@ function ampforwp_framework_get_featured_image(){
73
  }
74
  if( $amp_html ){ ?>
75
  <figure class="amp-featured-image <?php echo esc_html($f_vid); ?>"> <?php
76
- echo $amp_html;
77
  if ( $caption ) : ?>
78
  <p class="wp-caption-text">
79
  <?php echo wp_kses_data( $caption ); ?>
45
  else{
46
  $alt = get_the_title( $post_id );
47
  }
48
+ $alt = convert_chars( stripslashes( $alt ) );
49
  if( $image ){
50
  if(empty($image[1])){
51
  $image[1] = 1000;
56
  if ( empty($srcet) ) {
57
  $srcet = $image[0];
58
  }
59
+ $amp_html = '<amp-img src="'.esc_url($image[0]).'" srcset="'.esc_html($srcet).'" width="'.esc_attr($image[1]).'" height="'.esc_attr($image[2]).'" layout=responsive alt="'.esc_attr($alt).'"></amp-img>';
60
  }
61
  }
62
  elseif ( ampforwp_is_custom_field_featured_image() ) {
64
  $amp_img_width = ampforwp_cf_featured_image_src('width');
65
  $amp_img_height = ampforwp_cf_featured_image_src('height');
66
  if( $amp_img_src ){
67
+ $amp_html = "<amp-img src='".esc_url($amp_img_src)."' width=".esc_attr($amp_img_width)." height=".esc_attr($amp_img_height)." layout='responsive' ></amp-img>";
68
  }
69
  }
70
  elseif( true == ampforwp_get_setting('ampforwp-featured-image-from-content') && ampforwp_get_featured_image_from_content() ){
73
  }
74
  if( $amp_html ){ ?>
75
  <figure class="amp-featured-image <?php echo esc_html($f_vid); ?>"> <?php
76
+ echo $amp_html; // escaped above
77
  if ( $caption ) : ?>
78
  <p class="wp-caption-text">
79
  <?php echo wp_kses_data( $caption ); ?>
components/gdpr/gdpr.php CHANGED
@@ -119,7 +119,7 @@ function ampforwp_gdpr_css(){
119
  display: inline-block;
120
  }
121
  #footer .gdpr_fmi a{
122
- color: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;
123
  }
124
  amp-consent.amp-active {
125
  top: 0;
119
  display: inline-block;
120
  }
121
  #footer .gdpr_fmi a{
122
+ color: <?php echo ampforwp_sanitize_color( ampforwp_get_setting('swift-color-scheme','color') ); ?>;
123
  }
124
  amp-consent.amp-active {
125
  top: 0;
components/loop/loop.php CHANGED
@@ -280,11 +280,11 @@ function amp_pagination($args =array()) {
280
  <div class="loop-pagination"><?php
281
  if ( get_next_posts_link( $args['next_text'], $amp_q->max_num_pages ) ) {
282
  $next_link = '<div class="right">'. apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-more-posts-text'] , $args['next_text']), $amp_q->max_num_pages ), $paged) .'</div>';
283
- echo $next_link;
284
  }
285
  if ( get_previous_posts_link() ) {
286
  $pre_link = '<div class="left">'.apply_filters('ampforwp_previous_posts_link',get_previous_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-previous-posts-text'], $args['previous_text'] ) ), $paged ) .'</div>';
287
- echo $pre_link;
288
  } ?>
289
  <div class="clearfix"></div>
290
  </div><?php
280
  <div class="loop-pagination"><?php
281
  if ( get_next_posts_link( $args['next_text'], $amp_q->max_num_pages ) ) {
282
  $next_link = '<div class="right">'. apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-more-posts-text'] , $args['next_text']), $amp_q->max_num_pages ), $paged) .'</div>';
283
+ echo $next_link; // escaped above
284
  }
285
  if ( get_previous_posts_link() ) {
286
  $pre_link = '<div class="left">'.apply_filters('ampforwp_previous_posts_link',get_previous_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-previous-posts-text'], $args['previous_text'] ) ), $paged ) .'</div>';
287
+ echo $pre_link; // escaped above
288
  } ?>
289
  <div class="clearfix"></div>
290
  </div><?php
components/search/search.php CHANGED
@@ -25,7 +25,7 @@ function ampforwp_framework_get_search_form() {
25
  </div>
26
  </div>
27
  </form>';
28
- echo $form;
29
  }
30
  ampforwp_add_scripts();
31
  function ampforwp_add_scripts(){
25
  </div>
26
  </div>
27
  </form>';
28
+ echo $form; // escaped above
29
  }
30
  ampforwp_add_scripts();
31
  function ampforwp_add_scripts(){
includes/admin-script.js CHANGED
@@ -48,6 +48,9 @@ jQuery(function($) {
48
  return false;
49
  }
50
  var item = $(this);
 
 
 
51
  var isMatch = true,
52
  text = $(this).find('.redux_field_th').text().toLowerCase();
53
  if ( !text || text == "" ) {
@@ -63,8 +66,7 @@ jQuery(function($) {
63
  $(this).parents('div.redux-group-tab').css('display','block');
64
  }
65
  return isMatch;
66
- }).show( function() { });
67
-
68
  parent.find('.redux-group-tab').each(function() {
69
  if (searchString != "") {
70
  $(this).find("div.redux-section-field").each(function(){
@@ -79,6 +81,10 @@ jQuery(function($) {
79
  });
80
  } else {
81
  $(this).find("div.redux-section-field").each(function(){
 
 
 
 
82
  var divSectionId = $(this).attr('id');
83
  var splitResult = divSectionId.split("-");
84
  splitResult.splice(1, 0, "table");
@@ -88,6 +94,17 @@ jQuery(function($) {
88
  $(this).show();
89
  }
90
  });
 
 
 
 
 
 
 
 
 
 
 
91
  }
92
  }); // parent.find('.redux-group-tab') Closed
93
  },
@@ -96,7 +113,23 @@ jQuery(function($) {
96
  captureLength:0
97
  });
98
  }
 
 
 
 
 
 
 
 
 
99
 
 
 
 
 
 
 
 
100
  //option panel Section Division
101
  var optionSectionDevision = function(){
102
  $('.afw-accordion-header').click(function(){
@@ -657,6 +690,25 @@ jQuery(document).ready(function($){
657
  jQuery.post(ajaxurl, notice, function(response) {
658
  });
659
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
660
  });//(document).ready Closed
661
 
662
  jQuery(window).on("YoastSEO:ready",function(){
48
  return false;
49
  }
50
  var item = $(this);
51
+ if(item.hasClass('hide')){
52
+ return false;
53
+ }
54
  var isMatch = true,
55
  text = $(this).find('.redux_field_th').text().toLowerCase();
56
  if ( !text || text == "" ) {
66
  $(this).parents('div.redux-group-tab').css('display','block');
67
  }
68
  return isMatch;
69
+ }).show( function() { });
 
70
  parent.find('.redux-group-tab').each(function() {
71
  if (searchString != "") {
72
  $(this).find("div.redux-section-field").each(function(){
81
  });
82
  } else {
83
  $(this).find("div.redux-section-field").each(function(){
84
+ var item = $(this);
85
+ if(item.hasClass('hide')){
86
+ return false;
87
+ }
88
  var divSectionId = $(this).attr('id');
89
  var splitResult = divSectionId.split("-");
90
  splitResult.splice(1, 0, "table");
94
  $(this).show();
95
  }
96
  });
97
+ $(this).find('.form-table-section tbody').each(function(){
98
+ $(this).find('tr').each(function (i, el) {
99
+ var item = $(this);
100
+ if(item.hasClass('hide')){
101
+ item.hide();
102
+ }
103
+ if(item.hasClass('redux-section-indent-start')){
104
+ item.hide();
105
+ }
106
+ });
107
+ });
108
  }
109
  }); // parent.find('.redux-group-tab') Closed
110
  },
113
  captureLength:0
114
  });
115
  }
116
+ $('.redux-container').each(function() {
117
+ if (!$(this).hasClass('redux-no-sections')) {
118
+ $(this).find('.display_header').append('<span class="search-wrapper"><input class="redux_field_search" name="" type="text" placeholder="Search the controls" style="display:none"/><span class="redux-amp-search-icon"><i class="dashicons-before dashicons-search"></i></span></span>');
119
+ $('.redux-amp-search-icon').click(function(){
120
+ $('.redux_field_search').toggle('slide');
121
+ });
122
+ reduxOptionSearch();
123
+ }
124
+ });
125
 
126
+ $(".redux_field_search").keypress(function (evt) {
127
+ //Deterime where our character code is coming from within the event
128
+ var charCode = evt.charCode || evt.keyCode;
129
+ if (charCode == 13) { //Enter key's keycode
130
+ return false;
131
+ }
132
+ });
133
  //option panel Section Division
134
  var optionSectionDevision = function(){
135
  $('.afw-accordion-header').click(function(){
690
  jQuery.post(ajaxurl, notice, function(response) {
691
  });
692
  });
693
+
694
+ // AMP FrontPage notice in Reading Settings #2348
695
+ if ( 'false' == redux_data.frontpage){
696
+ $('#page_on_front').parent('label').append('<p class="afp" style="display:none"><b>We have detected that you have not setup the FrontPage for AMP, </b><a href="'+redux_data.admin_url+'">Click here to setup</a></span>');
697
+ }
698
+ $('#front-static-pages input[type=radio][name=show_on_front]').on('change', function(e) {
699
+ if ( this.value == 'page') {
700
+ $('.afp').show();
701
+ } else {
702
+ $('.afp').hide();
703
+ }
704
+ });
705
+ var sfp = $('#front-static-pages input[type=radio][checked=checked]');
706
+ if ( sfp[0] ) {
707
+ if(sfp[0].value == 'page'){
708
+ $('.afp').show();
709
+ }
710
+ }
711
+
712
  });//(document).ready Closed
713
 
714
  jQuery(window).on("YoastSEO:ready",function(){
includes/admin-style.css CHANGED
@@ -935,4 +935,10 @@ font-size: 10px;
935
  text-transform: none;
936
  width: 100%;
937
  font-weight: normal;
938
- }
 
 
 
 
 
 
935
  text-transform: none;
936
  width: 100%;
937
  font-weight: normal;
938
+ }
939
+ .afp{
940
+ background: #FFF59D;
941
+ padding: 8px 14px;
942
+ margin-top: 7px;
943
+ display: inline-block;
944
+ }
includes/features/advertisement/ads-functions.php CHANGED
@@ -63,9 +63,9 @@ function ampforwp_header_advert() {
63
  $output = '<div class="amp-ad-wrapper amp_ad_1">';
64
  $output .= '<amp-ad class="amp-ad-1"
65
  type="adsense"
66
- width='. $advert_width .' height='. $advert_height . '
67
- data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-1'].'"
68
- data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-1'] .'"';
69
  if($is_dboc){
70
  $output .= 'data-block-on-consent';
71
  }
@@ -81,7 +81,7 @@ function ampforwp_header_advert() {
81
  }
82
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
83
  $output = apply_filters('ampforwp_modify_ad_1',$output );
84
- echo $output;
85
  }
86
 
87
  // Above Footer Global
@@ -138,10 +138,10 @@ function ampforwp_footer_advert() {
138
  }
139
  $output = '<div class="amp-ad-wrapper amp_ad_2">';
140
  $output .= '<amp-ad class="amp-ad-2"
141
- type="adsense" '. $optimize .'
142
- width='. $advert_width .' height='. $advert_height . '
143
- data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-2'].'"
144
- data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-2'] .'"';
145
  if($is_dboc){
146
  $output .= 'data-block-on-consent';
147
  }
@@ -157,7 +157,7 @@ function ampforwp_footer_advert() {
157
  }
158
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
159
  $output = apply_filters('ampforwp_modify_ad_2',$output );
160
- echo $output;
161
  }
162
 
163
  // Above Post Content
@@ -234,9 +234,9 @@ function ampforwp_before_post_content_advert() {
234
  $output = '<div class="amp-ad-wrapper amp_ad_3">';
235
  $output .= '<amp-ad class="amp-ad-3"
236
  type="adsense"
237
- width='. $advert_width .' height='. $advert_height . '
238
- data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-3'].'"
239
- data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-3'] .'"';
240
  if($is_dboc){
241
  $output .= 'data-block-on-consent';
242
  }
@@ -252,7 +252,7 @@ function ampforwp_before_post_content_advert() {
252
  }
253
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
254
  $output = apply_filters('ampforwp_modify_ad_3',$output );
255
- echo $output;
256
  }
257
  }
258
  }
@@ -310,10 +310,10 @@ function ampforwp_after_post_content_advert() {
310
  }
311
  $output = '<div class="amp-ad-wrapper amp_ad_4">';
312
  $output .= '<amp-ad class="amp-ad-4"
313
- type="adsense" '. $optimize .'
314
- width='. $advert_width .' height='. $advert_height . '
315
- data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-4'].'"
316
- data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-4'] .'"';
317
  if($is_dboc){
318
  $output .= 'data-block-on-consent';
319
  }
@@ -329,7 +329,7 @@ function ampforwp_after_post_content_advert() {
329
  }
330
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
331
  $output = apply_filters('ampforwp_modify_ad_4',$output );
332
- echo $output;
333
  }
334
 
335
  // Below The Title
@@ -382,9 +382,9 @@ function ampforwp_below_the_title_advert() {
382
  $output = '<div class="amp-ad-wrapper amp_ad_5">';
383
  $output .= '<amp-ad class="amp-ad-5"
384
  type="adsense"
385
- width='. $advert_width .' height='. $advert_height . '
386
- data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-5'].'"
387
- data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-5'] .'"';
388
  if($is_dboc){
389
  $output .= 'data-block-on-consent';
390
  }
@@ -400,7 +400,7 @@ function ampforwp_below_the_title_advert() {
400
  }
401
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
402
  $output = apply_filters('ampforwp_modify_ad_5',$output );
403
- echo $output;
404
  }
405
 
406
 
@@ -455,10 +455,10 @@ function ampforwp_above_related_post_advert() {
455
  }
456
  $output = '<div class="amp-ad-wrapper amp_ad_6">';
457
  $output .= '<amp-ad class="amp-ad-6"
458
- type="adsense" '. $optimize .'
459
- width='. $advert_width .' height='. $advert_height . '
460
- data-ad-client="'. $redux_builder_amp['enable-amp-ads-text-feild-client-6'].'"
461
- data-ad-slot="'. $redux_builder_amp['enable-amp-ads-text-feild-slot-6'] .'"';
462
  if($is_dboc){
463
  $output .= 'data-block-on-consent';
464
  }
@@ -474,7 +474,7 @@ function ampforwp_above_related_post_advert() {
474
  }
475
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
476
  $output = apply_filters('ampforwp_modify_ad_6',$output );
477
- echo $output;
478
  }
479
  // Ads Sponsorship output
480
  function ampforwp_ads_sponsorship(){
63
  $output = '<div class="amp-ad-wrapper amp_ad_1">';
64
  $output .= '<amp-ad class="amp-ad-1"
65
  type="adsense"
66
+ width='. esc_attr($advert_width) .' height='. esc_attr($advert_height) . '
67
+ data-ad-client="'. ampforwp_get_setting('enable-amp-ads-text-feild-client-1').'"
68
+ data-ad-slot="'. ampforwp_get_setting('enable-amp-ads-text-feild-slot-1') .'"';
69
  if($is_dboc){
70
  $output .= 'data-block-on-consent';
71
  }
81
  }
82
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
83
  $output = apply_filters('ampforwp_modify_ad_1',$output );
84
+ echo $output; // escaped above
85
  }
86
 
87
  // Above Footer Global
138
  }
139
  $output = '<div class="amp-ad-wrapper amp_ad_2">';
140
  $output .= '<amp-ad class="amp-ad-2"
141
+ type="adsense" '. esc_attr($optimize) .'
142
+ width='. esc_attr($advert_width) .' height='. esc_attr($advert_height) . '
143
+ data-ad-client="'. ampforwp_get_setting('enable-amp-ads-text-feild-client-2').'"
144
+ data-ad-slot="'. ampforwp_get_setting('enable-amp-ads-text-feild-slot-2') .'"';
145
  if($is_dboc){
146
  $output .= 'data-block-on-consent';
147
  }
157
  }
158
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
159
  $output = apply_filters('ampforwp_modify_ad_2',$output );
160
+ echo $output; // escaped above
161
  }
162
 
163
  // Above Post Content
234
  $output = '<div class="amp-ad-wrapper amp_ad_3">';
235
  $output .= '<amp-ad class="amp-ad-3"
236
  type="adsense"
237
+ width='. esc_attr($advert_width).' height='. esc_attr($advert_height) . '
238
+ data-ad-client="'. ampforwp_get_setting('enable-amp-ads-text-feild-client-3').'"
239
+ data-ad-slot="'. ampforwp_get_setting('enable-amp-ads-text-feild-slot-3') .'"';
240
  if($is_dboc){
241
  $output .= 'data-block-on-consent';
242
  }
252
  }
253
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
254
  $output = apply_filters('ampforwp_modify_ad_3',$output );
255
+ echo $output; // escaped above
256
  }
257
  }
258
  }
310
  }
311
  $output = '<div class="amp-ad-wrapper amp_ad_4">';
312
  $output .= '<amp-ad class="amp-ad-4"
313
+ type="adsense" '. esc_attr($optimize) .'
314
+ width='. esc_attr($advert_width) .' height='. esc_attr($advert_height) . '
315
+ data-ad-client="'. ampforwp_get_setting('enable-amp-ads-text-feild-client-4').'"
316
+ data-ad-slot="'. ampforwp_get_setting('enable-amp-ads-text-feild-slot-4') .'"';
317
  if($is_dboc){
318
  $output .= 'data-block-on-consent';
319
  }
329
  }
330
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
331
  $output = apply_filters('ampforwp_modify_ad_4',$output );
332
+ echo $output; // escaped above
333
  }
334
 
335
  // Below The Title
382
  $output = '<div class="amp-ad-wrapper amp_ad_5">';
383
  $output .= '<amp-ad class="amp-ad-5"
384
  type="adsense"
385
+ width='. esc_attr($advert_width) .' height='. esc_attr($advert_height) . '
386
+ data-ad-client="'. ampforwp_get_setting('enable-amp-ads-text-feild-client-5').'"
387
+ data-ad-slot="'. ampforwp_get_setting('enable-amp-ads-text-feild-slot-5') .'"';
388
  if($is_dboc){
389
  $output .= 'data-block-on-consent';
390
  }
400
  }
401
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
402
  $output = apply_filters('ampforwp_modify_ad_5',$output );
403
+ echo $output; // escaped above
404
  }
405
 
406
 
455
  }
456
  $output = '<div class="amp-ad-wrapper amp_ad_6">';
457
  $output .= '<amp-ad class="amp-ad-6"
458
+ type="adsense" '. esc_attr($optimize) .'
459
+ width='. esc_attr($advert_width) .' height='. esc_attr($advert_height) . '
460
+ data-ad-client="'. ampforwp_get_setting('enable-amp-ads-text-feild-client-6').'"
461
+ data-ad-slot="'. ampforwp_get_setting('enable-amp-ads-text-feild-slot-6') .'"';
462
  if($is_dboc){
463
  $output .= 'data-block-on-consent';
464
  }
474
  }
475
  $output = apply_filters('ampforwp_modify_ads',$output,$advert_width,$advert_height, $client_id, $data_slot);
476
  $output = apply_filters('ampforwp_modify_ad_6',$output );
477
+ echo $output; // escaped above
478
  }
479
  // Ads Sponsorship output
480
  function ampforwp_ads_sponsorship(){
includes/features/analytics/analytics-functions.php CHANGED
@@ -278,7 +278,7 @@ function ampforwp_facebook_pixel() {
278
  $amp_pixel .= 'data-block-on-consent';
279
  }
280
  $amp_pixel .= ' src="https://www.facebook.com/tr?id='.esc_attr(ampforwp_get_setting('amp-fb-pixel-id')).'&ev=PageView&noscript=1"></amp-pixel>';
281
- echo $amp_pixel;
282
  }
283
  }
284
  // For Setting up Google AMP Client ID API
278
  $amp_pixel .= 'data-block-on-consent';
279
  }
280
  $amp_pixel .= ' src="https://www.facebook.com/tr?id='.esc_attr(ampforwp_get_setting('amp-fb-pixel-id')).'&ev=PageView&noscript=1"></amp-pixel>';
281
+ echo $amp_pixel; // escaped above
282
  }
283
  }
284
  // For Setting up Google AMP Client ID API
includes/features/functions.php CHANGED
@@ -27,6 +27,10 @@ function ampforwp_add_admin_styling($hook_suffix){
27
  if( current_user_can("manage_options") && $hook_suffix=='toplevel_page_amp_options' ){
28
  $redux_data = $redux_builder_amp;
29
  }
 
 
 
 
30
  wp_localize_script( 'ampforwp_admin_js', 'redux_data', $redux_data );
31
  wp_localize_script( 'ampforwp_admin_js', 'ampforwp_nonce', wp_create_nonce('ampforwp-verify-request') );
32
  wp_enqueue_script( 'ampforwp_admin_js' );
@@ -957,7 +961,7 @@ function checkAMPforPageBuilderStatus($postId){
957
 
958
  $ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
959
 
960
- if( $ampforwp_pagebuilder_enable=='yes' && true == ampforwp_get_setting('ampforwp-pagebuilder')){
961
  $response = true;
962
  }else{
963
  $response = false;
27
  if( current_user_can("manage_options") && $hook_suffix=='toplevel_page_amp_options' ){
28
  $redux_data = $redux_builder_amp;
29
  }
30
+ if( current_user_can("manage_options") && $hook_suffix == 'options-reading.php' && 0 == $redux_builder_amp['amp-frontpage-select-option']) {
31
+ $redux_data['frontpage'] = 'false';
32
+ $redux_data['admin_url'] = esc_url(admin_url("admin.php?page=amp_options&tabid=opt-text-subsection#redux_builder_amp-ampforwp-homepage-on-off-support"));
33
+ }
34
  wp_localize_script( 'ampforwp_admin_js', 'redux_data', $redux_data );
35
  wp_localize_script( 'ampforwp_admin_js', 'ampforwp_nonce', wp_create_nonce('ampforwp-verify-request') );
36
  wp_enqueue_script( 'ampforwp_admin_js' );
961
 
962
  $ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
963
 
964
+ if( $ampforwp_pagebuilder_enable=='yes' && true == ampforwp_get_setting('ampforwp-pagebuilder') && ( function_exists('amppb_post_content') && !empty(amppb_post_content(''))) ){
965
  $response = true;
966
  }else{
967
  $response = false;
includes/features/notice-bar/notice-bar-functions.php CHANGED
@@ -25,12 +25,12 @@ function ampforwp_footer() {
25
  <?php if($redux_builder_amp['amp-enable-notifications'] == true && (isset($redux_builder_amp['amp-gdpr-compliance-switch']) && $redux_builder_amp['amp-gdpr-compliance-switch'] == 0) ) { ?>
26
  <!-- Thanks to @nicholasgriffintn for Cookie Notification Code-->
27
  <amp-user-notification layout=nodisplay id="amp-user-notification1">
28
- <p><?php echo $redux_builder_amp['amp-notification-text']; ?> </p>
29
  <?php if ( ampforwp_get_setting('amp-enable-links') ){ ?>
30
  <a class="amp-not-privacy amp-not-page-link" href="<?php echo esc_url( ampforwp_get_setting('amp-notice-bar-select-privacy-page')); ?>" target="_blank"><?php echo esc_attr(ampforwp_get_setting('amp-notice-bar-privacy-page-button-text')); ?>
31
  </a>
32
  <?php } ?>
33
- <button on="tap:amp-user-notification1.dismiss"><?php echo $redux_builder_amp['amp-accept-button-text']; ?></button>
34
  </amp-user-notification>
35
  <?php }
36
  }
25
  <?php if($redux_builder_amp['amp-enable-notifications'] == true && (isset($redux_builder_amp['amp-gdpr-compliance-switch']) && $redux_builder_amp['amp-gdpr-compliance-switch'] == 0) ) { ?>
26
  <!-- Thanks to @nicholasgriffintn for Cookie Notification Code-->
27
  <amp-user-notification layout=nodisplay id="amp-user-notification1">
28
+ <p><?php echo esc_html__(ampforwp_get_setting('amp-notification-text'),'accelerated-mobile-pages'); ?> </p>
29
  <?php if ( ampforwp_get_setting('amp-enable-links') ){ ?>
30
  <a class="amp-not-privacy amp-not-page-link" href="<?php echo esc_url( ampforwp_get_setting('amp-notice-bar-select-privacy-page')); ?>" target="_blank"><?php echo esc_attr(ampforwp_get_setting('amp-notice-bar-privacy-page-button-text')); ?>
31
  </a>
32
  <?php } ?>
33
+ <button on="tap:amp-user-notification1.dismiss"><?php echo esc_html__(ampforwp_get_setting('amp-accept-button-text'),'accelerated-mobile-pages'); ?></button>
34
  </amp-user-notification>
35
  <?php }
36
  }
includes/features/notice-bar/notice-bar-options.php CHANGED
@@ -186,15 +186,7 @@ function ampforwp_notice_bar_options($opt_name){
186
  'required' => array('amp-gdpr-compliance-switch', '=' , '1'),
187
  ),
188
  array(
189
- 'id' => 'ampforwp-notice_popup',
190
- 'type' => 'section',
191
- 'title' => esc_html__('PopUp for AMP', 'accelerated-mobile-pages'),
192
- 'indent' => true,
193
- 'layout_type' => 'accordion',
194
- 'accordion-open'=> 1,
195
- ),
196
- array(
197
- 'class' => 'child_opt child_opt_arrow',
198
  'id' => 'info_normal_amp_popup',
199
  'type' => 'info',
200
  'desc' => '<a href="https://ampforwp.com/amp-popup/" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/popup_ext.png" width="560" height="85" /></a>',
186
  'required' => array('amp-gdpr-compliance-switch', '=' , '1'),
187
  ),
188
  array(
189
+ 'class' => 'amp-popup-fld',
 
 
 
 
 
 
 
 
190
  'id' => 'info_normal_amp_popup',
191
  'type' => 'info',
192
  'desc' => '<a href="https://ampforwp.com/amp-popup/" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/popup_ext.png" width="560" height="85" /></a>',
includes/features/pagebuilders-support/pagebuilders_support.php CHANGED
@@ -26,6 +26,22 @@ $elemntr_pb_for_ampchecker = array(
26
  ),
27
  'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
28
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  if( !function_exists('amp_activate') ){
30
  $pb_for_amp[] = array(
31
  'id' => 'ampforwp-pagebuilder-accor',
@@ -92,10 +108,42 @@ $elemntr_pb_for_ampchecker = array(
92
  'default' => false
93
  );
94
  $pb_for_amp[] = $elemntr_pb_for_ampchecker;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  $pb_title = 'Page Builder';
97
  $theme = wp_get_theme(); // gets the current theme
98
- if( class_exists('Vc_Manager') || ( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ) || did_action( 'elementor/loaded' ) ){
99
  if(class_exists('Vc_Manager') ){
100
  $pb_title = 'WPBakery Page Builder Support';
101
  }
@@ -105,6 +153,9 @@ $elemntr_pb_for_ampchecker = array(
105
  if(did_action( 'elementor/loaded' ) ){
106
  $pb_title = 'Elementor Support';
107
  }
 
 
 
108
  }
109
  Redux::setSection( $opt_name, array(
110
  'title' => esc_html__( $pb_title, 'accelerated-mobile-pages' ),
26
  ),
27
  'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
28
  );
29
+ $avada_pb_for_ampchecker = array(
30
+ 'id' => 'avada_pb_for_amp_info_normal',
31
+ 'type' => 'info',
32
+ 'required' => array(
33
+ array('ampforwp-avada-pb-for-amp', '=' , true),
34
+ ),
35
+ 'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder compatibility For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
36
+ );
37
+ $avia_pb_for_ampchecker = array(
38
+ 'id' => 'avia_pb_for_amp_info_normal',
39
+ 'type' => 'info',
40
+ 'required' => array(
41
+ array('ampforwp-avia-pb-for-amp', '=' , true),
42
+ ),
43
+ 'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder compatibility For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
44
+ );
45
  if( !function_exists('amp_activate') ){
46
  $pb_for_amp[] = array(
47
  'id' => 'ampforwp-pagebuilder-accor',
108
  'default' => false
109
  );
110
  $pb_for_amp[] = $elemntr_pb_for_ampchecker;
111
+ $pb_for_amp[] = array(
112
+ 'id' => 'ampforwp-avada-pb-for-amp-accor',
113
+ 'type' => 'section',
114
+ 'title' => esc_html__('Avada(Fusion builder) Compatibility', 'accelerated-mobile-pages'),
115
+ 'indent' => true,
116
+ 'layout_type' => 'accordion',
117
+ 'accordion-open'=> 1,
118
+ );
119
+ $pb_for_amp[] = array(
120
+ 'id' => 'ampforwp-avada-pb-for-amp',
121
+ 'type' => 'switch',
122
+ 'title' => esc_html__('Avada(Fusion builder) Support','accelerated-mobile-pages'),
123
+ 'tooltip-subtitle' => esc_html__('Enable or Disable the Avada support for AMP', 'accelerated-mobile-pages'),
124
+ 'default' => false
125
+ );
126
+ $pb_for_amp[] = $avada_pb_for_ampchecker;
127
+ $pb_for_amp[] = array(
128
+ 'id' => 'ampforwp-avia-pb-for-amp-accor',
129
+ 'type' => 'section',
130
+ 'title' => esc_html__('Avia(Enfold) Compatibility', 'accelerated-mobile-pages'),
131
+ 'indent' => true,
132
+ 'layout_type' => 'accordion',
133
+ 'accordion-open'=> 1,
134
+ );
135
+ $pb_for_amp[] = array(
136
+ 'id' => 'ampforwp-avia-pb-for-amp',
137
+ 'type' => 'switch',
138
+ 'title' => esc_html__('Avia(Enfold) Support','accelerated-mobile-pages'),
139
+ 'tooltip-subtitle' => esc_html__('Enable or Disable the Avia support for AMP', 'accelerated-mobile-pages'),
140
+ 'default' => false
141
+ );
142
+ $pb_for_amp[] = $avia_pb_for_ampchecker;
143
 
144
  $pb_title = 'Page Builder';
145
  $theme = wp_get_theme(); // gets the current theme
146
+ if( class_exists('Vc_Manager') || ( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ) || did_action( 'elementor/loaded' ) || class_exists( 'FusionBuilder' ) ){
147
  if(class_exists('Vc_Manager') ){
148
  $pb_title = 'WPBakery Page Builder Support';
149
  }
153
  if(did_action( 'elementor/loaded' ) ){
154
  $pb_title = 'Elementor Support';
155
  }
156
+ if ( class_exists( 'FusionBuilder' ) ) {
157
+ $pb_title = 'Avada Fusion Builder Support';
158
+ }
159
  }
160
  Redux::setSection( $opt_name, array(
161
  'title' => esc_html__( $pb_title, 'accelerated-mobile-pages' ),
includes/options/admin-config.php CHANGED
@@ -1413,6 +1413,7 @@ Redux::setArgs( "redux_builder_amp", $args );
1413
  'title' => esc_html__('Resize', 'accelerated-mobile-pages'),
1414
  'type' => 'switch',
1415
  'default' => 0,
 
1416
  ),
1417
  array(
1418
  'id' => 'ampforwp-custom-logo-dimensions-options',
@@ -2302,6 +2303,13 @@ Redux::setSection( $opt_name, array(
2302
  );
2303
 
2304
  // Advance Settings SECTION
 
 
 
 
 
 
 
2305
  Redux::setSection( $opt_name, array(
2306
  'title' => esc_html__( 'Advance Settings', 'accelerated-mobile-pages' ),
2307
  'desc' => esc_html__( 'This section has some advanced settings, please use it with care','accelerated-mobile-pages'),
@@ -2415,6 +2423,7 @@ Redux::setSection( $opt_name, array(
2415
  'default' => 0,
2416
 
2417
  ),
 
2418
  // Featured Image from Custom Fields
2419
  array(
2420
  'id' => 'ampforwp-custom-fields-featured-image-switch',
@@ -4214,7 +4223,7 @@ Redux::setSection( $opt_name, array(
4214
  'required' => array(
4215
  array('amp-design-selector', '=' , '3')
4216
  ),
4217
- 'default' => '0'
4218
  ),
4219
 
4220
  array(
@@ -6242,6 +6251,8 @@ else{
6242
  'id' => 'ampforwp-social-share-amp',
6243
  'type' => 'switch',
6244
  'title' => esc_html__('Social Share links to AMP', 'accelerated-mobile-pages'),
 
 
6245
  'default' => 0,
6246
  ),
6247
  // Social No Follow links
@@ -6249,6 +6260,8 @@ else{
6249
  'id' => 'ampforwp-social-no-follow',
6250
  'type' => 'switch',
6251
  'title' => esc_html__('No Follow All Your Social Links', 'accelerated-mobile-pages'),
 
 
6252
  'default' => 0,
6253
  ),
6254
  // AddThis Support
1413
  'title' => esc_html__('Resize', 'accelerated-mobile-pages'),
1414
  'type' => 'switch',
1415
  'default' => 0,
1416
+ 'required'=>array('opt-media','!=',''),
1417
  ),
1418
  array(
1419
  'id' => 'ampforwp-custom-logo-dimensions-options',
2303
  );
2304
 
2305
  // Advance Settings SECTION
2306
+ function ampforwp_featured_video_default(){
2307
+ $default = '';
2308
+ if(function_exists( 'csco_setup' )){
2309
+ $default = 'csco_post_embed';
2310
+ }
2311
+ return $default;
2312
+ }
2313
  Redux::setSection( $opt_name, array(
2314
  'title' => esc_html__( 'Advance Settings', 'accelerated-mobile-pages' ),
2315
  'desc' => esc_html__( 'This section has some advanced settings, please use it with care','accelerated-mobile-pages'),
2423
  'default' => 0,
2424
 
2425
  ),
2426
+
2427
  // Featured Image from Custom Fields
2428
  array(
2429
  'id' => 'ampforwp-custom-fields-featured-image-switch',
4223
  'required' => array(
4224
  array('amp-design-selector', '=' , '3')
4225
  ),
4226
+ 'default' => '1'
4227
  ),
4228
 
4229
  array(
6251
  'id' => 'ampforwp-social-share-amp',
6252
  'type' => 'switch',
6253
  'title' => esc_html__('Social Share links to AMP', 'accelerated-mobile-pages'),
6254
+ 'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6255
+ esc_html__('Enable this option to share all your social links to AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-share-social-links-to-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6256
  'default' => 0,
6257
  ),
6258
  // Social No Follow links
6260
  'id' => 'ampforwp-social-no-follow',
6261
  'type' => 'switch',
6262
  'title' => esc_html__('No Follow All Your Social Links', 'accelerated-mobile-pages'),
6263
+ 'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6264
+ esc_html__('Enable this option to add no-follow to all your social links and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-no-follow-to-all-your-social-share-links/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6265
  'default' => 0,
6266
  ),
6267
  // AddThis Support
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -1184,3 +1184,14 @@ a.bfcm {
1184
  text-align: center;
1185
  display: block;
1186
  }
 
 
 
 
 
 
 
 
 
 
 
1184
  text-align: center;
1185
  display: block;
1186
  }
1187
+ #info-info_normal_amp_popup.redux-notice-field{
1188
+ padding: 0;
1189
+ box-shadow: none;
1190
+ border: none;
1191
+ }
1192
+ fieldset#redux_builder_amp-AMPforWP_cache_mode .description.field-desc {
1193
+ margin: 20px 0px;
1194
+ }
1195
+ .opt-go-amp-cache span.description {
1196
+ margin-left: 13px;
1197
+ }
includes/redirect.php CHANGED
@@ -27,10 +27,13 @@ function ampforwp_redirection() {
27
  }
28
  }
29
  }else{
30
- if( (is_archive() && 0 == ampforwp_get_setting('ampforwp-archive-support')) || (is_category() && 0 == ampforwp_get_setting('ampforwp-archive-support-cat')) || (is_tag() && 0 == ampforwp_get_setting('ampforwp-archive-support-tag')) ){
31
  $archive_check = true;
32
  }
33
  }
 
 
 
34
  if ( (true == $archive_check_tax) || ( true == $archive_check ) || true == $hide_cats_amp || ((ampforwp_is_home() || ampforwp_is_front_page()) && 0 == ampforwp_get_setting('ampforwp-homepage-on-off-support')) ) {
35
  $url = $wp->request;
36
  if( ampforwp_is_home() && get_query_var('amp') ) {
27
  }
28
  }
29
  }else{
30
+ if( ( (function_exists('is_shop') && !is_shop() ) && is_archive() && 0 == ampforwp_get_setting('ampforwp-archive-support')) || ( !function_exists('is_shop') &&is_archive() && 0 == ampforwp_get_setting('ampforwp-archive-support')) || (is_category() && 0 == ampforwp_get_setting('ampforwp-archive-support-cat')) || (is_tag() && 0 == ampforwp_get_setting('ampforwp-archive-support-tag')) ){
31
  $archive_check = true;
32
  }
33
  }
34
+ if( !function_exists('amp_woocommerce_pro_add_woocommerce_support') && ( (function_exists('is_product_category') && is_product_category()) || (function_exists('is_product_tag') && is_product_tag()) || (function_exists('is_shop') && is_shop() ) )){
35
+ $archive_check = true;
36
+ }
37
  if ( (true == $archive_check_tax) || ( true == $archive_check ) || true == $hide_cats_amp || ((ampforwp_is_home() || ampforwp_is_front_page()) && 0 == ampforwp_get_setting('ampforwp-homepage-on-off-support')) ) {
38
  $url = $wp->request;
39
  if( ampforwp_is_home() && get_query_var('amp') ) {
includes/thirdparty-compatibility.php CHANGED
@@ -44,7 +44,8 @@ function ampforwp_thirdparty_compatibility(){
44
  remove_filter( 'the_content', 'shortPixelConvertImgToPictureAddWebp', 10000 );
45
  remove_filter( 'the_excerpt', 'shortPixelConvertImgToPictureAddWebp', 10000 );
46
  remove_filter( 'post_thumbnail_html', 'shortPixelConvertImgToPictureAddWebp');
47
-
 
48
  //Validation errors in amp category page due to HotWP PRO #3455
49
  if(function_exists('hotwp_get_option') && is_category()){
50
  remove_all_filters('get_the_archive_title');
@@ -528,7 +529,7 @@ function ampforwp_simple_author_box(){
528
  $fontsImplementData = json_decode($fontsImplementRawData, true);
529
  if (!empty($fontsImplementData)):
530
  foreach ($fontsImplementData as $key=>$fontImplementData): ?>
531
- <?php echo $fontImplementData['font_elements']; ?>{
532
  font-family: '<?php echo esc_html($fontsData[$fontImplementData['font_key']]['font_name']); ?>';
533
  }
534
  <?php endforeach;
@@ -599,7 +600,7 @@ function ampforwp_seopress_social(){
599
  if (has_filter('seopress_social_og_url')) {
600
  $seopress_social_og_url = apply_filters('seopress_social_og_url', $seopress_social_og_url);
601
  }
602
- echo $seopress_social_og_url."\n";
603
  }
604
  if (isset($options['seopress_social_facebook_og'])) {
605
  $seopress_social_og_site_name = '<meta property="og:site_name" content="'.esc_html(get_bloginfo('name')).'" />';
@@ -607,7 +608,7 @@ function ampforwp_seopress_social(){
607
  if (has_filter('seopress_social_og_site_name')) {
608
  $seopress_social_og_site_name = apply_filters('seopress_social_og_site_name', $seopress_social_og_site_name);
609
  }
610
- echo $seopress_social_og_site_name."\n";
611
  }
612
  if (isset($options['seopress_social_facebook_og'])) {
613
  $seopress_social_og_locale = '<meta property="og:locale" content="'.esc_attr(get_locale()).'" />';
@@ -637,7 +638,7 @@ function ampforwp_seopress_social(){
637
  $seopress_social_og_locale = apply_filters('seopress_social_og_locale', $seopress_social_og_locale);
638
  }
639
  if (isset($seopress_social_og_locale) && $seopress_social_og_locale !='') {
640
- echo $seopress_social_og_locale."\n";
641
  }
642
  }
643
  if (isset($options['seopress_social_facebook_og'])) {
@@ -664,7 +665,7 @@ function ampforwp_seopress_social(){
664
  if (has_filter('seopress_social_og_type')) {
665
  $seopress_social_og_type = apply_filters('seopress_social_og_type', $seopress_social_og_type);
666
  }
667
- echo $seopress_social_og_type."\n";
668
  }
669
  }
670
  if ( isset($options['seopress_social_facebook_og']) && ( isset($options['seopress_social_accounts_facebook']) && '' != $options['seopress_social_accounts_facebook'] ) ) {
@@ -686,7 +687,7 @@ function ampforwp_seopress_social(){
686
  if (has_filter('seopress_social_og_author')) {
687
  $seopress_social_og_author = apply_filters('seopress_social_og_author', $seopress_social_og_author);
688
  }
689
- echo $seopress_social_og_author."\n";
690
  }
691
  }
692
  if (isset($options['seopress_social_facebook_og'])) {
@@ -711,7 +712,7 @@ function ampforwp_seopress_social(){
711
  $seopress_social_og_title = apply_filters('seopress_social_og_title', $seopress_social_og_title);
712
  }
713
  if (isset($seopress_social_og_title) && $seopress_social_og_title !='') {
714
- echo $seopress_social_og_title;
715
  }
716
  }
717
 
@@ -733,7 +734,7 @@ function ampforwp_seopress_social(){
733
  $seopress_social_og_desc = apply_filters('seopress_social_og_desc', $seopress_social_og_desc);
734
  }
735
  if (isset($seopress_social_og_desc) && $seopress_social_og_desc !='') {
736
- echo $seopress_social_og_desc;
737
  }
738
  }
739
  if (isset($options['seopress_social_facebook_og'])) {
@@ -787,21 +788,21 @@ function ampforwp_seopress_social(){
787
  $seopress_social_og_img = apply_filters('seopress_social_og_thumb', $seopress_social_og_img);
788
  }
789
  if (isset($seopress_social_og_img) && $seopress_social_og_img !='') {
790
- echo $seopress_social_og_img;
791
  }
792
  }
793
  }
794
  if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id'])) {
795
  $seopress_social_link_ownership_id = '<meta property="fb:pages" content="'.esc_attr($options['seopress_social_facebook_link_ownership_id']).'" />';
796
- echo $seopress_social_link_ownership_id."\n";
797
  }
798
  if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id']) ) {
799
  $seopress_social_admin_id = '<meta property="fb:admins" content="'.esc_attr($options['seopress_social_facebook_admin_id']).'" />';
800
- echo $seopress_social_admin_id."\n";
801
  }
802
  if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id']) ) {
803
  $seopress_social_app_id = '<meta property="fb:app_id" content="'.esc_attr($options['seopress_social_facebook_app_id']).'" />';
804
- echo $seopress_social_app_id."\n";
805
  }
806
  if (isset($options['seopress_social_twitter_card'])) {
807
  if ( isset($options['seopress_social_twitter_card_img_size']) && $options['seopress_social_twitter_card_img_size'] =='large') {
@@ -813,7 +814,7 @@ function ampforwp_seopress_social(){
813
  if (has_filter('seopress_social_twitter_card_summary')) {
814
  $seopress_social_twitter_card_summary = apply_filters('seopress_social_twitter_card_summary', $seopress_social_twitter_card_summary);
815
  }
816
- echo $seopress_social_twitter_card_summary."\n";
817
  }
818
  if (isset($options['seopress_social_twitter_card']) && isset($options['seopress_social_accounts_twitter']) ) {
819
  $seopress_social_twitter_card_site = '<meta name="twitter:site" content="'.esc_attr($options['seopress_social_accounts_twitter']).'" />';
@@ -821,7 +822,7 @@ function ampforwp_seopress_social(){
821
  if (has_filter('seopress_social_twitter_card_site')) {
822
  $seopress_social_twitter_card_site = apply_filters('seopress_social_twitter_card_site', $seopress_social_twitter_card_site);
823
  }
824
- echo $seopress_social_twitter_card_site."\n";
825
  }
826
  if (isset($options['seopress_social_twitter_card'])) {
827
  //Init
@@ -838,7 +839,7 @@ function ampforwp_seopress_social(){
838
  $seopress_social_twitter_card_creator = apply_filters('seopress_social_twitter_card_creator', $seopress_social_twitter_card_creator);
839
  }
840
  if (isset($seopress_social_twitter_card_creator) && $seopress_social_twitter_card_creator !='') {
841
- echo $seopress_social_twitter_card_creator."\n";
842
  }
843
  }
844
  if (isset($options['seopress_social_twitter_card'])) {
@@ -868,7 +869,7 @@ function ampforwp_seopress_social(){
868
  $seopress_social_twitter_card_title = apply_filters('seopress_social_twitter_card_title', $seopress_social_twitter_card_title);
869
  }
870
  if (isset($seopress_social_twitter_card_title) && $seopress_social_twitter_card_title !='') {
871
- echo $seopress_social_twitter_card_title."\n";
872
  }
873
  }
874
  if (isset($options['seopress_social_twitter_card'])) {
@@ -896,7 +897,7 @@ function ampforwp_seopress_social(){
896
  $seopress_social_twitter_card_desc = apply_filters('seopress_social_twitter_card_desc', $seopress_social_twitter_card_desc);
897
  }
898
  if (isset($seopress_social_twitter_card_desc) && $seopress_social_twitter_card_desc !='') {
899
- echo $seopress_social_twitter_card_desc."\n";
900
  }
901
  }
902
  if (isset($options['seopress_social_twitter_card'])) {
@@ -957,7 +958,7 @@ function ampforwp_seopress_social(){
957
  $seopress_twitter_img = apply_filters('seopress_social_og_thumb', $seopress_twitter_img);
958
  }
959
  if (isset($seopress_twitter_img) && $seopress_twitter_img !='') {
960
- echo $seopress_twitter_img;
961
  }
962
  }
963
  }
44
  remove_filter( 'the_content', 'shortPixelConvertImgToPictureAddWebp', 10000 );
45
  remove_filter( 'the_excerpt', 'shortPixelConvertImgToPictureAddWebp', 10000 );
46
  remove_filter( 'post_thumbnail_html', 'shortPixelConvertImgToPictureAddWebp');
47
+ //Validation error with Authentic theme #3535
48
+ remove_filter( 'amp_post_template_data', 'csco_amp_post_template_data', 10, 2 );
49
  //Validation errors in amp category page due to HotWP PRO #3455
50
  if(function_exists('hotwp_get_option') && is_category()){
51
  remove_all_filters('get_the_archive_title');
529
  $fontsImplementData = json_decode($fontsImplementRawData, true);
530
  if (!empty($fontsImplementData)):
531
  foreach ($fontsImplementData as $key=>$fontImplementData): ?>
532
+ <?php echo $fontImplementData['font_elements']; // escaped above ?>{
533
  font-family: '<?php echo esc_html($fontsData[$fontImplementData['font_key']]['font_name']); ?>';
534
  }
535
  <?php endforeach;
600
  if (has_filter('seopress_social_og_url')) {
601
  $seopress_social_og_url = apply_filters('seopress_social_og_url', $seopress_social_og_url);
602
  }
603
+ echo $seopress_social_og_url."\n"; // escaped above
604
  }
605
  if (isset($options['seopress_social_facebook_og'])) {
606
  $seopress_social_og_site_name = '<meta property="og:site_name" content="'.esc_html(get_bloginfo('name')).'" />';
608
  if (has_filter('seopress_social_og_site_name')) {
609
  $seopress_social_og_site_name = apply_filters('seopress_social_og_site_name', $seopress_social_og_site_name);
610
  }
611
+ echo $seopress_social_og_site_name."\n"; // escaped above
612
  }
613
  if (isset($options['seopress_social_facebook_og'])) {
614
  $seopress_social_og_locale = '<meta property="og:locale" content="'.esc_attr(get_locale()).'" />';
638
  $seopress_social_og_locale = apply_filters('seopress_social_og_locale', $seopress_social_og_locale);
639
  }
640
  if (isset($seopress_social_og_locale) && $seopress_social_og_locale !='') {
641
+ echo $seopress_social_og_locale."\n"; // escaped above
642
  }
643
  }
644
  if (isset($options['seopress_social_facebook_og'])) {
665
  if (has_filter('seopress_social_og_type')) {
666
  $seopress_social_og_type = apply_filters('seopress_social_og_type', $seopress_social_og_type);
667
  }
668
+ echo $seopress_social_og_type."\n"; // escaped above
669
  }
670
  }
671
  if ( isset($options['seopress_social_facebook_og']) && ( isset($options['seopress_social_accounts_facebook']) && '' != $options['seopress_social_accounts_facebook'] ) ) {
687
  if (has_filter('seopress_social_og_author')) {
688
  $seopress_social_og_author = apply_filters('seopress_social_og_author', $seopress_social_og_author);
689
  }
690
+ echo $seopress_social_og_author."\n"; // escaped above
691
  }
692
  }
693
  if (isset($options['seopress_social_facebook_og'])) {
712
  $seopress_social_og_title = apply_filters('seopress_social_og_title', $seopress_social_og_title);
713
  }
714
  if (isset($seopress_social_og_title) && $seopress_social_og_title !='') {
715
+ echo $seopress_social_og_title; // escaped above
716
  }
717
  }
718
 
734
  $seopress_social_og_desc = apply_filters('seopress_social_og_desc', $seopress_social_og_desc);
735
  }
736
  if (isset($seopress_social_og_desc) && $seopress_social_og_desc !='') {
737
+ echo $seopress_social_og_desc; // escaped above
738
  }
739
  }
740
  if (isset($options['seopress_social_facebook_og'])) {
788
  $seopress_social_og_img = apply_filters('seopress_social_og_thumb', $seopress_social_og_img);
789
  }
790
  if (isset($seopress_social_og_img) && $seopress_social_og_img !='') {
791
+ echo $seopress_social_og_img; // escaped above
792
  }
793
  }
794
  }
795
  if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id'])) {
796
  $seopress_social_link_ownership_id = '<meta property="fb:pages" content="'.esc_attr($options['seopress_social_facebook_link_ownership_id']).'" />';
797
+ echo $seopress_social_link_ownership_id."\n"; // escaped above
798
  }
799
  if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id']) ) {
800
  $seopress_social_admin_id = '<meta property="fb:admins" content="'.esc_attr($options['seopress_social_facebook_admin_id']).'" />';
801
+ echo $seopress_social_admin_id."\n"; // escaped above
802
  }
803
  if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id']) ) {
804
  $seopress_social_app_id = '<meta property="fb:app_id" content="'.esc_attr($options['seopress_social_facebook_app_id']).'" />';
805
+ echo $seopress_social_app_id."\n"; // escaped above
806
  }
807
  if (isset($options['seopress_social_twitter_card'])) {
808
  if ( isset($options['seopress_social_twitter_card_img_size']) && $options['seopress_social_twitter_card_img_size'] =='large') {
814
  if (has_filter('seopress_social_twitter_card_summary')) {
815
  $seopress_social_twitter_card_summary = apply_filters('seopress_social_twitter_card_summary', $seopress_social_twitter_card_summary);
816
  }
817
+ echo $seopress_social_twitter_card_summary."\n"; // escaped above
818
  }
819
  if (isset($options['seopress_social_twitter_card']) && isset($options['seopress_social_accounts_twitter']) ) {
820
  $seopress_social_twitter_card_site = '<meta name="twitter:site" content="'.esc_attr($options['seopress_social_accounts_twitter']).'" />';
822
  if (has_filter('seopress_social_twitter_card_site')) {
823
  $seopress_social_twitter_card_site = apply_filters('seopress_social_twitter_card_site', $seopress_social_twitter_card_site);
824
  }
825
+ echo $seopress_social_twitter_card_site."\n"; // escaped above
826
  }
827
  if (isset($options['seopress_social_twitter_card'])) {
828
  //Init
839
  $seopress_social_twitter_card_creator = apply_filters('seopress_social_twitter_card_creator', $seopress_social_twitter_card_creator);
840
  }
841
  if (isset($seopress_social_twitter_card_creator) && $seopress_social_twitter_card_creator !='') {
842
+ echo $seopress_social_twitter_card_creator."\n"; // escaped above
843
  }
844
  }
845
  if (isset($options['seopress_social_twitter_card'])) {
869
  $seopress_social_twitter_card_title = apply_filters('seopress_social_twitter_card_title', $seopress_social_twitter_card_title);
870
  }
871
  if (isset($seopress_social_twitter_card_title) && $seopress_social_twitter_card_title !='') {
872
+ echo $seopress_social_twitter_card_title."\n"; // escaped above
873
  }
874
  }
875
  if (isset($options['seopress_social_twitter_card'])) {
897
  $seopress_social_twitter_card_desc = apply_filters('seopress_social_twitter_card_desc', $seopress_social_twitter_card_desc);
898
  }
899
  if (isset($seopress_social_twitter_card_desc) && $seopress_social_twitter_card_desc !='') {
900
+ echo $seopress_social_twitter_card_desc."\n"; // escaped above
901
  }
902
  }
903
  if (isset($options['seopress_social_twitter_card'])) {
958
  $seopress_twitter_img = apply_filters('seopress_social_og_thumb', $seopress_twitter_img);
959
  }
960
  if (isset($seopress_twitter_img) && $seopress_twitter_img !='') {
961
+ echo $seopress_twitter_img; // escaped above
962
  }
963
  }
964
  }
includes/vendor/amp/back-compat/templates-v0-3/meta-taxonomy.php CHANGED
@@ -2,7 +2,8 @@
2
  <?php if ( $categories ) : ?>
3
  <li class="amp-wp-tax-category">
4
  <span class="screen-reader-text">Categories:</span>
5
- <?php echo $categories; ?>
 
6
  </li>
7
  <?php endif; ?>
8
 
@@ -10,6 +11,6 @@
10
  <?php if ( $tags && ! is_wp_error( $tags ) ) : ?>
11
  <li class="amp-wp-tax-tag">
12
  <span class="screen-reader-text">Tags:</span>
13
- <?php echo $tags; ?>
14
  </li>
15
  <?php endif; ?>
2
  <?php if ( $categories ) : ?>
3
  <li class="amp-wp-tax-category">
4
  <span class="screen-reader-text">Categories:</span>
5
+ <?php
6
+ echo esc_html($categories); ?>
7
  </li>
8
  <?php endif; ?>
9
 
11
  <?php if ( $tags && ! is_wp_error( $tags ) ) : ?>
12
  <li class="amp-wp-tax-tag">
13
  <span class="screen-reader-text">Tags:</span>
14
+ <?php echo esc_html($tags); ?>
15
  </li>
16
  <?php endif; ?>
includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php CHANGED
@@ -41,18 +41,7 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
41
  if($node->nodeName=='a' && $node->hasAttribute('href')){
42
  $href = $node->getAttribute('href');
43
  $node->setAttribute('href', \ampforwp_findInternalUrl($href));
44
- // Adding rel="noreferrer" to external links to prevent security vulnerabilities #3276
45
- if ( \ampforwp_isexternal($href) ) {
46
- if ($node->hasAttribute('rel') ){
47
- $rel = $node->getAttribute('rel');
48
- if(strpos($rel, 'nofollow') !== false){
49
- $node->setAttribute('rel', 'nofollow noreferrer');
50
- }else{
51
- $node->setAttribute('rel', 'noreferrer');
52
- }
53
- }
54
-
55
- }
56
  }
57
 
58
  // Some nodes may contain valid content but are themselves invalid.
41
  if($node->nodeName=='a' && $node->hasAttribute('href')){
42
  $href = $node->getAttribute('href');
43
  $node->setAttribute('href', \ampforwp_findInternalUrl($href));
44
+
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
  // Some nodes may contain valid content but are themselves invalid.
includes/vendor/amp/includes/sanitizers/class-amp-gallery-block-sanitizer.php CHANGED
@@ -388,5 +388,5 @@ function ampforwp_gallery_lightbox(){
388
  role="button" tabindex="0"></button>
389
  </div>
390
  </amp-image-lightbox>';
391
- echo $amp_image_lightbox;
392
  }
388
  role="button" tabindex="0"></button>
389
  </div>
390
  </amp-image-lightbox>';
391
+ echo $amp_image_lightbox; // nothing to escaped
392
  }
includes/vendor/amp/includes/sanitizers/class-amp-style-sanitizer.php CHANGED
@@ -568,7 +568,7 @@ class AMP_Style_Sanitizer extends AMP_Base_Sanitizer {
568
  */
569
  private function generate_class_name( $data ) {
570
  $string = maybe_serialize( $data );
571
- return 'amp-wp-inline-' . md5( $string );
572
  }
573
  private function ampforwp_remove_spaces_from_data_urls( $style_css ) {
574
  $new_style_css = array();
568
  */
569
  private function generate_class_name( $data ) {
570
  $string = maybe_serialize( $data );
571
+ return 'amp-wp-inline-' . substr(md5($string), 0, 7);
572
  }
573
  private function ampforwp_remove_spaces_from_data_urls( $style_css ) {
574
  $new_style_css = array();
includes/vendor/amp/includes/widgets/class-amp-widget-categories.php CHANGED
@@ -61,7 +61,7 @@ if ( ! class_exists('AMP_Widget_Categories') ) {
61
  $dropdown,
62
  1
63
  );
64
- echo $dropdown; // WPCS: XSS OK.
65
  echo '</form>';
66
  else :
67
  ?>
61
  $dropdown,
62
  1
63
  );
64
+ echo $dropdown; // WPCS: XSS OK. escaped above
65
  echo '</form>';
66
  else :
67
  ?>
includes/vendor/tinymce-widget/includes/class-widget.php CHANGED
@@ -54,14 +54,14 @@ if ( ! class_exists( 'WP_Widget_Black_Studio_TinyMCE' ) ) {
54
  $title = empty( $instance['title'] ) ? '' : $instance['title'];
55
  $title = apply_filters( 'widget_title', $title , $instance, $this->id_base );
56
  $text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance, $this );
57
- $markup_title = '<div class="amp_module_title"><span>' . $title . '</span></div>';
58
- $markup_text = '<div class="amp_cb_text_content">' . $text . '</div>';
59
  $hide_empty = apply_filters( 'black_studio_tinymce_hide_empty', false, $instance );
60
  if ( ! ( $hide_empty && empty( $text ) ) ) {
61
  $output = $before_widget;
62
  $output .= $before_text . $markup_title . $markup_text . $after_text;
63
  $output .= $after_widget;
64
- echo $output; // xss ok
65
  }
66
  do_action( 'black_studio_tinymce_after_widget', $args, $instance );
67
  }
54
  $title = empty( $instance['title'] ) ? '' : $instance['title'];
55
  $title = apply_filters( 'widget_title', $title , $instance, $this->id_base );
56
  $text = apply_filters( 'widget_text', empty( $instance['text'] ) ? '' : $instance['text'], $instance, $this );
57
+ $markup_title = '<div class="amp_module_title"><span>' . esc_html__($title,'accelerated-mobile-pages') . '</span></div>';
58
+ $markup_text = '<div class="amp_cb_text_content">' . esc_html__($text,'accelerated-mobile-pages') . '</div>';
59
  $hide_empty = apply_filters( 'black_studio_tinymce_hide_empty', false, $instance );
60
  if ( ! ( $hide_empty && empty( $text ) ) ) {
61
  $output = $before_widget;
62
  $output .= $before_text . $markup_title . $markup_text . $after_text;
63
  $output .= $after_widget;
64
+ echo $output; // xss ok, escaped above
65
  }
66
  do_action( 'black_studio_tinymce_after_widget', $args, $instance );
67
  }
install/index.php CHANGED
@@ -225,7 +225,7 @@ if(isset($redux_builder_amp['opt-media']['url']) && $redux_builder_amp['opt-medi
225
  <circle class="icon--checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="icon--checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
226
  </svg>
227
 
228
- <h1><?php echo $stepDetails['title']; ?></h1>
229
 
230
  <p><?php echo esc_html__( 'This Installation Wizard helps you to setup the necessary options for AMP. It is optional & should take only a few minutes.' ,'accelerated-mobile-pages'); ?></p>
231
 
@@ -264,7 +264,7 @@ if(isset($redux_builder_amp['opt-media']['url']) && $redux_builder_amp['opt-medi
264
 
265
  <?php
266
  wp_enqueue_media ();
267
- echo $stepDetails['fields'];
268
  ?>
269
 
270
  </ul>
@@ -307,7 +307,7 @@ if(isset($redux_builder_amp['opt-media']['url']) && $redux_builder_amp['opt-medi
307
 
308
  <ul class="merlin__drawer--import-content">
309
  <?php
310
- echo $stepDetails['fields'];
311
  ?>
312
 
313
  </ul>
@@ -350,7 +350,7 @@ if(isset($redux_builder_amp['opt-media']['url']) && $redux_builder_amp['opt-medi
350
  <ul class="merlin__drawer--import-content">
351
  <li>
352
  <?php
353
- echo $stepDetails['fields'];
354
  ?>
355
  </li>
356
  </ul>
@@ -395,7 +395,7 @@ if(isset($redux_builder_amp['opt-media']['url']) && $redux_builder_amp['opt-medi
395
 
396
  <ul class="merlin__drawer--import-content">
397
  <?php
398
- echo $stepDetails['fields'];
399
  ?>
400
  </ul>
401
 
225
  <circle class="icon--checkmark__circle" cx="26" cy="26" r="25" fill="none"/><path class="icon--checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
226
  </svg>
227
 
228
+ <h1><?php echo esc_html__($stepDetails['title'],'accelerated-mobile-pages'); ?></h1>
229
 
230
  <p><?php echo esc_html__( 'This Installation Wizard helps you to setup the necessary options for AMP. It is optional & should take only a few minutes.' ,'accelerated-mobile-pages'); ?></p>
231
 
264
 
265
  <?php
266
  wp_enqueue_media ();
267
+ echo $stepDetails['fields']; // escaped above
268
  ?>
269
 
270
  </ul>
307
 
308
  <ul class="merlin__drawer--import-content">
309
  <?php
310
+ echo $stepDetails['fields']; // escaped above
311
  ?>
312
 
313
  </ul>
350
  <ul class="merlin__drawer--import-content">
351
  <li>
352
  <?php
353
+ echo $stepDetails['fields']; // escaped above
354
  ?>
355
  </li>
356
  </ul>
395
 
396
  <ul class="merlin__drawer--import-content">
397
  <?php
398
+ echo $stepDetails['fields']; // escaped above
399
  ?>
400
  </ul>
401
 
pagebuilder/amp-page-builder.php CHANGED
@@ -143,7 +143,7 @@ function ampforwp_call_page_builder(){
143
  </div>
144
  <div id="amp-page-builder" v-if="startPagebuilder==1">
145
  <?php wp_nonce_field( "amppb_nonce_action", "amppb_nonce" ) ?>
146
- <input type="hidden" name="amp-page-builder" id="amp-page-builder-data" class="amp-data" v-model="JSON.stringify(mainContent)" value='<?php echo $previousData; ?>'>
147
  <?php /* This is where we gonna add & manage rows */ ?>
148
  <div id="sorted_rows" class="amppb-rows drop" >
149
  <drop class="drop" :class="{'row-dropping':rowOverDrop}" @drop="handleDrop" @dragover="rowOverDrop = true"
@@ -277,7 +277,7 @@ function ampforwp_call_page_builder(){
277
  </div><!-- .amppb-rows -->
278
 
279
  <div class="modules-options">
280
- <div class="amppb-actions" id="amppb-actions-container" data-containerid="<?php echo $totalRows; ?>">
281
  <drag class="drag" :transfer-data='{type: "column",value: "col-1",rowSettingJson:<?php echo json_encode($backendRowSetting); ?>}' :draggable="true" :effect-allowed="'copy'">
282
  <span id="action-col-1" class="amppb-add-row button-primary button-large module-col-1" data-template="col-1"
283
  >1 Column</span>
143
  </div>
144
  <div id="amp-page-builder" v-if="startPagebuilder==1">
145
  <?php wp_nonce_field( "amppb_nonce_action", "amppb_nonce" ) ?>
146
+ <input type="hidden" name="amp-page-builder" id="amp-page-builder-data" class="amp-data" v-model="JSON.stringify(mainContent)" value='<?php echo $previousData; // nothing to escaped ?>'>
147
  <?php /* This is where we gonna add & manage rows */ ?>
148
  <div id="sorted_rows" class="amppb-rows drop" >
149
  <drop class="drop" :class="{'row-dropping':rowOverDrop}" @drop="handleDrop" @dragover="rowOverDrop = true"
277
  </div><!-- .amppb-rows -->
278
 
279
  <div class="modules-options">
280
+ <div class="amppb-actions" id="amppb-actions-container" data-containerid="<?php echo $totalRows; // nothing to escaped ?>">
281
  <drag class="drag" :transfer-data='{type: "column",value: "col-1",rowSettingJson:<?php echo json_encode($backendRowSetting); ?>}' :draggable="true" :effect-allowed="'copy'">
282
  <span id="action-col-1" class="amppb-add-row button-primary button-large module-col-1" data-template="col-1"
283
  >1 Column</span>
pagebuilder/config/moduleTemplate.php CHANGED
@@ -438,7 +438,7 @@ $containerCommonSettings = array(
438
  array(
439
  'type' =>'color-picker',
440
  'name' =>"font_color_picker",
441
- 'label' =>'Text Font',
442
  'tab' =>'customizer',
443
  'default' =>'#000',
444
  'content_type'=>'css',
438
  array(
439
  'type' =>'color-picker',
440
  'name' =>"font_color_picker",
441
+ 'label' => esc_html__( 'Overlay Text Color', 'accelerated-mobile-pages' ),
442
  'tab' =>'customizer',
443
  'default' =>'#000',
444
  'content_type'=>'css',
pagebuilder/inc/admin-amp-page-builder.css CHANGED
@@ -744,7 +744,7 @@ position: fixed;
744
  padding: 0px 0px;
745
  margin-top: 50px;
746
  border-top: 1px solid #D8D8D8;
747
- z-index: 99;
748
  position: relative;
749
  }
750
  .modal-content{
744
  padding: 0px 0px;
745
  margin-top: 50px;
746
  border-top: 1px solid #D8D8D8;
747
+ z-index: 1;
748
  position: relative;
749
  }
750
  .modal-content{
pagebuilder/inc/adminAjaxContents.php CHANGED
@@ -76,7 +76,7 @@ function amppb_export_layout_data(){
76
  $unsan_export_data = wp_unslash( $_POST['export_layout_data'] );
77
  $export_data = implode( "\n", array_map( 'sanitize_text_field', explode( "\n", $unsan_export_data ) ));
78
  }
79
- echo $export_data;
80
 
81
  wp_die();
82
  }
76
  $unsan_export_data = wp_unslash( $_POST['export_layout_data'] );
77
  $export_data = implode( "\n", array_map( 'sanitize_text_field', explode( "\n", $unsan_export_data ) ));
78
  }
79
+ echo $export_data; // escaped above
80
 
81
  wp_die();
82
  }
pagebuilder/inc/viewShowFrontData.php CHANGED
@@ -61,7 +61,7 @@ function ampforwp_pagebuilder_header_html_output(){
61
  $previousData = (str_replace("'", "", $previousData));
62
  $previousData = json_decode($previousData,true);
63
  if(isset($previousData['settingdata']['scripts_data']) && $previousData['settingdata']['scripts_data']!=""){
64
- echo $previousData['settingdata']['scripts_data'];
65
  }
66
  }
67
  }
@@ -646,10 +646,10 @@ function amppb_post_content($content){
646
  $html .= '</div>';
647
  }
648
  if(!empty($html)){
649
- $content = $html;
650
  }
651
  }
652
- return do_shortcode($content);
653
  }
654
 
655
  function ampforwp_rowData($container,$col,$moduleTemplate){
@@ -1055,7 +1055,7 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
1055
  function ampforwp_pagebuilder_module_style(){
1056
  $custom_css = ampforwp_get_setting('css_editor');
1057
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
1058
- echo $sanitized_css;
1059
  }
1060
  function sortByIndex($contentArray){
1061
  $completeSortedArray = array();
61
  $previousData = (str_replace("'", "", $previousData));
62
  $previousData = json_decode($previousData,true);
63
  if(isset($previousData['settingdata']['scripts_data']) && $previousData['settingdata']['scripts_data']!=""){
64
+ echo $previousData['settingdata']['scripts_data']; // nothing to escaped
65
  }
66
  }
67
  }
646
  $html .= '</div>';
647
  }
648
  if(!empty($html)){
649
+ $content = do_shortcode($html);
650
  }
651
  }
652
+ return $content;
653
  }
654
 
655
  function ampforwp_rowData($container,$col,$moduleTemplate){
1055
  function ampforwp_pagebuilder_module_style(){
1056
  $custom_css = ampforwp_get_setting('css_editor');
1057
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
1058
+ echo $sanitized_css; //sanitize above
1059
  }
1060
  function sortByIndex($contentArray){
1061
  $completeSortedArray = array();
pagebuilder/modules/contents-module.php CHANGED
@@ -10,8 +10,9 @@ function ampforwp_content_module_pagination($args, $fieldValues){
10
  }else{
11
  $paged = 1;
12
  }
13
-
14
  $args['paged'] = $paged;
 
15
 
16
  return $args;
17
  }else{
@@ -489,7 +490,11 @@ if ( is_admin() ) {
489
  function ampforwp_cat_pagination_links($the_query,$fieldValues){
490
  $pagination_links = '';
491
  $pagination_text = 'pageno';
492
- $queryUrl = esc_url( ampforwp_url_controller(get_permalink(get_the_ID())) );
 
 
 
 
493
  if( isset($fieldValues['pagination']) && $fieldValues['pagination'] == 1){
494
 
495
  /*Pagination Sart*/
10
  }else{
11
  $paged = 1;
12
  }
13
+ $offset = ( $paged - 1 ) * $args['posts_per_page'] + $args['offset'];
14
  $args['paged'] = $paged;
15
+ $args['offset'] = $offset;
16
 
17
  return $args;
18
  }else{
490
  function ampforwp_cat_pagination_links($the_query,$fieldValues){
491
  $pagination_links = '';
492
  $pagination_text = 'pageno';
493
+ if( ampforwp_is_front_page()){
494
+ $queryUrl = esc_url( ampforwp_url_controller(home_url()) );
495
+ }else{
496
+ $queryUrl = esc_url(ampforwp_url_controller(get_permalink(ampforwp_get_the_ID())));
497
+ }
498
  if( isset($fieldValues['pagination']) && $fieldValues['pagination'] == 1){
499
 
500
  /*Pagination Sart*/
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
- Stable tag: 0.9.98.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -189,6 +189,35 @@ You can contact us from [here](https://ampforwp.com/contact/)
189
 
190
  == Changelog ==
191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  = 0.9.98.4 (6th AUGUST 2019) =
193
  * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
194
  * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
@@ -197,30 +226,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
197
  * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3459
198
  * Fixed: "Recent Posts below Related Posts" option should show only when it is available for the theme #3528
199
 
200
- = 0.9.98.3 (2nd AUGUST 2019) =
201
- * Improvements: OpenGraph Support in AMP #3261
202
- * Improvements: Compatibility integrated with Cloudflare stream. #3230
203
- * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
204
- * Improvements: Some changes in AMP panel setting's defaults #3065
205
- * Fixed: Search bar is messed up after 3425 and 3000 #3491
206
- * Fixed: Lightbox effect not working with "Tablepress" when "Link To" option is selected in Attachment display settings #3451
207
- * Fixed: Fatal error Uncaught Error: Call to undefined function ampforwp_is_non_amp() #3464
208
- * Fixed: Ol and li design issue in swift theme on RTL mode #3457
209
- * Fixed: When AMP Page builder is checked with Empty Content, Container is missing on AMP view #3488
210
- * Fixed: rel=”nofollow” is getting replaced by rel=”noreferrer in links #3483
211
- * Fixed: In Archives Category & Tags option is disabled, the link should go to non-amp #3486
212
- * Fixed: Multiple H1 Tag Issues in AMP Version on Home and Category Pages in Design 3 #3466
213
- * Fixed: Allow href attribute value with associated apps property #3475
214
- * Fixed: Validation errors in amp category page when HotWP PRO theme is active #3455
215
- * Fixed: Compatibility issue with WP Offload Media Lite. #3460
216
- * Fixed: Fatal error Uncaught Error: Call to undefined method RevSliderFunctionsWP::check_for_shortcodes() #3465
217
- * Fixed: If a title is loading then only its markup should load otherwise not #3495
218
- * Fixed: In Template mode feature, some fixes #3478
219
- * Fixed: Meta description option should be enabled by default SEO #3505
220
- * Fixed: Fatal error Uncaught Error Class 'AMPforWP\AMPVendor\WP_Error' not found #3514
221
- * Fixed: After the upgrade, AMP Page Builder is not working! #3506
222
- * Fixed: Page builder content getting blank when we hit save. #3513
223
- * Fixed: Wp editor not loading when Using Page builder (with Gutenberg) #3517
224
- * Fixed: Single design 2 in Swift broken in one specific use case #3532
225
-
226
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
+ Stable tag: 0.9.98.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
189
 
190
  == Changelog ==
191
 
192
+ = 0.9.98.5 (27th AUGUST 2019) =
193
+ * Improvements: Compatibility integrated with CDN enabler #3515
194
+ * Improvements: banner ux section of AMP panel settings improved #3470
195
+ * Improvements: Reduces the size of auto inline css ro avoid validation errors #3115
196
+ * Improvements: Tooltip to show description about "Social Share links to AMP" and "No Follow All Your Social Links" #3456
197
+ * Improvements: Avada pagebuilder compatibility feature integrated ( it will work when 'AMP PageBuilder Compatibility' extension is activate) #3550
198
+ * Improvements: Avia pagebuilder(Enfold) feature integrated ( it will work when 'AMP PageBuilder Compatibility' extension is activate) #3559
199
+ * Improvements: Filters to show or hide option on admin settings for Template-mode #3562
200
+ * Fixed: When AMP Page builder is checked with Empty Content,Container is missing on AMP view #3488
201
+ * Fixed: Validation error when adding featured video with Authentic theme #3535
202
+ * Fixed: User Experience issue with Custom Home Page #2348
203
+ * Fixed: Serach option should be enabled by default when user selected the design-3 #3485
204
+ * Fixed: Logo's resize option should only display when the image is present #3471
205
+ * Fixed: Row module settings popup header is overlapped while scrolling the options in AMP Page Builder #3467
206
+ * Fixed: labeling of the 'Text font' option in 'Row module settings' of AMP Page builder renamed #3468
207
+ * Fixed: When AMP takeover is enabled, the 'visit amp' on admin header should disabled #3502
208
+ * Fixed: Homepage amphtml not getting generated when there are no posts added. #3504
209
+ * Fixed: AMP cache description is getting overlap with the Checkbox description when amp cache extension is activate #3512
210
+ * Fixed: Category module's pagination of AMP Page builder is not working #3509
211
+ * Fixed: There is closing tag of 'a' tag in header-bar.php of design bar, for which there is no opening tag #3479
212
+ * Fixed: Icons not loading When Icon Font Library is selected to Font Awesome from the AMP options #3501
213
+ * Fixed: Shortcode placed with double brackets (i.e., [[shortcode]]) should not execute #3481
214
+ * Fixed: One signal push notification should work properly on AMP if any CDN plugin is used #3340
215
+ * Fixed: Extra options are being displayed after the search is completed in the AMP Options Panel #2874
216
+ * Fixed: In alt attribute's content single quotes should removed #3492
217
+ * Fixed: "amphtml" is not generatiing in sorce code when it comes to search results pages in non AMP #3458
218
+ * Fixed: Woocommerce archives and shop page support should not be dependent on Archives [Category & Tags] option #3558
219
+ * Fixed: noreferrer is getting added automatically, it should have what ever the user passes #3566
220
+
221
  = 0.9.98.4 (6th AUGUST 2019) =
222
  * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
223
  * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
226
  * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3459
227
  * Fixed: "Recent Posts below Related Posts" option should show only when it is available for the theme #3528
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/category-widget.php CHANGED
@@ -62,7 +62,7 @@ class AMPFORWP_Categories_Widget extends WP_Widget {
62
  <?php if ( ampforwp_has_post_thumbnail() ) {
63
  $thumb_url = ampforwp_get_post_thumbnail('url');
64
  ?>
65
- <a href="<?php echo esc_url(ampforwp_url_controller($ampforwp_post_url));?>"><amp-img class="ampforwp_wc_shortcode_img" src=<?php echo $thumb_url ?> width=150 height=150 layout="responsive"></amp-img></a>
66
  <?php } ?>
67
 
68
  <a class="ampforwp_wc_shortcode_title" href="<?php echo ampforwp_url_controller($ampforwp_post_url) ;?>">
62
  <?php if ( ampforwp_has_post_thumbnail() ) {
63
  $thumb_url = ampforwp_get_post_thumbnail('url');
64
  ?>
65
+ <a href="<?php echo esc_url(ampforwp_url_controller($ampforwp_post_url));?>"><amp-img class="ampforwp_wc_shortcode_img" src=<?php echo esc_url($thumb_url) ?> width=150 height=150 layout="responsive"></amp-img></a>
66
  <?php } ?>
67
 
68
  <a class="ampforwp_wc_shortcode_title" href="<?php echo ampforwp_url_controller($ampforwp_post_url) ;?>">
templates/customizer/customizer-controls.php CHANGED
@@ -40,7 +40,7 @@ class AMPFORWP_Customize_Control_Sortable_Checkboxes extends WP_Customize_Contro
40
  <?php } // add label if needed. ?>
41
 
42
  <?php if ( !empty( $this->description ) ){ ?>
43
- <span class="description customize-control-description"><?php echo $this->description; ?></span>
44
  <?php } // add desc if needed. ?>
45
 
46
  <?php
40
  <?php } // add label if needed. ?>
41
 
42
  <?php if ( !empty( $this->description ) ){ ?>
43
+ <span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span>
44
  <?php } // add desc if needed. ?>
45
 
46
  <?php
templates/design-manager/design-1/archive.php CHANGED
@@ -27,7 +27,7 @@ global $redux_builder_amp, $wp; ?>
27
  $amp_component_scripts = $sanitizer->amp_scripts;
28
  if ( $sanitizer && $amp_component_scripts) {
29
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
30
- <script custom-element="<?php echo $ampforwp_service; ?>" src="<?php echo esc_url($ampforwp_js_file); ?>" async></script> <?php
31
  }
32
  }?>
33
  <style amp-custom>
@@ -110,9 +110,9 @@ global $redux_builder_amp, $wp; ?>
110
  <?php
111
  $title_name = '<a href="'.esc_url( $ampforwp_amp_post_url ).'">'.get_the_title().'</a>';
112
  if( ampforwp_default_logo() ){ ?>
113
- <h2 class="amp-wp-title"><?php echo $title_name; ?></h2>
114
  <?php }else{ ?>
115
- <h3 class="amp-wp-title"><?php echo $title_name ?></h3>
116
  <?php } ?>
117
 
118
  <div class="amp-wp-content-loop">
27
  $amp_component_scripts = $sanitizer->amp_scripts;
28
  if ( $sanitizer && $amp_component_scripts) {
29
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
30
+ <script custom-element="<?php echo esc_attr($ampforwp_service); ?>" src="<?php echo esc_url($ampforwp_js_file); ?>" async></script> <?php
31
  }
32
  }?>
33
  <style amp-custom>
110
  <?php
111
  $title_name = '<a href="'.esc_url( $ampforwp_amp_post_url ).'">'.get_the_title().'</a>';
112
  if( ampforwp_default_logo() ){ ?>
113
+ <h2 class="amp-wp-title"><?php echo $title_name; //escaped above ?></h2>
114
  <?php }else{ ?>
115
+ <h3 class="amp-wp-title"><?php echo $title_name; //escaped above ?></h3>
116
  <?php } ?>
117
 
118
  <div class="amp-wp-content-loop">
templates/design-manager/design-1/elements/bread-crumbs.php CHANGED
@@ -96,7 +96,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
98
  }
99
- echo $tags_breadcrumbs;
100
  }
101
  }
102
 
@@ -147,7 +147,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
147
 
148
  // Check if the post is in a category
149
  if(!empty($last_category)) {
150
- echo $cat_display;
151
 
152
  // Else if post is in a custom taxonomy
153
  } else if(!empty($cat_id)) {
@@ -177,7 +177,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
177
  }
178
 
179
  // Display parent pages
180
- echo $parents;
181
 
182
  // Current page
183
 
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
98
  }
99
+ echo $tags_breadcrumbs; // escaped above
100
  }
101
  }
102
 
147
 
148
  // Check if the post is in a category
149
  if(!empty($last_category)) {
150
+ echo $cat_display; // escaped above
151
 
152
  // Else if post is in a custom taxonomy
153
  } else if(!empty($cat_id)) {
177
  }
178
 
179
  // Display parent pages
180
+ echo $parents; // escaped above
181
 
182
  // Current page
183
 
templates/design-manager/design-1/elements/meta-taxonomy.php CHANGED
@@ -77,7 +77,7 @@ if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_sing
77
  }
78
  echo ampforwp_get_author_details( $post_author , 'meta-taxonomy' );
79
  echo ampforwp_yoast_twitter_handle();
80
- echo $post_author->description;
81
  } ?>
82
  </div>
83
  </div> <?php
77
  }
78
  echo ampforwp_get_author_details( $post_author , 'meta-taxonomy' );
79
  echo ampforwp_yoast_twitter_handle();
80
+ echo esc_html($post_author->description);
81
  } ?>
82
  </div>
83
  </div> <?php
templates/design-manager/design-1/header-bar.php CHANGED
@@ -7,7 +7,6 @@
7
  if ( $site_icon_url ) : ?>
8
  <amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img>
9
  <?php endif; ?>
10
- </a>
11
  <?php if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforwp-amp-menu']){ ?>
12
  <div on='tap:sidebar.toggle' role="button" aria-label="Navigation" tabindex="0" class="nav_container">
13
  <a href="#" class="toggle-text">
7
  if ( $site_icon_url ) : ?>
8
  <amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img>
9
  <?php endif; ?>
 
10
  <?php if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforwp-amp-menu']){ ?>
11
  <div on='tap:sidebar.toggle' role="button" aria-label="Navigation" tabindex="0" class="nav_container">
12
  <a href="#" class="toggle-text">
templates/design-manager/design-1/search.php CHANGED
@@ -69,9 +69,9 @@
69
  <?php
70
  $title_name = '<a href="'.ampforwp_url_controller( get_permalink() ).'">'.get_the_title().'</a>';
71
  if( ampforwp_default_logo() ){ ?>
72
- <h2 class="amp-wp-title"><?php echo $title_name; ?></h2>
73
  <?php }else{ ?>
74
- <h3 class="amp-wp-title"><?php echo $title_name ?></h3>
75
  <?php } ?>
76
  <div class="amp-wp-content-loop">
77
 
69
  <?php
70
  $title_name = '<a href="'.ampforwp_url_controller( get_permalink() ).'">'.get_the_title().'</a>';
71
  if( ampforwp_default_logo() ){ ?>
72
+ <h2 class="amp-wp-title"><?php echo $title_name; // escaped above ?></h2>
73
  <?php }else{ ?>
74
+ <h3 class="amp-wp-title"><?php echo $title_name; // escaped above ?></h3>
75
  <?php } ?>
76
  <div class="amp-wp-content-loop">
77
 
templates/design-manager/design-1/style.php CHANGED
@@ -416,7 +416,7 @@ if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
416
  $custom_css = ampforwp_get_setting('css_editor');
417
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
418
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
419
- echo $sanitized_css;
420
  //} ?>
421
  <?php
422
  if (ampforwp_get_setting('enable-amp-ads-resp-1')){?>
@@ -458,7 +458,7 @@ if (ampforwp_get_setting('enable-amp-ads-resp-6')){?>
458
  if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampforwp-below-header' ) || is_active_sidebar( 'ampforwp-above-loop' ) || is_active_sidebar( 'ampforwp-below-loop' ) ) : ?>
459
  .f-w{display: inline-flex;width:100%;flex-wrap:wrap;}
460
  .w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 30px;line-height:1.5;font-size:14px;}
461
- .w-bl h4{font-size: <?php echo $redux_builder_amp['swift-head-size'] ?>;font-weight: <?php echo $redux_builder_amp['swift-head-fntwgth'] ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
462
  .w-bl ul li{list-style-type: none;margin-bottom: 15px;}
463
  .w-bl ul li:last-child{margin-bottom:0;}
464
  .w-bl ul li a{text-decoration: none;}
416
  $custom_css = ampforwp_get_setting('css_editor');
417
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
418
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
419
+ echo $sanitized_css; // sanitized above
420
  //} ?>
421
  <?php
422
  if (ampforwp_get_setting('enable-amp-ads-resp-1')){?>
458
  if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampforwp-below-header' ) || is_active_sidebar( 'ampforwp-above-loop' ) || is_active_sidebar( 'ampforwp-below-loop' ) ) : ?>
459
  .f-w{display: inline-flex;width:100%;flex-wrap:wrap;}
460
  .w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 30px;line-height:1.5;font-size:14px;}
461
+ .w-bl h4{font-size: <?php echo ampforwp_get_setting('swift-head-size'); ?>;font-weight: <?php echo ampforwp_get_setting('swift-head-fntwgth'); ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
462
  .w-bl ul li{list-style-type: none;margin-bottom: 15px;}
463
  .w-bl ul li:last-child{margin-bottom:0;}
464
  .w-bl ul li a{text-decoration: none;}
templates/design-manager/design-2/archive.php CHANGED
@@ -28,7 +28,7 @@
28
  $amp_component_scripts = $sanitizer->amp_scripts;
29
  if ( $sanitizer && $amp_component_scripts) {
30
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
31
- <script custom-element="<?php echo $ampforwp_service; ?>" src="<?php echo esc_url($ampforwp_js_file); ?>" async></script> <?php
32
  }
33
  }?>
34
  <style amp-custom>
@@ -126,9 +126,9 @@
126
  <?php
127
  $title_name = '<a href="'.esc_url( $ampforwp_amp_post_url ).'">'.get_the_title().'</a>';
128
  if( ampforwp_default_logo() ){ ?>
129
- <h2 class="amp-wp-title"><?php echo $title_name; ?></h2>
130
  <?php }else{ ?>
131
- <h3 class="amp-wp-title"><?php echo $title_name ?></h3>
132
  <?php } ?>
133
  <?php if( ampforwp_check_excerpt() ) {
134
  $class = 'large-screen-excerpt';
28
  $amp_component_scripts = $sanitizer->amp_scripts;
29
  if ( $sanitizer && $amp_component_scripts) {
30
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
31
+ <script custom-element="<?php echo esc_attr($ampforwp_service); ?>" src="<?php echo esc_url($ampforwp_js_file); ?>" async></script> <?php
32
  }
33
  }?>
34
  <style amp-custom>
126
  <?php
127
  $title_name = '<a href="'.esc_url( $ampforwp_amp_post_url ).'">'.get_the_title().'</a>';
128
  if( ampforwp_default_logo() ){ ?>
129
+ <h2 class="amp-wp-title"><?php echo $title_name; // escaped above ?></h2>
130
  <?php }else{ ?>
131
+ <h3 class="amp-wp-title"><?php echo $title_name; // escaped above ?></h3>
132
  <?php } ?>
133
  <?php if( ampforwp_check_excerpt() ) {
134
  $class = 'large-screen-excerpt';
templates/design-manager/design-2/elements/bread-crumbs.php CHANGED
@@ -96,7 +96,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
98
  }
99
- echo $tags_breadcrumbs;
100
  }
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
@@ -145,7 +145,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
145
 
146
  // Check if the post is in a category
147
  if(!empty($last_category)) {
148
- echo $cat_display;
149
 
150
  // Else if post is in a custom taxonomy
151
  } else if(!empty($cat_id)) {
@@ -175,7 +175,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
175
  }
176
 
177
  // Display parent pages
178
- echo $parents;
179
 
180
  // Current page
181
 
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
98
  }
99
+ echo $tags_breadcrumbs; // escaped above
100
  }
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
145
 
146
  // Check if the post is in a category
147
  if(!empty($last_category)) {
148
+ echo $cat_display; // escaped above
149
 
150
  // Else if post is in a custom taxonomy
151
  } else if(!empty($cat_id)) {
175
  }
176
 
177
  // Display parent pages
178
+ echo $parents; // escaped above
179
 
180
  // Current page
181
 
templates/design-manager/design-2/elements/related-posts.php CHANGED
@@ -112,7 +112,7 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
112
  }else{
113
  $content = get_the_content();
114
  } ?>
115
- <p class="<?php echo $class; ?>"><?php echo wp_trim_words( strip_shortcodes($content) , 15 ); ?></p>
116
  <?php } ?>
117
  </div>
118
  </li>
112
  }else{
113
  $content = get_the_content();
114
  } ?>
115
+ <p class="<?php echo esc_attr( $class ); ?>"><?php echo wp_trim_words( strip_shortcodes($content) , 15 ); ?></p>
116
  <?php } ?>
117
  </div>
118
  </li>
templates/design-manager/design-2/search.php CHANGED
@@ -74,9 +74,9 @@
74
  <?php
75
  $title_name = '<a href="'.esc_url( $ampforwp_amp_post_url ).'">'.get_the_title().'</a>';
76
  if( ampforwp_default_logo() ){ ?>
77
- <h2 class="amp-wp-title"><?php echo $title_name; ?></h2>
78
  <?php }else{ ?>
79
- <h3 class="amp-wp-title"><?php echo $title_name ?></h3>
80
  <?php } ?>
81
  <?php if( ampforwp_check_excerpt() ) {
82
  $class = 'large-screen-excerpt';
74
  <?php
75
  $title_name = '<a href="'.esc_url( $ampforwp_amp_post_url ).'">'.get_the_title().'</a>';
76
  if( ampforwp_default_logo() ){ ?>
77
+ <h2 class="amp-wp-title"><?php echo $title_name;//escaped above ?></h2>
78
  <?php }else{ ?>
79
+ <h3 class="amp-wp-title"><?php echo $title_name; //escaped above ?></h3>
80
  <?php } ?>
81
  <?php if( ampforwp_check_excerpt() ) {
82
  $class = 'large-screen-excerpt';
templates/design-manager/design-2/style.php CHANGED
@@ -514,7 +514,7 @@ if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
514
  $custom_css = ampforwp_get_setting('css_editor');
515
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
516
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
517
- echo $sanitized_css;
518
  //} ?>
519
  <?php
520
  if (ampforwp_get_setting('enable-amp-ads-resp-1')){?>
@@ -556,7 +556,7 @@ if (ampforwp_get_setting('enable-amp-ads-resp-6')){?>
556
  if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampforwp-below-header' ) || is_active_sidebar( 'ampforwp-above-loop' ) || is_active_sidebar( 'ampforwp-below-loop' ) ) : ?>
557
  .f-w{display: inline-flex;width:100%;flex-wrap:wrap;}
558
  .w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 30px;line-height:1.5;font-size:14px;}
559
- .w-bl h4{font-size: <?php echo $redux_builder_amp['swift-head-size'] ?>;font-weight: <?php echo $redux_builder_amp['swift-head-fntwgth'] ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
560
  .w-bl ul{padding:0;margin:0;}
561
  .w-bl ul li{list-style-type: none;margin-bottom: 15px;}
562
  .w-bl ul li:last-child{margin-bottom:0;}
514
  $custom_css = ampforwp_get_setting('css_editor');
515
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
516
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
517
+ echo $sanitized_css;//sanitized above
518
  //} ?>
519
  <?php
520
  if (ampforwp_get_setting('enable-amp-ads-resp-1')){?>
556
  if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampforwp-below-header' ) || is_active_sidebar( 'ampforwp-above-loop' ) || is_active_sidebar( 'ampforwp-below-loop' ) ) : ?>
557
  .f-w{display: inline-flex;width:100%;flex-wrap:wrap;}
558
  .w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 30px;line-height:1.5;font-size:14px;}
559
+ .w-bl h4{font-size: <?php echo ampforwp_get_setting('swift-head-size'); ?>;font-weight: <?php echo ampforwp_get_setting('swift-head-fntwgth'); ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
560
  .w-bl ul{padding:0;margin:0;}
561
  .w-bl ul li{list-style-type: none;margin-bottom: 15px;}
562
  .w-bl ul li:last-child{margin-bottom:0;}
templates/design-manager/design-3/archive.php CHANGED
@@ -27,7 +27,7 @@
27
  $amp_component_scripts = $sanitizer->amp_scripts;
28
  if ( $sanitizer && $amp_component_scripts) {
29
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
30
- <script custom-element="<?php echo $ampforwp_service; ?>" src="<?php echo esc_url($ampforwp_js_file); ?>" async></script> <?php
31
  }
32
  }?>
33
  <style amp-custom>
@@ -165,9 +165,9 @@ if ( get_query_var( 'paged' ) ) {
165
  <?php
166
  $title_name = '<a href="'.esc_url( $ampforwp_amp_post_url ).'">'.get_the_title().'</a>';
167
  if( ampforwp_default_logo() ){ ?>
168
- <h2 class="amp-wp-title"><?php echo $title_name; ?></h2>
169
  <?php }else{ ?>
170
- <h3 class="amp-wp-title"><?php echo $title_name ?></h3>
171
  <?php } ?>
172
  <?php if( ampforwp_check_excerpt() ) {
173
  $class = 'large-screen-excerpt-design-3';
27
  $amp_component_scripts = $sanitizer->amp_scripts;
28
  if ( $sanitizer && $amp_component_scripts) {
29
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
30
+ <script custom-element="<?php echo esc_attr($ampforwp_service); ?>" src="<?php echo esc_url($ampforwp_js_file); ?>" async></script> <?php
31
  }
32
  }?>
33
  <style amp-custom>
165
  <?php
166
  $title_name = '<a href="'.esc_url( $ampforwp_amp_post_url ).'">'.get_the_title().'</a>';
167
  if( ampforwp_default_logo() ){ ?>
168
+ <h2 class="amp-wp-title"><?php echo $title_name;//escaped above ?></h2>
169
  <?php }else{ ?>
170
+ <h3 class="amp-wp-title"><?php echo $title_name;//escaped above ?></h3>
171
  <?php } ?>
172
  <?php if( ampforwp_check_excerpt() ) {
173
  $class = 'large-screen-excerpt-design-3';
templates/design-manager/design-3/elements/bread-crumbs.php CHANGED
@@ -96,7 +96,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
98
  }
99
- echo $tags_breadcrumbs;
100
  }
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
@@ -145,7 +145,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
145
 
146
  // Check if the post is in a category
147
  if(!empty($last_category)) {
148
- echo $cat_display;
149
 
150
  // Else if post is in a custom taxonomy
151
  } else if(!empty($cat_id)) {
@@ -175,7 +175,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
175
  }
176
 
177
  // Display parent pages
178
- echo $parents;
179
 
180
  // Current page
181
 
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
98
  }
99
+ echo $tags_breadcrumbs; // escaped above
100
  }
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
145
 
146
  // Check if the post is in a category
147
  if(!empty($last_category)) {
148
+ echo $cat_display; // escaped above
149
 
150
  // Else if post is in a custom taxonomy
151
  } else if(!empty($cat_id)) {
175
  }
176
 
177
  // Display parent pages
178
+ echo $parents; // escaped above
179
 
180
  // Current page
181
 
templates/design-manager/design-3/index.php CHANGED
@@ -39,7 +39,7 @@ if ( get_query_var( 'paged' ) ) {
39
  <?php if( $redux_builder_amp['amp-design-3-featured-slider'] == 1 && $paged === 1 ) {
40
  $num_posts = 4;$autoplay = 'autoplay';$delay = 'delay="4000"';
41
  if ( isset($redux_builder_amp['ampforwp-featur-slider-autop-delay']) && $redux_builder_amp['ampforwp-featur-slider-autop-delay'] ) {
42
- $delay = 'delay="'.$redux_builder_amp["ampforwp-featur-slider-autop-delay"].'"';
43
  }
44
  if ( isset($redux_builder_amp['ampforwp-featur-slider-num-posts']) && $redux_builder_amp['ampforwp-featur-slider-num-posts'] ) {
45
  $num_posts = $redux_builder_amp['ampforwp-featur-slider-num-posts'];
@@ -54,7 +54,7 @@ if ( get_query_var( 'paged' ) ) {
54
  <amp-carousel width="450"
55
  height="270" layout="responsive"
56
  type="slides" <?php echo esc_attr($autoplay.' ');
57
- echo $delay; ?> >
58
  <?php
59
  global $redux_builder_amp;
60
  if( ( isset($redux_builder_amp['amp-design-3-featured-content']) && $redux_builder_amp['amp-design-3-featured-content'] == '1' ) && (isset($redux_builder_amp['amp-design-3-category-selector']) && $redux_builder_amp['amp-design-3-category-selector'] ) ){
39
  <?php if( $redux_builder_amp['amp-design-3-featured-slider'] == 1 && $paged === 1 ) {
40
  $num_posts = 4;$autoplay = 'autoplay';$delay = 'delay="4000"';
41
  if ( isset($redux_builder_amp['ampforwp-featur-slider-autop-delay']) && $redux_builder_amp['ampforwp-featur-slider-autop-delay'] ) {
42
+ $delay = 'delay="'.esc_attr( ampforwp_get_setting("ampforwp-featur-slider-autop-delay") ).'"';
43
  }
44
  if ( isset($redux_builder_amp['ampforwp-featur-slider-num-posts']) && $redux_builder_amp['ampforwp-featur-slider-num-posts'] ) {
45
  $num_posts = $redux_builder_amp['ampforwp-featur-slider-num-posts'];
54
  <amp-carousel width="450"
55
  height="270" layout="responsive"
56
  type="slides" <?php echo esc_attr($autoplay.' ');
57
+ echo $delay; //escaped above ?> >
58
  <?php
59
  global $redux_builder_amp;
60
  if( ( isset($redux_builder_amp['amp-design-3-featured-content']) && $redux_builder_amp['amp-design-3-featured-content'] == '1' ) && (isset($redux_builder_amp['amp-design-3-category-selector']) && $redux_builder_amp['amp-design-3-category-selector'] ) ){
templates/design-manager/design-3/search.php CHANGED
@@ -93,9 +93,9 @@
93
  <?php
94
  $title_name = '<a href="'.ampforwp_url_controller( get_permalink() ).'">'.get_the_title().'</a>';
95
  if( ampforwp_default_logo() ){ ?>
96
- <h2 class="amp-wp-title"><?php echo $title_name; ?></h2>
97
  <?php }else{ ?>
98
- <h3 class="amp-wp-title"><?php echo $title_name ?></h3>
99
  <?php } ?>
100
 
101
  <?php if( ampforwp_check_excerpt() ) {
93
  <?php
94
  $title_name = '<a href="'.ampforwp_url_controller( get_permalink() ).'">'.get_the_title().'</a>';
95
  if( ampforwp_default_logo() ){ ?>
96
+ <h2 class="amp-wp-title"><?php echo $title_name; //escaped above ?></h2>
97
  <?php }else{ ?>
98
+ <h3 class="amp-wp-title"><?php echo $title_name; //escaped above ?></h3>
99
  <?php } ?>
100
 
101
  <?php if( ampforwp_check_excerpt() ) {
templates/design-manager/design-3/style.php CHANGED
@@ -687,7 +687,7 @@ if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
687
  $custom_css = ampforwp_get_setting('css_editor');
688
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
689
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
690
- echo $sanitized_css;
691
  //} ?>
692
  <?php
693
  if (ampforwp_get_setting('enable-amp-ads-resp-1')){?>
@@ -729,7 +729,7 @@ if (ampforwp_get_setting('enable-amp-ads-resp-6')){?>
729
  if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampforwp-below-header' ) || is_active_sidebar( 'ampforwp-above-loop' ) || is_active_sidebar( 'ampforwp-below-loop' ) ) : ?>
730
  .f-w{display: inline-flex;width:100%;flex-wrap:wrap;}
731
  .w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 15px;line-height:1.5;font-size:14px;}
732
- .w-bl h4{font-size: <?php echo $redux_builder_amp['swift-head-size'] ?>;font-weight: <?php echo $redux_builder_amp['swift-head-fntwgth'] ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
733
  .w-bl ul{padding:0;margin:0;}
734
  .w-bl ul li{list-style-type: none;margin-bottom: 15px;}
735
  .w-bl ul li:last-child{margin-bottom:0;}
687
  $custom_css = ampforwp_get_setting('css_editor');
688
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
689
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
690
+ echo $sanitized_css; // sanitized above
691
  //} ?>
692
  <?php
693
  if (ampforwp_get_setting('enable-amp-ads-resp-1')){?>
729
  if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampforwp-below-header' ) || is_active_sidebar( 'ampforwp-above-loop' ) || is_active_sidebar( 'ampforwp-below-loop' ) ) : ?>
730
  .f-w{display: inline-flex;width:100%;flex-wrap:wrap;}
731
  .w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 15px;line-height:1.5;font-size:14px;}
732
+ .w-bl h4{font-size: <?php echo ampforwp_get_setting('swift-head-size'); ?>;font-weight: <?php echo ampforwp_get_setting('swift-head-fntwgth'); ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
733
  .w-bl ul{padding:0;margin:0;}
734
  .w-bl ul li{list-style-type: none;margin-bottom: 15px;}
735
  .w-bl ul li:last-child{margin-bottom:0;}
templates/design-manager/swift/style.php CHANGED
@@ -82,7 +82,7 @@ figure.aligncenter amp-img {margin: 0 auto;}
82
  if( class_exists('\Elementor\Plugin') && \Elementor\Plugin::$instance->db->is_built_with_elementor($post->ID) && (is_page() || ampforwp_is_front_page() ) && ( function_exists( 'amp_pagebuilder_compatibility_init' ) || class_exists('Elementor_For_Amp') ) ) { }
83
  else{ ?>.cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px} <?php } ?>
84
  <?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
85
- if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
86
  @font-face {font-family: 'icomoon';font-display: swap;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf');}
87
  <?php } // Swift icomoon icons condition ends ?>
88
  header .cntr{
@@ -312,7 +312,7 @@ cursor: pointer;border-radius: 35px;color: <?php echo ampforwp_sanitize_color($r
312
  .hamb-mnu ::-webkit-scrollbar {display: none;}
313
  <?php //primary menu
314
  if($redux_builder_amp['primary-menu']){?>
315
- .p-m-fl{width:100%;border-bottom: 1px solid rgba(0, 0, 0, 0.05);<?php if($redux_builder_amp['primary-menu-background-scheme']['rgba']){?>background:<?php echo $redux_builder_amp['primary-menu-background-scheme']['rgba']; ?><?php } ?>}
316
  .p-menu{width:100%;text-align:center;margin: 0px auto;<?php if($redux_builder_amp['primary-menu-padding-control']){?>padding: <?php echo ' 0px ' .' '.esc_html($redux_builder_amp['primary-menu-padding-control']['padding-right']) .' 0px '.esc_html($redux_builder_amp['primary-menu-padding-control']['padding-left']) ; ?>;<?php } ?>}
317
  .p-menu ul li{display: inline-block;margin-right: 21px;font-size: 12px;line-height: 20px;letter-spacing: 1px;font-weight: 400;}
318
  .p-menu ul li a{<?php if($redux_builder_amp['primary-menu-text-scheme']['rgba']){?>color:<?php echo ampforwp_sanitize_color($redux_builder_amp['primary-menu-text-scheme']['rgba'])?>;<?php } ?>
@@ -1961,8 +1961,8 @@ if( isset($redux_builder_amp['enable-amp-ads-6'] ) && $redux_builder_amp['enable
1961
  <?php if( true == $redux_builder_amp['amp-enable-notifications'] ) {?>
1962
  #amp-user-notification1{padding: 5px;text-align: center;background: #fff;border-top: 1px solid #005be2;}
1963
  #amp-user-notification1 p {display: inline-block;margin: 20px 0px;}
1964
- amp-user-notification button {padding: 8px 10px;background: <?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;color: #fff;margin-left: 5px;border: 0;}
1965
- amp-user-notification .amp-not-privacy{color:<?php echo $redux_builder_amp['swift-color-scheme']['color']; ?>;font-size: 15px;margin-left: 5px;}
1966
  <?php } // Notice bar CSS Ends?>
1967
  <?php } // Levelup Condition ends?>
1968
  <?php
82
  if( class_exists('\Elementor\Plugin') && \Elementor\Plugin::$instance->db->is_built_with_elementor($post->ID) && (is_page() || ampforwp_is_front_page() ) && ( function_exists( 'amp_pagebuilder_compatibility_init' ) || class_exists('Elementor_For_Amp') ) ) { }
83
  else{ ?>.cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px} <?php } ?>
84
  <?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
85
+ if ( $ampforwp_font_icon == 'swift-icons' || ( $ampforwp_font_icon == 'fontawesome-icons' && checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) ){ ?>
86
  @font-face {font-family: 'icomoon';font-display: swap;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf');}
87
  <?php } // Swift icomoon icons condition ends ?>
88
  header .cntr{
312
  .hamb-mnu ::-webkit-scrollbar {display: none;}
313
  <?php //primary menu
314
  if($redux_builder_amp['primary-menu']){?>
315
+ .p-m-fl{width:100%;border-bottom: 1px solid rgba(0, 0, 0, 0.05);<?php if(ampforwp_get_setting('primary-menu-background-scheme','rgba') ){?>background:<?php echo ampforwp_get_setting('primary-menu-background-scheme','rgba'); ?><?php } ?>}
316
  .p-menu{width:100%;text-align:center;margin: 0px auto;<?php if($redux_builder_amp['primary-menu-padding-control']){?>padding: <?php echo ' 0px ' .' '.esc_html($redux_builder_amp['primary-menu-padding-control']['padding-right']) .' 0px '.esc_html($redux_builder_amp['primary-menu-padding-control']['padding-left']) ; ?>;<?php } ?>}
317
  .p-menu ul li{display: inline-block;margin-right: 21px;font-size: 12px;line-height: 20px;letter-spacing: 1px;font-weight: 400;}
318
  .p-menu ul li a{<?php if($redux_builder_amp['primary-menu-text-scheme']['rgba']){?>color:<?php echo ampforwp_sanitize_color($redux_builder_amp['primary-menu-text-scheme']['rgba'])?>;<?php } ?>
1961
  <?php if( true == $redux_builder_amp['amp-enable-notifications'] ) {?>
1962
  #amp-user-notification1{padding: 5px;text-align: center;background: #fff;border-top: 1px solid #005be2;}
1963
  #amp-user-notification1 p {display: inline-block;margin: 20px 0px;}
1964
+ amp-user-notification button {padding: 8px 10px;background: <?php echo ampforwp_get_setting('swift-color-scheme','color'); ?>;color: #fff;margin-left: 5px;border: 0;}
1965
+ amp-user-notification .amp-not-privacy{color:<?php echo ampforwp_get_setting('swift-color-scheme','color'); ?>;font-size: 15px;margin-left: 5px;}
1966
  <?php } // Notice bar CSS Ends?>
1967
  <?php } // Levelup Condition ends?>
1968
  <?php
templates/features.php CHANGED
@@ -209,17 +209,25 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
209
  if( is_front_page() && ! $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
210
  return;
211
  }
212
- if ( is_archive() ) {
 
 
 
 
 
 
 
 
213
  if(!ampforwp_get_setting('ampforwp-archive-support')){
214
  return;
215
  }
216
- if( is_category() && !ampforwp_get_setting('ampforwp-archive-support-cat')){
217
  return;
218
  }
219
  if( is_tag() && !ampforwp_get_setting('ampforwp-archive-support-tag') ){
220
  return;
221
  }
222
- }
223
  // #1192 Password Protected posts exclusion
224
  if(post_password_required( $post )){
225
  return;
@@ -235,9 +243,9 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
235
  }
236
  }
237
  // no-amphtml for search
238
- if(is_search()){
239
- return;
240
- }
241
  // #872 no-amphtml if selected as hide from settings
242
  if ( is_category_amp_disabled() ) {
243
  return;
@@ -416,7 +424,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
416
 
417
  $amp_url = apply_filters('ampforwp_modify_rel_canonical',$amp_url);
418
 
419
- if( $supported_amp_post_types) {
420
  return $amp_url;
421
  }
422
  }
@@ -715,7 +723,7 @@ function ampforwp_new_dir( $dir ) {
715
  // aria-current
716
  $content = preg_replace('/(<[^>]+) aria-current=".*?"/', '$1', $content);
717
  // Gallery Break fix
718
- $content = preg_replace('/\[gallery(.*?)\]/', '</p>[gallery$1]</p>', $content);
719
  // value attribute from anchor tag #2262
720
  $content = preg_replace('/<a(.*?)(value=".*?")(.*?)>/', '<a$1$3>', $content);
721
  //Compatibility with Cloudflare stream. #3230
@@ -857,9 +865,15 @@ function ampforwp_title_callback( $post ) {
857
  </div>
858
  </div>
859
  </div>
860
- </div>
861
-
862
- <?php }
 
 
 
 
 
 
863
 
864
  /**
865
  * Adds a meta box to the post editing screen for Mobile Redirection on-off on specific pages
@@ -2219,6 +2233,14 @@ function ampforwp_add_fbcomments_scripts( $data ) {
2219
  function ampforwp_copat_wp_html_compression() {
2220
  remove_action('template_redirect', 'wp_html_compression_start', -1);
2221
  remove_action('get_header', 'wp_html_compression_start');
 
 
 
 
 
 
 
 
2222
  }
2223
  add_action('amp_init','ampforwp_copat_wp_html_compression');
2224
 
@@ -2250,17 +2272,17 @@ function ampforwp_editable_archvies_title($title) {
2250
  //39. #560 Header and Footer Editable html enabled script area
2251
  add_action('amp_post_template_footer','ampforwp_footer_html_output',11);
2252
  function ampforwp_footer_html_output() {
2253
- global $redux_builder_amp;
2254
- if( $redux_builder_amp['amp-footer-text-area-for-html'] ) {
2255
- echo $redux_builder_amp['amp-footer-text-area-for-html'] ;
2256
  }
2257
  }
2258
 
2259
  add_action('amp_post_template_head','ampforwp_header_html_output',11);
2260
  function ampforwp_header_html_output() {
2261
- global $redux_builder_amp;
2262
- if( $redux_builder_amp['amp-header-text-area-for-html'] ) {
2263
- echo $redux_builder_amp['amp-header-text-area-for-html'] ;
2264
  }
2265
  // amphtml tag when AMP Takeover is enabled #2550
2266
  if(ampforwp_get_setting('ampforwp-amp-takeover') == true){
@@ -4112,7 +4134,7 @@ function is_category_amp_disabled(){
4112
  add_action( 'admin_bar_menu', 'ampforwp_visit_amp_in_admin_bar',999 );
4113
  function ampforwp_visit_amp_in_admin_bar($admin_bar) {
4114
  global $redux_builder_amp;
4115
- if ( ampforwp_get_setting('ampforwp-homepage-on-off-support') ) {
4116
  $args = array(
4117
  'parent' => 'site-name',
4118
  'id' => 'view-amp',
@@ -4127,9 +4149,9 @@ function ampforwp_visit_amp_in_admin_bar($admin_bar) {
4127
  // Things to be added in the Body Tag #1064
4128
  add_action('ampforwp_body_beginning','ampforwp_body_beginning_html_output',11);
4129
  function ampforwp_body_beginning_html_output(){
4130
- global $redux_builder_amp;
4131
- if( $redux_builder_amp['amp-body-text-area'] ) {
4132
- echo $redux_builder_amp['amp-body-text-area'] ;
4133
  }
4134
  }
4135
 
@@ -5415,7 +5437,7 @@ if ( ! function_exists( 'ampforwp_google_fonts_generator' ) ) {
5415
  }
5416
  }
5417
 
5418
- echo $font_output;
5419
  }
5420
  }
5421
 
@@ -6196,7 +6218,19 @@ function ampforwp_thrive_architect_content(){
6196
  //#3254 Remove action for Woodmart theme lazyload feature
6197
  remove_action( 'init', 'woodmart_lazy_loading_init', 120 );
6198
  }
 
 
 
6199
  }
 
 
 
 
 
 
 
 
 
6200
  function ampforwp_thrive_content($content){
6201
  $post_id = "";
6202
  if ( ampforwp_is_front_page() ){
@@ -6843,7 +6877,7 @@ function ampforwp_webp_featured_image() {
6843
  <figure class="amp-wp-article-featured-image">
6844
  <?php
6845
  if(1 == ampforwp_get_setting('amp-design-selector') || 2 == ampforwp_get_setting('amp-design-selector') || 3 == ampforwp_get_setting('amp-design-selector')){
6846
- echo $image_output;
6847
  }
6848
  ?>
6849
  </figure>
@@ -6911,14 +6945,3 @@ if ( ! function_exists('ampforwp_include_opengraph') ) {
6911
  }
6912
  }
6913
  }
6914
-
6915
- add_filter('ampforwp_pagebuilder_status_modify','ampforwp_pagebuilder_has_content',10,2);
6916
- function ampforwp_pagebuilder_has_content($response, $postId){
6917
- $ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
6918
- if ( isset( $ampforwp_pagebuilder_enable ) && $ampforwp_pagebuilder_enable == 'yes') {
6919
- if(empty(amppb_post_content(''))){
6920
- $response = false;
6921
- }
6922
- }
6923
- return $response;
6924
- }
209
  if( is_front_page() && ! $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
210
  return;
211
  }
212
+ // Skip this condition for woocommerce product archive and shop pages.
213
+ if( function_exists('amp_woocommerce_pro_add_woocommerce_support') && (function_exists('is_product_category') && !is_product_category()) && (function_exists('is_product_tag') && !is_product_tag()) && (function_exists('is_shop') && !is_shop() ) ){
214
+ if( is_archive() && ( !ampforwp_get_setting('ampforwp-archive-support') || ( is_category() && !ampforwp_get_setting('ampforwp-archive-support-cat') ) || ( is_tag() && !ampforwp_get_setting('ampforwp-archive-support-tag') ))){
215
+ return;
216
+ }
217
+ }
218
+
219
+ // When amp woocommerce pro plugin is not active.
220
+ if ( is_archive() && !function_exists('amp_woocommerce_pro_add_woocommerce_support') ) {
221
  if(!ampforwp_get_setting('ampforwp-archive-support')){
222
  return;
223
  }
224
+ if( is_category() && !ampforwp_get_setting('ampforwp-archive-support-cat') ){
225
  return;
226
  }
227
  if( is_tag() && !ampforwp_get_setting('ampforwp-archive-support-tag') ){
228
  return;
229
  }
230
+ }
231
  // #1192 Password Protected posts exclusion
232
  if(post_password_required( $post )){
233
  return;
243
  }
244
  }
245
  // no-amphtml for search
246
+ // if(is_search()){
247
+ // return;
248
+ // }
249
  // #872 no-amphtml if selected as hide from settings
250
  if ( is_category_amp_disabled() ) {
251
  return;
424
 
425
  $amp_url = apply_filters('ampforwp_modify_rel_canonical',$amp_url);
426
 
427
+ if( $supported_amp_post_types || ampforwp_is_front_page() ) {
428
  return $amp_url;
429
  }
430
  }
723
  // aria-current
724
  $content = preg_replace('/(<[^>]+) aria-current=".*?"/', '$1', $content);
725
  // Gallery Break fix
726
+ $content = preg_replace('/[^\[]\[gallery(.*?)\]/', '</p>[gallery$1]</p>', $content);
727
  // value attribute from anchor tag #2262
728
  $content = preg_replace('/<a(.*?)(value=".*?")(.*?)>/', '<a$1$3>', $content);
729
  //Compatibility with Cloudflare stream. #3230
865
  </div>
866
  </div>
867
  </div>
868
+ </div>
869
+ <?php
870
+ if ( get_option('page_on_front') == $post->ID && false == $redux_builder_amp['amp-frontpage-select-option'] ) {
871
+ echo sprintf(('<p class="afp"><b> %s </b> <a class="" target= "_blank" href="%s">%s</a></p>'), esc_html__('We have detected that you have not setup the FrontPage for AMP,','accelerated-mobile-pages'),admin_url("admin.php?page=amp_options&tabid=opt-text-subsection#redux_builder_amp-ampforwp-homepage-on-off-support"),esc_html__('Click here to setup','accelerated-mobile-pages'));
872
+ }
873
+ if ( true == $redux_builder_amp['amp-frontpage-select-option'] && $post->ID == $redux_builder_amp['amp-frontpage-select-option-pages'] ) {
874
+ echo sprintf('<p>%s</p>', esc_html__('AMP FrontPage'));
875
+ }
876
+ }
877
 
878
  /**
879
  * Adds a meta box to the post editing screen for Mobile Redirection on-off on specific pages
2233
  function ampforwp_copat_wp_html_compression() {
2234
  remove_action('template_redirect', 'wp_html_compression_start', -1);
2235
  remove_action('get_header', 'wp_html_compression_start');
2236
+
2237
+ if( class_exists('BunnyCDN') ){
2238
+ $url_path = trim(parse_url(add_query_arg(array()), PHP_URL_PATH),'/' );
2239
+ if( function_exists('ampforwp_is_amp_inURL') && ampforwp_is_amp_inURL($url_path)) {
2240
+ //Remove Action to remove CDN URL from BunnyCDN Plugin
2241
+ remove_action("template_redirect", "doRewrite");
2242
+ }
2243
+ }
2244
  }
2245
  add_action('amp_init','ampforwp_copat_wp_html_compression');
2246
 
2272
  //39. #560 Header and Footer Editable html enabled script area
2273
  add_action('amp_post_template_footer','ampforwp_footer_html_output',11);
2274
  function ampforwp_footer_html_output() {
2275
+
2276
+ if( ampforwp_get_setting('amp-footer-text-area-for-html') ) {
2277
+ echo ampforwp_get_setting('amp-footer-text-area-for-html') ;
2278
  }
2279
  }
2280
 
2281
  add_action('amp_post_template_head','ampforwp_header_html_output',11);
2282
  function ampforwp_header_html_output() {
2283
+
2284
+ if( ampforwp_get_setting('amp-header-text-area-for-html') ) {
2285
+ echo ampforwp_get_setting('amp-header-text-area-for-html') ;
2286
  }
2287
  // amphtml tag when AMP Takeover is enabled #2550
2288
  if(ampforwp_get_setting('ampforwp-amp-takeover') == true){
4134
  add_action( 'admin_bar_menu', 'ampforwp_visit_amp_in_admin_bar',999 );
4135
  function ampforwp_visit_amp_in_admin_bar($admin_bar) {
4136
  global $redux_builder_amp;
4137
+ if ( ampforwp_get_setting('ampforwp-homepage-on-off-support') && false == ampforwp_get_setting('ampforwp-amp-takeover') ) {
4138
  $args = array(
4139
  'parent' => 'site-name',
4140
  'id' => 'view-amp',
4149
  // Things to be added in the Body Tag #1064
4150
  add_action('ampforwp_body_beginning','ampforwp_body_beginning_html_output',11);
4151
  function ampforwp_body_beginning_html_output(){
4152
+
4153
+ if( ampforwp_get_setting('amp-body-text-area') ) {
4154
+ echo ampforwp_get_setting('amp-body-text-area') ;
4155
  }
4156
  }
4157
 
5437
  }
5438
  }
5439
 
5440
+ echo $font_output; // escaped above
5441
  }
5442
  }
5443
 
6218
  //#3254 Remove action for Woodmart theme lazyload feature
6219
  remove_action( 'init', 'woodmart_lazy_loading_init', 120 );
6220
  }
6221
+ if( class_exists('CDN_Enabler')){
6222
+ add_filter('option_cdn_enabler', 'ampforwp_add_exclusions_cdn_enabler');
6223
+ }
6224
  }
6225
+
6226
+ function ampforwp_add_exclusions_cdn_enabler($options){
6227
+ if (!is_array($options)) { return $options; }
6228
+ $excluded_urls[] = 'wp-content';
6229
+ $urls = implode(',', $excluded_urls);
6230
+ $options['excludes'] = empty($options['excludes'])?$urls:$options['excludes'].','.$urls;
6231
+ return $options;
6232
+ }
6233
+
6234
  function ampforwp_thrive_content($content){
6235
  $post_id = "";
6236
  if ( ampforwp_is_front_page() ){
6877
  <figure class="amp-wp-article-featured-image">
6878
  <?php
6879
  if(1 == ampforwp_get_setting('amp-design-selector') || 2 == ampforwp_get_setting('amp-design-selector') || 3 == ampforwp_get_setting('amp-design-selector')){
6880
+ echo $image_output; // escaped above
6881
  }
6882
  ?>
6883
  </figure>
6945
  }
6946
  }
6947
  }
 
 
 
 
 
 
 
 
 
 
 
templates/frontpage-elements.php CHANGED
@@ -104,7 +104,7 @@ function ampforwp_design_1_frontpage_content( $template, $post_id ){
104
  }
105
  }
106
  $ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
107
- echo $ampforwp_the_content;
108
  do_action( 'ampforwp_after_post_content', $template );
109
  ?>
110
 
@@ -188,7 +188,7 @@ function ampforwp_design_2_frontpage_content($template, $post_id){
188
  }
189
  }
190
  $ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
191
- echo $ampforwp_the_content;
192
  do_action( 'ampforwp_after_post_content', $template ); ?>
193
 
194
  </div>
@@ -275,7 +275,7 @@ function ampforwp_design_3_frontpage_content($template, $post_id){
275
  }
276
  }
277
  $ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
278
- echo $ampforwp_the_content;
279
  do_action( 'ampforwp_after_post_content', $template ); ?>
280
 
281
  </div>
104
  }
105
  }
106
  $ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
107
+ echo $ampforwp_the_content; // amphtml content; no kses
108
  do_action( 'ampforwp_after_post_content', $template );
109
  ?>
110
 
188
  }
189
  }
190
  $ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
191
+ echo $ampforwp_the_content; // amphtml content; no kses
192
  do_action( 'ampforwp_after_post_content', $template ); ?>
193
 
194
  </div>
275
  }
276
  }
277
  $ampforwp_the_content = apply_filters('ampforwp_modify_the_content', $ampforwp_the_content);
278
+ echo $ampforwp_the_content; // amphtml content; no kses
279
  do_action( 'ampforwp_after_post_content', $template ); ?>
280
 
281
  </div>
templates/template-mode/admin-settings.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  add_filter('ampforwp_enabled_setting_options', 'add_theme_mode_support');
3
  add_filter("redux/options/redux_builder_amp/sections", 'ampforwp_settings_to_cache');
 
4
  function add_theme_mode_support($modesArray){
5
  $modesArray[] ='template-mode-amp';
6
  return $modesArray;
@@ -9,7 +10,9 @@ if ( ! function_exists( 'ampforwp_settings_to_cache' ) ) {
9
  function ampforwp_settings_to_cache($sections){
10
  $seoSection = array();
11
  $unsetArray = array('basic','design', 'opt-structured-data', 'amp-notifications', 'ampforwp-push-notifications', 'disqus-comments', 'fb-instant-article', 'hide-amp-section', 'amp-advance', 'amp-translator', 'amp-theme-settings', 'amp-theme-global-subsection', 'amp-theme-header-settings', 'amp-theme-homepage-settings', 'amp-single', 'amp-theme-footer-settings', 'amp-theme-page-settings', 'amp-social', 'ampforwp-date-section', 'amp-design', 'opt-text-subsection', 'amp-content-builder', 'amp-contact', 'amp-e-commerce', 'opt-go-premium', 'opt-choose', 'opt-plugins-manager');
 
12
  $backupArray = array( 'amp-ads', 'analytics', 'pwa-for-wp', 'amp-performance', 'amp-seo');
 
13
 
14
  $pwaField = array();
15
  foreach($sections as $key => $sec){
@@ -17,15 +20,15 @@ if ( ! function_exists( 'ampforwp_settings_to_cache' ) ) {
17
  if($sec['id']=='pwa-for-wp'){
18
  $pwaField = $sec['fields'];
19
  unset($sections[$key]);
20
- }if($sec['id']=='amp-performance'){
21
- $sections[$key]['fields'] = array_merge($sec['fields'], $pwaField);
22
- }else{
23
- $seoSection[] = $sec;
24
- unset($sections[$key]);
25
  }
 
 
 
 
 
26
  }
27
  if( in_array($sec['id'], $unsetArray) ){
28
- unset($sections[$key]);
29
  }
30
  }
31
  $template_mode = array(array(
@@ -41,4 +44,15 @@ if ( ! function_exists( 'ampforwp_settings_to_cache' ) ) {
41
 
42
  return $sections;
43
  }
 
 
 
 
 
 
 
 
 
 
 
44
  }
1
  <?php
2
  add_filter('ampforwp_enabled_setting_options', 'add_theme_mode_support');
3
  add_filter("redux/options/redux_builder_amp/sections", 'ampforwp_settings_to_cache');
4
+ add_action( 'admin_footer', 'ampforwp_enqueue_template_mode_scripts' );
5
  function add_theme_mode_support($modesArray){
6
  $modesArray[] ='template-mode-amp';
7
  return $modesArray;
10
  function ampforwp_settings_to_cache($sections){
11
  $seoSection = array();
12
  $unsetArray = array('basic','design', 'opt-structured-data', 'amp-notifications', 'ampforwp-push-notifications', 'disqus-comments', 'fb-instant-article', 'hide-amp-section', 'amp-advance', 'amp-translator', 'amp-theme-settings', 'amp-theme-global-subsection', 'amp-theme-header-settings', 'amp-theme-homepage-settings', 'amp-single', 'amp-theme-footer-settings', 'amp-theme-page-settings', 'amp-social', 'ampforwp-date-section', 'amp-design', 'opt-text-subsection', 'amp-content-builder', 'amp-contact', 'amp-e-commerce', 'opt-go-premium', 'opt-choose', 'opt-plugins-manager');
13
+ $unsetArray = apply_filters('amp_template_mode_hide_opt_array',$unsetArray);
14
  $backupArray = array( 'amp-ads', 'analytics', 'pwa-for-wp', 'amp-performance', 'amp-seo');
15
+ $backupArray = apply_filters('amp_template_mode_show_opt_array',$backupArray);
16
 
17
  $pwaField = array();
18
  foreach($sections as $key => $sec){
20
  if($sec['id']=='pwa-for-wp'){
21
  $pwaField = $sec['fields'];
22
  unset($sections[$key]);
 
 
 
 
 
23
  }
24
+ if($sec['id']=='amp-performance'){
25
+ $sec['fields'] = array_merge($sec['fields'], $pwaField);
26
+ }
27
+ $seoSection[] = $sec;
28
+ unset($sections[$key]);
29
  }
30
  if( in_array($sec['id'], $unsetArray) ){
31
+ $sections[$key]['class'] = 'hidden';
32
  }
33
  }
34
  $template_mode = array(array(
44
 
45
  return $sections;
46
  }
47
+ }
48
+ function ampforwp_enqueue_template_mode_scripts(){
49
+ ?> <script>
50
+ jQuery('a[href*="admin.php?page=amp_options&tab=0"]').parents('li').find('li').each(
51
+ function(i,k){
52
+ if(i>1){
53
+ $(this).hide();
54
+ }
55
+ });
56
+ </script>
57
+ <?php
58
  }
templates/template-mode/template-mode.php CHANGED
@@ -486,7 +486,7 @@ Class AMPforWP_theme_mode{
486
  $css .= $this->ampforwp_get_remote_content(AMPFORWP_PLUGIN_DIR_URI."/templates/template-mode/admin-bar.css");
487
  }
488
  }
489
- echo $this->css_sanitizer($css);
490
  echo "</style>";
491
  }
492
  private function css_sanitizer($css){
486
  $css .= $this->ampforwp_get_remote_content(AMPFORWP_PLUGIN_DIR_URI."/templates/template-mode/admin-bar.css");
487
  }
488
  }
489
+ echo $this->css_sanitizer($css); // sanitized above
490
  echo "</style>";
491
  }
492
  private function css_sanitizer($css){