AMP for WP – Accelerated Mobile Pages - Version 1.0.77

Version Description

(17th May 2021) = * Fixed: Related posts doesn't show more than 3-4 #4300

Download this release

Release Info

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

Code changes from version 1.0.76 to 1.0.77

Files changed (111) hide show
  1. README.md +19 -22
  2. accelerated-moblie-pages.php +2 -2
  3. changelog.txt +129 -0
  4. classes/class-ampforwp-infinite-scroll.php +21 -1
  5. classes/class-ampforwp-slide-anything-embed.php +21 -4
  6. components/breadcrumb/breadcrumb.php +3 -2
  7. components/components-core.php +98 -13
  8. components/loop/loop.php +3 -0
  9. components/post-pagination/post-pagination.php +5 -1
  10. components/related-posts/related-posts.php +5 -6
  11. components/search/search.php +5 -1
  12. images/forminator-for-amp.png +0 -0
  13. images/happyforms-for-amp.png +0 -0
  14. images/the-seo-checklist-by-seo-buddy.png +0 -0
  15. includes/admin-script.js +45 -6
  16. includes/admin-style.css +14 -1
  17. includes/features/analytics/analytics-functions.php +6 -0
  18. includes/features/analytics/analytics-options.php +22 -0
  19. includes/features/functions.php +19 -7
  20. includes/features/notice-bar/notice-bar-functions.php +8 -2
  21. includes/features/notice-bar/notice-bar-options.php +48 -0
  22. includes/features/pagebuilders-support/pagebuilders_support.php +57 -1
  23. includes/features/performance/performance-functions.php +9 -2
  24. includes/features/performance/performance-options.php +13 -26
  25. includes/features/push-notification/push-notification-options.php +8 -0
  26. includes/features/structure-data/structured-data-functions.php +84 -1
  27. includes/features/structure-data/structured-data-options.php +40 -12
  28. includes/options/admin-config.php +247 -40
  29. includes/options/extensions/amp_slider/amp_slider/field_amp_slider.php +1 -1
  30. includes/options/extensions/demolink_image_select/demolink_image_select/field_demolink_image_select.php +1 -1
  31. includes/options/extensions/loader.php +1 -1
  32. includes/options/redux-core/assets/css/redux-admin.css +1 -4
  33. includes/options/redux-core/framework.php +1 -1
  34. includes/options/redux-core/inc/class.redux_cdn.php +10 -8
  35. includes/options/redux-core/inc/class.redux_functions.php +2 -2
  36. includes/options/redux-core/inc/extensions/customizer/extension_customizer.php +9 -5
  37. includes/options/redux-core/inc/extensions/import_export/import_export/field_import_export.php +1 -1
  38. includes/options/redux-core/inc/extensions/options_object/options_object/field_options_object.php +1 -1
  39. includes/options/redux-core/inc/fields/ace_editor/field_ace_editor.php +1 -1
  40. includes/options/redux-core/inc/fields/background/field_background.php +1 -1
  41. includes/options/redux-core/inc/fields/border/field_border.php +1 -1
  42. includes/options/redux-core/inc/fields/button_set/field_button_set.php +1 -1
  43. includes/options/redux-core/inc/fields/color/field_color.php +1 -1
  44. includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.php +1 -1
  45. includes/options/redux-core/inc/fields/color_rgba/field_color_rgba.php +1 -1
  46. includes/options/redux-core/inc/fields/date/field_date.php +1 -1
  47. includes/options/redux-core/inc/fields/dimensions/field_dimensions.php +1 -1
  48. includes/options/redux-core/inc/fields/editor/field_editor.php +1 -1
  49. includes/options/redux-core/inc/fields/gallery/field_gallery.php +1 -1
  50. includes/options/redux-core/inc/fields/image_select/field_image_select.php +1 -1
  51. includes/options/redux-core/inc/fields/info/field_info.php +1 -1
  52. includes/options/redux-core/inc/fields/link_color/field_link_color.php +1 -1
  53. includes/options/redux-core/inc/fields/media/field_media.php +1 -1
  54. includes/options/redux-core/inc/fields/multi_text/field_multi_text.php +1 -1
  55. includes/options/redux-core/inc/fields/multitext_repeater/field_multitext_repeater.php +1 -1
  56. includes/options/redux-core/inc/fields/palette/field_palette.php +1 -1
  57. includes/options/redux-core/inc/fields/password/field_password.php +1 -1
  58. includes/options/redux-core/inc/fields/radio/field_radio.php +1 -1
  59. includes/options/redux-core/inc/fields/raw/field_raw.php +1 -1
  60. includes/options/redux-core/inc/fields/repeater/field_repeater.php +1 -1
  61. includes/options/redux-core/inc/fields/section/field_section.php +1 -1
  62. includes/options/redux-core/inc/fields/select/field_select.php +1 -1
  63. includes/options/redux-core/inc/fields/select_image/field_select_image.php +1 -1
  64. includes/options/redux-core/inc/fields/slider/field_slider.php +1 -1
  65. includes/options/redux-core/inc/fields/sortable/field_sortable.php +1 -1
  66. includes/options/redux-core/inc/fields/sorter/field_sorter.php +1 -1
  67. includes/options/redux-core/inc/fields/spacing/field_spacing.php +1 -1
  68. includes/options/redux-core/inc/fields/spinner/field_spinner.php +1 -1
  69. includes/options/redux-core/inc/fields/switch/field_switch.php +1 -1
  70. includes/options/redux-core/inc/fields/text/field_text.php +1 -1
  71. includes/options/redux-core/inc/fields/textarea/field_textarea.php +1 -1
  72. includes/options/redux-core/inc/fields/typography/field_typography.json +1 -1
  73. includes/options/redux-core/inc/fields/typography/field_typography.php +1 -1
  74. includes/redirect.php +26 -5
  75. includes/sassy-style-optimized.css +1 -0
  76. includes/thirdparty-compatibility.php +14 -1
  77. includes/truepush-integration/amp-web-push-helper-frame.html +1 -1
  78. includes/truepush-integration/amp-web-push-permission-dialog.html +1 -1
  79. includes/updater/update.php +1 -1
  80. includes/vendor/amp/includes/amp-post-template-actions.php +1 -1
  81. includes/vendor/amp/includes/embeds/class-amp-facebook-embed.php +3 -1
  82. includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php +4 -0
  83. includes/vendor/amp/includes/sanitizers/class-amp-base-sanitizer.php +3 -2
  84. includes/vendor/amp/includes/sanitizers/class-amp-video-sanitizer.php +2 -0
  85. includes/vendor/aq_resizer.php +1 -1
  86. pagebuilder/amp-page-builder.php +5 -1
  87. pagebuilder/config/moduleTemplate.php +22 -4
  88. pagebuilder/inc/admin-amp-page-builder.css +3 -2
  89. pagebuilder/inc/viewShowFrontData.php +13 -1
  90. pagebuilder/modules/contact-form-shortcode-module.php +1 -0
  91. pagebuilder/modules/contents-module.php +6 -2
  92. pagebuilder/modules/image-mod-module.php +1 -1
  93. pagebuilder/modules/slider-mod-module.php +15 -1
  94. readme.txt +19 -22
  95. templates/design-manager/design-1/elements/related-posts.php +14 -11
  96. templates/design-manager/design-1/single.php +3 -6
  97. templates/design-manager/design-2/archive.php +1 -1
  98. templates/design-manager/design-2/elements/bread-crumbs.php +1 -1
  99. templates/design-manager/design-2/elements/related-posts.php +16 -13
  100. templates/design-manager/design-2/single.php +3 -6
  101. templates/design-manager/design-3/elements/related-posts.php +13 -10
  102. templates/design-manager/design-3/header-bar.php +1 -1
  103. templates/design-manager/design-3/single.php +3 -6
  104. templates/design-manager/design-3/style.php +1 -1
  105. templates/design-manager/swift/footer.php +18 -18
  106. templates/design-manager/swift/header.php +24 -6
  107. templates/design-manager/swift/page.php +8 -1
  108. templates/design-manager/swift/single.php +37 -11
  109. templates/design-manager/swift/style.php +18 -0
  110. templates/features.php +355 -42
  111. templates/search-functions.php +5 -1
README.md CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
- Tested up to: 5.6
7
- Stable tag: 1.0.76
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,25 +193,22 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
196
- = 1.0.76 (9th February 2021) =
197
- * Improvement: The SEO Checklist Banner #4912
198
- * Fixed: Telegram icon not visible in menu #4919
199
- * Fixed: Validation error in amp-img with transposh plugin #4918
200
- * Fixed: Fatal error when FIFU plugin is activate #4920
201
- * Fixed: AMP admin option panel is showing blank on user end #4914
202
- * Fixed: Tag base remove in AMP not working after 1.0.60 #4908
203
- * Fixed: data-playlist gets removed automatically in amp-brid-player #4906
204
- * Fixed: View Non-Amp Version link does not link to proper canonical url #4901
205
- * Fixed: Srcset not loading in category module of AMP page builder #4900
206
- * Fixed: Debug warnings #4917
207
-
208
- = 1.0.75 (23rd January 2021) =
209
- * Fixed: Imgur embed code not working in AMP #4899
210
- * Fixed: Srcset not loading in category module of AMP page builder #4900
211
- * Fixed: Advertising section displaying blank when AdsforWP plugin is active #4889
212
- * Fixed: AMP Page Builder not working on the pages and posts except the homepage #4890
213
- * Fixed: Swift 2nd header menu aligned towards right with polylang plugin #4893
214
- * Fixed: Post Pagination not working after 1.0.69 version #4902
215
- * Fixed: Debug warnings #4896
216
 
217
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
+ Tested up to: 5.7
7
+ Stable tag: 1.0.77
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
193
 
194
  == Changelog ==
195
 
196
+ = 1.0.77 (17th May 2021) =
197
+ * Fixed: Related posts doesn't show more than 3-4 #4300
198
+
199
+ = 1.0.76.17 (7th May 2021) =
200
+ * Improvements: Added Beaver builder Pagebuilder Support in AMP Pagebuilder Extension #5009
201
+ * Fixed: Title on Static Front Page is not displaying #5007
202
+ * Fixed: The attribute 'height' in tag 'amp-img' is set to the invalid value. #5005
203
+ * Fixed: ?amp doesn’t removing from view non-amp text #5006
204
+ * Fixed: Errors in Schema Pro FAQ #4956
205
+ * Fixed: PHP Warning error when enable Breadcrumbs option #5008
206
+
207
+ = 1.0.76.16 (4th May 2021) =
208
+ * Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
209
+ * Fixed: Slide Anything Plugin text slider not working in AMP #4999
210
+ * Fixed: Backend button translation #4717
211
+ * Fixed: Alignment issue with Gutenberg image block #4997
212
+ * Fixed: Undefined variable $q / Attempt to read property max_num_pages on null #5004
 
 
 
213
 
214
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
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: 1.0.76
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','1.0.76');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
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: 1.0.77
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','1.0.77');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
changelog.txt CHANGED
@@ -1,5 +1,134 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.76 (9th February 2021) =
4
  * Improvement: The SEO Checklist Banner #4912
5
  * Fixed: Telegram icon not visible in menu #4919
1
  == Changelog ==
2
 
3
+ = 1.0.77 (17th May 2021) =
4
+ * Fixed: Related posts doesn't show more than 3-4 #4300
5
+
6
+ = 1.0.76.17 (7th May 2021) =
7
+ * Improvements: Added Beaver builder Pagebuilder Support in AMP Pagebuilder Extension #5009
8
+ * Fixed: Title on Static Front Page is not displaying #5007
9
+ * Fixed: The attribute 'height' in tag 'amp-img' is set to the invalid value. #5005
10
+ * Fixed: ?amp doesn’t removing from view non-amp text #5006
11
+ * Fixed: Errors in Schema Pro FAQ #4956
12
+ * Fixed: PHP Warning error when enable Breadcrumbs option #5008
13
+
14
+ = 1.0.76.16 (4th May 2021) =
15
+ * Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
16
+ * Fixed: Slide Anything Plugin text slider not working in AMP #4999
17
+ * Fixed: Backend button translation #4717
18
+ * Fixed: Alignment issue with Gutenberg image block #4997
19
+ * Fixed: Undefined variable $q / Attempt to read property max_num_pages on null #5004
20
+
21
+ = 1.0.76.15 (28th April 2021) =
22
+ * Improvements: Added an option to add one signal notification on the desktop #4377
23
+ * Improvements: Added an option to set Target for CTA button in swift theme #4995
24
+ * Improvements: Added an option to install PWA from options panel #4529
25
+ * Improvements: Added HappyForms Compatibility Extension #5001
26
+ * Fixed: Width in percentage not working for the audio from the Pennews Theme #4576
27
+ * Fixed: Need to allow two attributes in input tag #4998
28
+
29
+ = 1.0.76.14 (23rd April 2021) =
30
+ * Improvements: Added an option to add Schema Pro FAQ in AMP #4956
31
+ * Improvements: Added support for the audio from the Pennews Theme #4576
32
+ * Improvements: Added Getty Images embed Compatibility #4188
33
+ * Improvements: Added an option to move the search bar top and bottom. #4748
34
+ * Improvements: Added an option for autoplay in slider module of AMP pagebuilder #3859
35
+ * Improvements: Added an option to remove Site navigation element schema #4583
36
+ * Improvements: Added related posts after the last post for infinity scroll posts in AMP layout #4652
37
+ * Fixed: Call to undefined method MCI_Footnotes_Convert error #4993
38
+ * Fixed: Search bar close icon is hidden behind the admin navigation bar #4991
39
+ * Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
40
+ * Fixed: Single post content not showing when using AMP on subdomain #4996
41
+
42
+ = 1.0.76.13 (19th April 2021) =
43
+ * Improvements: Added an option to preserve original permalinks in mobile redirection #4207
44
+ * Improvements: Added an option to add moderation tool for the Facebook comments #4485
45
+ * Improvements: Added an option to make buttons side by side in the mobile with AMP pagebuilder #4472
46
+ * Improvements: Added an option to add UTM souce parameters in URLs to both related & incontent related posts #4237
47
+ * Improvements: Added Quantcast CMP (consent management platform) support in AMP 4951
48
+ * Fixed: Alt tag not appearing in sticky social sharing icons #4984
49
+ * Fixed: Debug Warning in edit tag page when using PHP8 #4990
50
+
51
+ = 1.0.76.12 (14th April 2021) =
52
+ * Fixed: Fatal error occuring with the recent update Version 1.0.76.11 #4986
53
+
54
+ = 1.0.76.11 (14th April 2021) =
55
+ * Improvements: Added an option to select same categories in infinite scroll #4017
56
+ * Improvements: Added an option to select same tags in infinite scroll #4939
57
+ * Improvements: Added the filter to change breadcrumbs name #4979
58
+ * Fixed: Muffin pagebuilder not working in AMP #4983
59
+ * Fixed: PHP 8 debug errors #4981
60
+ * Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
61
+ * Fixed: Deprecated Filters Detected Warning in All in one SEO plugin #4980
62
+
63
+ = 1.0.76.10 (9th April 2021) =
64
+ * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
65
+ * Improvements: Added the feature to track each author contribution to the website pageview #4952
66
+ * Improvements: Added an option to show published date and time below the title #4976
67
+ * Improvements: Added an option to automatic redirect AMP to non-amp when access through desktop #4975
68
+ * Improvements: Added the Compatibility for Add Widget After Content plugin #4949
69
+ * Improvements: Added Forminator for AMP Extension #4965
70
+ * Fixed: Search Close Button is hidden for the Google Cached AMP Pages #4977
71
+ * Fixed: Image is not showing when the post is shared on social network #4971
72
+
73
+ = 1.0.76.9 (2nd April 2021) =
74
+ * Fixed: Facebook videos embedding not working #4973
75
+ * Fixed: The incorrect excerpt for the custom front page if user is using the Divi #4972
76
+ * Fixed: When Yoast SEO Multilingual is activated canonical getting addition http #4970
77
+ * Fixed: Close button not visible in the menu for the Google Cached AMP Pages #4969
78
+ * Fixed: Sassy social share icons are not displaying on AMP #4945
79
+ * Fixed: The AMP For WP option panel not saving due to redux plugin #4963
80
+ * Fixed: Docking functionality is not working for the amp-video type in mobile view #4961
81
+ * Fixed: Cannot change the title for in-content related post #4959
82
+ * Fixed: Upgrade for Free' button in structured data settings is not working #4960
83
+ * Fixed: Beginner and advance mode popup not closing #4974
84
+
85
+ = 1.0.76.8 (22nd March 2021) =
86
+ * Fixed: Srcset attribute not appearing on images with AMP page builder #4954
87
+ * Fixed: Option added to disable structured data in AMP #4953
88
+ * Fixed: Debug Warning with PHP 8.02 and WordPress 5.6.2 #4946
89
+ * Fixed: Background Video loop not working with AMP page builder #4948
90
+ * Fixed: Mobile redirection not working for the front page when pages are disabled #4942
91
+ * Fixed: Captions are not working on Slideshow Module by Jetpack Plugin #4950
92
+
93
+ = 1.0.76.7 (15th March 2021) =
94
+ * Fixed: WP_Scripts Debug Warnings when WordPress updated to v5.7 #4958
95
+
96
+ = 1.0.76.6 (12th March 2021) =
97
+ * Improvements: Added an option to show the author details after the title on mobile #4858
98
+ * Fixed: Images not appearing with WP stateless Google cloud storage plugin #4575
99
+ * Fixed: Category module doesnot have "/" at the end of the URL #4932
100
+ * Fixed: Proper commenting added for hooks #3368
101
+ * Fixed: Sticky social share bar icon colliding with polylang plugin #4935
102
+ * Fixed: AMP Page Builder is breaking with contact form module #4937
103
+ * Fixed: Truepush notification not working in AMP #4936
104
+
105
+ = 1.0.76.5 (20th February 2021) =
106
+ * Improvements: Added UX Builder compatibility #4933
107
+ * Fixed: Second paginated post not working #4892
108
+ * Fixed: Jetpack hosted videos not working on AMP #4931
109
+ * Fixed: AMP Pagebuilder module getting narrowed with All in One SEO plugin #4930
110
+
111
+ = 1.0.76.4 (19th February 2021) =
112
+ * Fixed: AMP front page not working after update #4892
113
+
114
+ = 1.0.76.3 (19th February 2021) =
115
+ * Improvement: Added the Smart Mag Theme review schema #4898
116
+ * Improvement: Added disable right click for copy protection #4877
117
+ * Improvement: Added an option to hide the title on pages #4929
118
+ * Fixed: AMP Browser caching policy #4876
119
+ * Fixed: p tags getting stripped with Change Pagination Links to /amp option #4892
120
+ * Fixed: Missing URL for attribute error for SVG images #4911
121
+ * Fixed: Debug warnings #4924
122
+
123
+ = 1.0.76.2 (17th February 2021) =
124
+ * Fixed: Removed The SEO Checklist Banner #4912
125
+
126
+ = 1.0.76.1 (16th February 2021) =
127
+ * Fixed: Fatal conflict with Yoast Premium #4926
128
+ * Fixed: Wrong Yoast breadcrumb links for the posts having multiple categories #4923
129
+ * Fixed: Fatal error on bbpress profile page #4922
130
+ * Fixed: Comments not showing on AMP front page #4921
131
+
132
  = 1.0.76 (9th February 2021) =
133
  * Improvement: The SEO Checklist Banner #4912
134
  * Fixed: Telegram icon not visible in menu #4919
classes/class-ampforwp-infinite-scroll.php CHANGED
@@ -25,7 +25,7 @@ if( ! class_exists('AMPforWP_Infinite_Scroll') ) {
25
  // amp-next-page script
26
  add_filter('ampforwp_post_template_data', array( $this , 'amp_infinite_scroll_script') );
27
  // amp-next-page tag
28
- if ( 4 != ampforwp_get_setting('amp-design-selector') )
29
  add_action('ampforwp_above_related_post', array( $this , 'amp_next_page') );
30
  else
31
  add_action('ampforwp_single_design_type_handle', array( $this , 'amp_next_page') );
@@ -125,6 +125,26 @@ if( ! class_exists('AMPforWP_Infinite_Scroll') ) {
125
  'posts_per_page' => 2,
126
  'no_found_rows' => true
127
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  $query_args = apply_filters('ampforwp_infinite_scroll_query_args', $query_args);
129
  $query = new WP_Query( $query_args );
130
  while ($query->have_posts()) {
25
  // amp-next-page script
26
  add_filter('ampforwp_post_template_data', array( $this , 'amp_infinite_scroll_script') );
27
  // amp-next-page tag
28
+ if ( 4 != ampforwp_get_setting('amp-design-selector') || (class_exists('AmpforwpAmpLayouts')) && 3 == ampforwp_get_setting('single-design-type') )
29
  add_action('ampforwp_above_related_post', array( $this , 'amp_next_page') );
30
  else
31
  add_action('ampforwp_single_design_type_handle', array( $this , 'amp_next_page') );
125
  'posts_per_page' => 2,
126
  'no_found_rows' => true
127
  );
128
+ if (ampforwp_get_setting('ampforwp-infinite-scroll-single') && ampforwp_get_setting('ampforwp-infinite-scroll-single-category')){
129
+ $categories = get_the_category($post->ID);
130
+ if ($categories) {
131
+ $category_ids = array();
132
+ foreach($categories as $individual_category){
133
+ $category_ids[] = $individual_category->cat_ID;
134
+ }
135
+ }
136
+ $query_args['category__in'] = $category_ids;
137
+ }
138
+ if (ampforwp_get_setting('ampforwp-infinite-scroll-single') && ampforwp_get_setting('ampforwp-infinite-scroll-single-tag')){
139
+ $tags = get_the_tags(ampforwp_get_the_ID());
140
+ if ($tags) {
141
+ $tags_ids = array();
142
+ foreach($tags as $individual_tag){
143
+ $tags_ids[] = $individual_tag->term_id;
144
+ }
145
+ }
146
+ $query_args['tag__in'] = $tags_ids;
147
+ }
148
  $query_args = apply_filters('ampforwp_infinite_scroll_query_args', $query_args);
149
  $query = new WP_Query( $query_args );
150
  while ($query->have_posts()) {
classes/class-ampforwp-slide-anything-embed.php CHANGED
@@ -48,6 +48,7 @@ class AMPFORWP_Slide_Anything_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_
48
  $id = intval( $atts['id'] );
49
  $post_status = get_post_status($id);
50
  if ($post_status == 'publish') {
 
51
  $metadata = get_metadata('post', $id);
52
  }
53
 
@@ -199,10 +200,23 @@ class AMPFORWP_Slide_Anything_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_
199
  </div>
200
  </amp-image-lightbox>';
201
  }
202
- $amp_images[$key] = AMP_HTML_Utils::build_tag(
203
- 'amp-img',
204
- $amp_img_arr
205
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
  //Small Thumbnail Images
208
  $thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
@@ -291,6 +305,9 @@ class AMPFORWP_Slide_Anything_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_
291
  $returnCompleteHtml = str_replace('{{with_carousel_thumbnail}}', $amp_carousel_thumbnail, $returnCompleteHtml);
292
  $returnCompleteHtml = str_replace('{{amp_image_lightbox}}', $amp_image_lightbox, $returnCompleteHtml);
293
  $returnCompleteHtml = str_replace('{{with_images}}', implode( PHP_EOL, $images ), $returnCompleteHtml);
 
 
 
294
  return $returnCompleteHtml;
295
  }
296
  }// Class closed
48
  $id = intval( $atts['id'] );
49
  $post_status = get_post_status($id);
50
  if ($post_status == 'publish') {
51
+ global $metadata;
52
  $metadata = get_metadata('post', $id);
53
  }
54
 
200
  </div>
201
  </amp-image-lightbox>';
202
  }
203
+ if(!preg_match('/default.png/', $amp_img_arr['src'])){
204
+ $amp_images[$key] = AMP_HTML_Utils::build_tag(
205
+ 'amp-img',
206
+ $amp_img_arr
207
+ );
208
+ }else{
209
+ global $metadata;
210
+ $slide_data = array();
211
+ $slide_data['num_slides'] = $metadata['sa_num_slides'][0];
212
+ for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
213
+ if (isset($metadata["sa_slide".$i."_content"][0])) {
214
+ $amp_images[$i-1] = AMP_HTML_Utils::build_tag(
215
+ 'div', array( 'slideampcontent' => esc_attr($metadata["sa_slide".$i."_content"][0]))
216
+ );
217
+ }
218
+ }
219
+ }
220
 
221
  //Small Thumbnail Images
222
  $thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
305
  $returnCompleteHtml = str_replace('{{with_carousel_thumbnail}}', $amp_carousel_thumbnail, $returnCompleteHtml);
306
  $returnCompleteHtml = str_replace('{{amp_image_lightbox}}', $amp_image_lightbox, $returnCompleteHtml);
307
  $returnCompleteHtml = str_replace('{{with_images}}', implode( PHP_EOL, $images ), $returnCompleteHtml);
308
+ $returnCompleteHtml = preg_replace('/<div slideampcontent="(.*?)"><\/div>/', '<div>$1</div>', $returnCompleteHtml);
309
+ $returnCompleteHtml = str_replace('&lt;', '<', $returnCompleteHtml);
310
+ $returnCompleteHtml = str_replace('&gt;', '>', $returnCompleteHtml);
311
  return $returnCompleteHtml;
312
  }
313
  }// Class closed
components/breadcrumb/breadcrumb.php CHANGED
@@ -134,7 +134,7 @@ function amp_breadcrumb_output(){
134
  foreach($cat_parents as $parents) {
135
  $categories = get_the_category();
136
  $cat_id = $categories[0]->cat_ID;
137
- if(class_exists( 'WPSEO_Options' )){
138
  $cat_id = $primary_cateogory;
139
  }
140
  $cat_link = get_category_link($cat_id);
@@ -142,7 +142,8 @@ function amp_breadcrumb_output(){
142
  $cat_link = ampforwp_url_controller( $cat_link );
143
  }
144
  $cat_link = apply_filters('ampforwp_breadcrumbs_category_url', $cat_link,$post->ID);
145
- $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
 
146
  }
147
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
148
  $cat_display .='<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>';
134
  foreach($cat_parents as $parents) {
135
  $categories = get_the_category();
136
  $cat_id = $categories[0]->cat_ID;
137
+ if(class_exists( 'WPSEO_Options' ) && !empty($primary_cateogory)){
138
  $cat_id = $primary_cateogory;
139
  }
140
  $cat_link = get_category_link($cat_id);
142
  $cat_link = ampforwp_url_controller( $cat_link );
143
  }
144
  $cat_link = apply_filters('ampforwp_breadcrumbs_category_url', $cat_link,$post->ID);
145
+ $parents = apply_filters('ampforwp_breadcrumbs_category_name', $parents);
146
+ $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($parents). '" href="'. esc_url($cat_link).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
147
  }
148
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
149
  $cat_display .='<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>';
components/components-core.php CHANGED
@@ -315,6 +315,7 @@ function amp_header_core(){
315
  $ampforwp_custom_post_page = ampforwp_custom_post_page();
316
 
317
  add_action('amp_post_template_head','ampforwp_sanitize_archive_desc');
 
318
  function ampforwp_sanitize_archive_desc(){
319
  $description = get_the_archive_description();
320
  if ($description) {
@@ -340,6 +341,7 @@ function amp_header_core(){
340
  }
341
  }
342
  }
 
343
  // Homepage
344
  if ( is_home() ) {
345
 
@@ -364,13 +366,10 @@ function amp_header_core(){
364
  if( true == ampforwp_get_setting('amp-rtl-select-option') ){
365
  $bodyClass .= ' rtl ';
366
  }
367
- $lightbox = $right_click = '';
368
  if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
369
  $lightbox = 'data-amp-auto-lightbox-disable';
370
  }
371
- if( true == ampforwp_get_setting('ampforwp-right-click-disable') ){
372
- $right_click = 'oncontextmenu="return false"';
373
- }
374
  ?><!doctype html>
375
  <html <?php echo esc_attr(ampforwp_amp_nonamp_convert('amp ')); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
376
  <head>
@@ -394,13 +393,17 @@ function amp_header_core(){
394
  <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
395
  <?php do_action( 'amp_css', $thisTemplate ); ?>
396
  <?php $custom_css = ampforwp_get_setting('css_editor');
 
 
 
 
397
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
398
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
399
  echo $sanitized_css; // sanitized above ?>
400
  </style>
401
  <?php do_action('ampforwp_before_head', $thisTemplate); ?>
402
  </head>
403
- <body <?php echo sanitize_text_field($right_click); ?><?php echo esc_attr($lightbox); ?> <?php ampforwp_body_class($bodyClass); ?>>
404
  <?php do_action('amp_start', $thisTemplate); ?>
405
  <?php do_action('ampforwp_admin_menu_bar_front'); ?>
406
  <?php do_action('ampforwp_body_beginning', $thisTemplate);
@@ -557,12 +560,13 @@ function amp_content($post_id= ''){
557
  // Custom/Alternative AMP content added through post meta
558
  $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
559
  }
560
- // Muffin Builder Compatibility #1455 #1893
561
- if ( function_exists('mfn_builder_print') && ! $amp_custom_content_enable ) {
562
- ob_start();
563
- mfn_builder_print( $thisTemplate->get( 'post_id' ) );
564
- $content = ob_get_contents();
565
- ob_end_clean();
 
566
  $sanitizer_obj = new AMPFORWP_Content( $content,
567
  array(),
568
  apply_filters( 'ampforwp_content_sanitizers',
@@ -732,10 +736,57 @@ function ampforwp_backtotop_global_css(){?>
732
  .wp-pagenavi a.last , .amp-archive a.first {
733
  margin-left: 10px;
734
  }
735
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
736
  <?php if (class_exists('UAGB_Admin')) {?>
737
  .wp-block-uagb-faq svg {display: none;}
738
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739
  <?php if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
740
  .btt{
741
  position: fixed;
@@ -794,7 +845,41 @@ function ampforwp_backtotop_global_css(){?>
794
  .has-text-align-left { text-align: left;}
795
  .has-text-align-right { text-align: right;}
796
  .has-text-align-center { text-align: center;}
797
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
798
  // Fallback for amp_call_now #2782
799
  if ( !function_exists('amp_call_now') ) {
800
  function amp_call_now(){
315
  $ampforwp_custom_post_page = ampforwp_custom_post_page();
316
 
317
  add_action('amp_post_template_head','ampforwp_sanitize_archive_desc');
318
+ if ( !function_exists('ampforwp_sanitize_archive_desc') ) {
319
  function ampforwp_sanitize_archive_desc(){
320
  $description = get_the_archive_description();
321
  if ($description) {
341
  }
342
  }
343
  }
344
+ }
345
  // Homepage
346
  if ( is_home() ) {
347
 
366
  if( true == ampforwp_get_setting('amp-rtl-select-option') ){
367
  $bodyClass .= ' rtl ';
368
  }
369
+ $lightbox = '';
370
  if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
371
  $lightbox = 'data-amp-auto-lightbox-disable';
372
  }
 
 
 
373
  ?><!doctype html>
374
  <html <?php echo esc_attr(ampforwp_amp_nonamp_convert('amp ')); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
375
  <head>
393
  <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
394
  <?php do_action( 'amp_css', $thisTemplate ); ?>
395
  <?php $custom_css = ampforwp_get_setting('css_editor');
396
+ if (function_exists('heateor_sss_run') && ampforwp_get_setting('ampforwp_css_tree_shaking') ) {
397
+ global $wp_filesystem;
398
+ $custom_css .= $wp_filesystem->get_contents(AMPFORWP_PLUGIN_DIR."/includes/sassy-style-optimized.css");
399
+ }
400
  $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
401
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
402
  echo $sanitized_css; // sanitized above ?>
403
  </style>
404
  <?php do_action('ampforwp_before_head', $thisTemplate); ?>
405
  </head>
406
+ <body <?php echo esc_attr($lightbox); ?> <?php ampforwp_body_class($bodyClass); ?>>
407
  <?php do_action('amp_start', $thisTemplate); ?>
408
  <?php do_action('ampforwp_admin_menu_bar_front'); ?>
409
  <?php do_action('ampforwp_body_beginning', $thisTemplate);
560
  // Custom/Alternative AMP content added through post meta
561
  $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
562
  }
563
+ // Muffin Builder Compatibility #1455 #1893 #4983
564
+ if ( class_exists('Mfn_Builder_Front') && ! $amp_custom_content_enable ) {
565
+ $mfn_builder = $content = '';
566
+ $mfn_builder = new Mfn_Builder_Front(ampforwp_get_the_ID());
567
+ if (! empty($mfn_builder) ) {
568
+ $content = $mfn_builder->show();
569
+ }
570
  $sanitizer_obj = new AMPFORWP_Content( $content,
571
  array(),
572
  apply_filters( 'ampforwp_content_sanitizers',
736
  .wp-pagenavi a.last , .amp-archive a.first {
737
  margin-left: 10px;
738
  }
739
+ <?php } ?>
740
+ <?php if (true == ampforwp_get_setting('ampforwp-right-click-disable')) {?>
741
+ .*{
742
+ -moz-user-select:none;
743
+ -webkit-user-select:none;
744
+ cursor: default;
745
+ }
746
+ html{
747
+ -webkit-touch-callout: none;
748
+ -webkit-user-select: none;
749
+ -khtml-user-select: none;
750
+ -moz-user-select: none;
751
+ -ms-user-select: none;
752
+ user-select: none;
753
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
754
+ }
755
+ <?php } ?>
756
  <?php if (class_exists('UAGB_Admin')) {?>
757
  .wp-block-uagb-faq svg {display: none;}
758
  <?php } ?>
759
+ <?php if (function_exists('on_bsf_aiosrs_pro_activate')) {?>
760
+ span.wpsp-icon.wpsp-faq-icon-wrap svg , span.wpsp-icon-active.wpsp-faq-icon-wrap svg{
761
+ display: none;}
762
+ <?php } ?>
763
+ <?php if (class_exists('Jetpack_Gallery_Settings')) {?>
764
+ .wp-block-jetpack-slideshow_container.swiper-container amp-selector {
765
+ display: none;
766
+ }
767
+ .wp-block-jetpack-slideshow_slide.amp-carousel-slide {
768
+ height: auto;
769
+ margin-bottom: 20px;
770
+ }
771
+ <?php } ?>
772
+ <?php if (ampforwp_get_setting('amp-quantcast-notice-switch')) {?>
773
+ #postPromptUI button {
774
+ background: #368bd6;
775
+ color: white;
776
+ padding: 5px 15px;
777
+ border: none;
778
+ outline: none;
779
+ display: flex;
780
+ align-items: center;
781
+ position: fixed;
782
+ right: 0;
783
+ bottom: 0;
784
+ border-radius: 3px 0 0 3px;
785
+ max-height: 30px;
786
+ max-width: 110px;
787
+ cursor: pointer;
788
+ }
789
+ <?php } ?>
790
  <?php if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
791
  .btt{
792
  position: fixed;
845
  .has-text-align-left { text-align: left;}
846
  .has-text-align-right { text-align: right;}
847
  .has-text-align-center { text-align: center;}
848
+ <?php if (ampforwp_get_setting('ampforwp-web-push-onesignal') && ampforwp_get_setting('ampforwp-web-push-onesignal-popup') && is_single()) { ?>
849
+ @media (min-width:1281px){
850
+ .onesignal-popup{
851
+ position: fixed;
852
+ top: 0;
853
+ bottom: 0;
854
+ left: 0;
855
+ right: 0;
856
+ background: rgba(0, 0, 0, 0.7);
857
+ color: #333;
858
+ z-index:9999999;
859
+ line-height:1.3;
860
+ height: 100vh;
861
+ width: 100vw
862
+ }
863
+ .onesignal-popup_wrapper{
864
+ padding: 2rem;
865
+ background: #fff;
866
+ max-width: 700px;
867
+ width: 95%;
868
+ margin: 5% auto;
869
+ text-align: center;
870
+ position:fixed;
871
+ left: 0;
872
+ right: 0;
873
+ margin:10% auto;
874
+ }
875
+ .onesignal-popup_x{
876
+ position: absolute;
877
+ right: 24px;
878
+ top: 16px;
879
+ cursor:pointer;
880
+ }
881
+ }
882
+ <?php } }
883
  // Fallback for amp_call_now #2782
884
  if ( !function_exists('amp_call_now') ) {
885
  function amp_call_now(){
components/loop/loop.php CHANGED
@@ -531,6 +531,9 @@ function amp_loop_image( $data=array() ) {
531
  $thumb_width = $width / $resolution;
532
  $thumb_height = $height / $resolution;
533
  }
 
 
 
534
  echo '<'.esc_attr($tag).' class="loop-img '.esc_attr($tag_class).'">';
535
  echo '<a href="'.esc_url($imageLink).'" title="'.esc_html(get_the_title()).'">';
536
  $img_content = '<amp-img src="'. esc_url($thumb_url) .'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" '. esc_attr($layout_responsive) .' class="'.esc_attr($imageClass).'" alt="'. esc_html(get_the_title()) .'"></amp-img>';
531
  $thumb_width = $width / $resolution;
532
  $thumb_height = $height / $resolution;
533
  }
534
+ if(isset($data['referer']) && $data['referer']=='related_post'){
535
+ $imageLink = ampforwp_modify_url_utm_params($imageLink);
536
+ }
537
  echo '<'.esc_attr($tag).' class="loop-img '.esc_attr($tag_class).'">';
538
  echo '<a href="'.esc_url($imageLink).'" title="'.esc_html(get_the_title()).'">';
539
  $img_content = '<amp-img src="'. esc_url($thumb_url) .'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" '. esc_attr($layout_responsive) .' class="'.esc_attr($imageClass).'" alt="'. esc_html(get_the_title()) .'"></amp-img>';
components/post-pagination/post-pagination.php CHANGED
@@ -126,7 +126,11 @@ function ampforwp_framework_get_post_paginated_link( $i, $args = '' ) {
126
 
127
  add_filter('ampforwp_modify_rel_canonical','amp_paginated_post_modify_amphtml');
128
  function amp_paginated_post_modify_amphtml($url) {
129
- if( is_single() && false == ampforwp_get_setting('ampforwp-amp-takeover') ){
 
 
 
 
130
  $post_paginated_page='';
131
  $post_paginated_page = get_query_var('page');
132
  if($post_paginated_page){
126
 
127
  add_filter('ampforwp_modify_rel_canonical','amp_paginated_post_modify_amphtml');
128
  function amp_paginated_post_modify_amphtml($url) {
129
+ $mob_pres_link = false;
130
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
131
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
132
+ }
133
+ if( is_single() && (false == ampforwp_get_setting('ampforwp-amp-takeover') && $mob_pres_link == false )){
134
  $post_paginated_page='';
135
  $post_paginated_page = get_query_var('page');
136
  if($post_paginated_page){
components/related-posts/related-posts.php CHANGED
@@ -18,10 +18,8 @@ function ampforwp_framework_get_related_posts($argsdata=array()){
18
  <ul class="clearfix">
19
  <?php ampforwp_related_post(); ?>
20
  <?php
21
-
22
  while( $my_query->have_posts() ) {
23
  $my_query->the_post();
24
-
25
  ?>
26
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
27
  <?php
@@ -60,7 +58,6 @@ function ampforwp_related_post_loop_query(){
60
  'fields' => 'ids',
61
  'post_type' => get_post_type($post),
62
  'posts_per_page'=> $int_number_of_related_posts,
63
- 'post__not_in' => array($post->ID),
64
  'orderby' => $orderby,
65
  'ignore_sticky_posts'=>1,
66
  'has_password' => false ,
@@ -68,9 +65,9 @@ function ampforwp_related_post_loop_query(){
68
  'no_found_rows' => true,
69
  'meta_query' => array(
70
  array(
71
- 'key' => 'ampforwp-amp-on-off',
72
- 'value' => 'default',
73
- )
74
  )
75
  );
76
  if($redux_builder_amp['ampforwp-single-select-type-of-related']==2 && 'post' == $post->post_type ){
@@ -132,6 +129,7 @@ function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array()
132
  $related_post_permalink = get_permalink();
133
  }
134
  $show_image = (isset($data['show_image']) ? $data['show_image'] : true);
 
135
  ?>
136
  <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
137
  <?php
@@ -186,6 +184,7 @@ function ampforwp_get_relatedpost_content($argsdata=array()){
186
  global $redux_builder_amp;
187
  $title = get_the_title();
188
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
 
189
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
190
  $related_post_permalink = get_permalink();
191
  if ( ampforwp_get_setting('amp-mobile-redirection') ) {
18
  <ul class="clearfix">
19
  <?php ampforwp_related_post(); ?>
20
  <?php
 
21
  while( $my_query->have_posts() ) {
22
  $my_query->the_post();
 
23
  ?>
24
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
25
  <?php
58
  'fields' => 'ids',
59
  'post_type' => get_post_type($post),
60
  'posts_per_page'=> $int_number_of_related_posts,
 
61
  'orderby' => $orderby,
62
  'ignore_sticky_posts'=>1,
63
  'has_password' => false ,
65
  'no_found_rows' => true,
66
  'meta_query' => array(
67
  array(
68
+ 'key' => 'ampforwp-amp-on-off',
69
+ 'value' => 'default',
70
+ )
71
  )
72
  );
73
  if($redux_builder_amp['ampforwp-single-select-type-of-related']==2 && 'post' == $post->post_type ){
129
  $related_post_permalink = get_permalink();
130
  }
131
  $show_image = (isset($data['show_image']) ? $data['show_image'] : true);
132
+ $related_post_permalink = ampforwp_modify_url_utm_params($related_post_permalink);
133
  ?>
134
  <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
135
  <?php
184
  global $redux_builder_amp;
185
  $title = get_the_title();
186
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
187
+ $related_post_permalink = ampforwp_modify_url_utm_params($related_post_permalink);
188
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
189
  $related_post_permalink = get_permalink();
190
  if ( ampforwp_get_setting('amp-mobile-redirection') ) {
components/search/search.php CHANGED
@@ -16,7 +16,11 @@ function ampforwp_framework_get_search_form() {
16
  $placeholder = pll__(esc_html__( ampforwp_get_setting('ampforwp-search-placeholder'), 'accelerated-mobile-pages'));
17
  }
18
  $rand = rand(10,100);
19
- if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && !$redux_builder_amp['ampforwp-amp-takeover'] ) {
 
 
 
 
20
  $amp_query_variable = 'amp';
21
  $amp_query_variable_val = '1';
22
  }
16
  $placeholder = pll__(esc_html__( ampforwp_get_setting('ampforwp-search-placeholder'), 'accelerated-mobile-pages'));
17
  }
18
  $rand = rand(10,100);
19
+ $mob_pres_link = false;
20
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
21
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
22
+ }
23
+ if (ampforwp_get_setting('ampforwp-amp-takeover') == false && $mob_pres_link == false) {
24
  $amp_query_variable = 'amp';
25
  $amp_query_variable_val = '1';
26
  }
images/forminator-for-amp.png ADDED
Binary file
images/happyforms-for-amp.png ADDED
Binary file
images/the-seo-checklist-by-seo-buddy.png DELETED
Binary file
includes/admin-script.js CHANGED
@@ -177,9 +177,31 @@ jQuery(function($) {
177
  }
178
  });
179
 
180
- $("#ampforwp-refersh-related-post").on('click', function(){
181
- var ref_nonce = $(this).attr('data-nonce');
182
- var current_post = parseInt($(this).attr('data-id'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  var elem = document.getElementById("ref_rel_post_bar");
184
  var first_int = setInterval(first_frame, 1000);
185
  var width = current_post;
@@ -196,7 +218,8 @@ jQuery(function($) {
196
  method: 'post',
197
  data: {
198
  action: 'ampforwp_referesh_related_post',
199
- verify_nonce: ref_nonce
 
200
  },
201
  success: function(response){
202
  clearInterval(first_int);
@@ -212,11 +235,27 @@ jQuery(function($) {
212
  width++;
213
  elem.style.width = width + '%';
214
  elem.innerHTML = width * 1 + '%';
 
 
 
 
215
  }
216
  }
217
  }
218
  });
219
-
 
 
 
 
 
 
 
 
 
 
 
 
220
  });
221
  $(".redux_field_search").on( "keypress", function (evt) {
222
  //Deterime where our character code is coming from within the event
@@ -2374,7 +2413,7 @@ function Drawer(drawerElem) {
2374
  data: {
2375
  action: 'ampforwp_set_option_panel_view',
2376
  option_type: opt_type,
2377
- verify_nonce: ampforwp_nonce
2378
  },
2379
  dataType: 'json',
2380
  success: function(response){
177
  }
178
  });
179
 
180
+ function ampforwp_get_cookie(cname) {
181
+ var name = cname + "=";
182
+ var ca = document.cookie.split(';');
183
+ for(var i = 0; i < ca.length; i++) {
184
+ var c = ca[i];
185
+ while (c.charAt(0) == ' ') {
186
+ c = c.substring(1);
187
+ }
188
+ if (c.indexOf(name) == 0) {
189
+ return c.substring(name.length, c.length);
190
+ }
191
+ }
192
+ return "";
193
+ }
194
+
195
+ var ref_lap = ampforwp_get_cookie('ref_lap');
196
+ if(ref_lap==''){
197
+ var ref_nonce = ampforwp_get_cookie('ref_nonce');
198
+ var current_post = ampforwp_get_cookie('current_post');
199
+ if(current_post!='' && ref_nonce!=''){
200
+ ampforwp_refresh_related_post(ref_nonce, current_post);
201
+ }
202
+ }
203
+
204
+ function ampforwp_refresh_related_post(ref_nonce='', current_post=''){
205
  var elem = document.getElementById("ref_rel_post_bar");
206
  var first_int = setInterval(first_frame, 1000);
207
  var width = current_post;
218
  method: 'post',
219
  data: {
220
  action: 'ampforwp_referesh_related_post',
221
+ verify_nonce: ref_nonce,
222
+ current_post: current_post,
223
  },
224
  success: function(response){
225
  clearInterval(first_int);
235
  width++;
236
  elem.style.width = width + '%';
237
  elem.innerHTML = width * 1 + '%';
238
+ if(width == '100'){
239
+ $('#ampforwp-refersh-related-post').remove();
240
+ $('#redux_builder_amp-ampforwp-refersh-related-post .description').html('All the posts have been refreshed successfully.');
241
+ }
242
  }
243
  }
244
  }
245
  });
246
+ setTimeout(function(){
247
+ var ref_nonce = ampforwp_get_cookie('ref_nonce');
248
+ var current_post = ampforwp_get_cookie('current_post');
249
+ if(current_post!='' && ref_nonce!='' && current_post<100){
250
+ ampforwp_refresh_related_post(ref_nonce, current_post);
251
+ }
252
+ },30000);
253
+ }
254
+
255
+ $("#ampforwp-refersh-related-post").on('click', function(){
256
+ var ref_nonce = $(this).attr('data-nonce');
257
+ var current_post = parseInt($(this).attr('data-id'));
258
+ ampforwp_refresh_related_post(ref_nonce, current_post);
259
  });
260
  $(".redux_field_search").on( "keypress", function (evt) {
261
  //Deterime where our character code is coming from within the event
2413
  data: {
2414
  action: 'ampforwp_set_option_panel_view',
2415
  option_type: opt_type,
2416
+ verify_nonce: ampforwp_nonce.security
2417
  },
2418
  dataType: 'json',
2419
  success: function(response){
includes/admin-style.css CHANGED
@@ -1090,6 +1090,7 @@ span.switch-text {
1090
  font-size: 14px;
1091
  top: 7px;
1092
  left: 12px;
 
1093
  }
1094
  #finalized-import-structure-data-from-amp{
1095
  margin-left:8px;
@@ -2163,4 +2164,16 @@ span#amp-close {
2163
  font-weight: normal;
2164
  font-size: 16px;
2165
  }
2166
-
 
 
 
 
 
 
 
 
 
 
 
 
1090
  font-size: 14px;
1091
  top: 7px;
1092
  left: 12px;
1093
+ margin-left: 10px;
1094
  }
1095
  #finalized-import-structure-data-from-amp{
1096
  margin-left:8px;
2164
  font-weight: normal;
2165
  font-size: 16px;
2166
  }
2167
+ .redux-field-container .ref-rel-bar-cont{
2168
+ background-color:#d0d3d4;
2169
+ color: black;
2170
+ position: relative;
2171
+ top: 5px;
2172
+ border-radius: 5px;
2173
+ }
2174
+ .redux-field-container .ref-rel-post-bar{
2175
+ background-color: #4CAF50;
2176
+ text-align: center;
2177
+ color: white;
2178
+ border-radius: 5px;
2179
+ }
includes/features/analytics/analytics-functions.php CHANGED
@@ -37,6 +37,12 @@ function ampforwp_analytics() {
37
  'enabled'=> true
38
  );
39
  }
 
 
 
 
 
 
40
  $ga_fields = apply_filters('ampforwp_google_analytics_fields', $ga_fields );
41
  $ampforwp_ga_fields = json_encode( $ga_fields);
42
  if( ampforwp_get_setting('ampforwp-ga-field-advance-switch') ){
37
  'enabled'=> true
38
  );
39
  }
40
+ if (ampforwp_get_setting('ampforwp-ga-field-author')) {
41
+ $author = ampforwp_get_setting('ampforwp-ga-field-author-index');
42
+ if ($author) {
43
+ $ga_fields['vars']['config'][$author] = get_the_author_meta('display_name');
44
+ }
45
+ }
46
  $ga_fields = apply_filters('ampforwp_google_analytics_fields', $ga_fields );
47
  $ampforwp_ga_fields = json_encode( $ga_fields);
48
  if( ampforwp_get_setting('ampforwp-ga-field-advance-switch') ){
includes/features/analytics/analytics-options.php CHANGED
@@ -101,6 +101,28 @@ function ampforwp_analytics_options($opt_name){
101
  esc_html__( 'for more details on AMP Linker','accelerated-mobile-pages' ) ),
102
  'default' => 0,
103
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  // Advance Tracking options for Google Analytics
105
  array(
106
  'class' => 'child_opt',
101
  esc_html__( 'for more details on AMP Linker','accelerated-mobile-pages' ) ),
102
  'default' => 0,
103
  ),
104
+ array(
105
+ 'class' => 'child_opt',
106
+ 'id' => 'ampforwp-ga-field-author',
107
+ 'type' => 'switch',
108
+ 'title' => esc_html__( 'Author Pageview', 'accelerated-mobile-pages' ),
109
+ 'required' => array('ampforwp-ga-switch', '=' , '1'),
110
+ 'tooltip-subtitle' => sprintf( '<a href="%s" target="_blank">%s</a> %s',
111
+ esc_url('https://ampforwp.com/tutorials/article/how-to-track-author-pageview-analytics-in-amp'),
112
+ esc_html__( 'Click Here','accelerated-mobile-pages' ),
113
+ esc_html__( 'for more details on Author Pageview','accelerated-mobile-pages' ) ),
114
+ 'default' => 0,
115
+ ),
116
+ array(
117
+ 'class'=>'child_opt child_opt_arrow',
118
+ 'id' =>'ampforwp-ga-field-author-index',
119
+ 'type' => 'text',
120
+ 'title' => esc_html__('Index of Author','accelerated-mobile-pages'),
121
+ 'default' => '',
122
+ 'tooltip-subtitle' => 'Index number of author in custom dimension section',
123
+ 'required' =>
124
+ array('ampforwp-ga-field-author', '=' , '1'),
125
+ ),
126
  // Advance Tracking options for Google Analytics
127
  array(
128
  'class' => 'child_opt',
includes/features/functions.php CHANGED
@@ -31,7 +31,9 @@ function ampforwp_add_admin_styling($hook_suffix){
31
  wp_enqueue_style( 'ampforwp_admin_css' );
32
 
33
  // Admin area scripts file
34
- wp_register_script( 'ampforwp_admin_js', untrailingslashit(AMPFORWP_PLUGIN_DIR_URI) . '/includes/admin-script.js', array('wp-color-picker'), AMPFORWP_VERSION );
 
 
35
 
36
  // Localize the script with new data
37
  $redux_data = array();
@@ -76,7 +78,7 @@ function ampforwp_add_admin_styling($hook_suffix){
76
  $screen = get_current_screen();
77
  if ( 'toplevel_page_amp_options' == $screen->base ) {
78
  $opt = get_option("ampforwp_option_panel_view_type");
79
- wp_localize_script( 'ampforwp_admin_js', 'amp_option_panel_view', $opt);
80
  }else{
81
  $opt = get_option("ampforwp_option_panel_view_type");
82
  if($opt==1 || $opt==2){
@@ -84,12 +86,15 @@ function ampforwp_add_admin_styling($hook_suffix){
84
  }else{
85
  $opt = "31";
86
  }
87
- wp_localize_script( 'ampforwp_admin_js', 'amp_option_panel_view', "$opt");
88
  }
89
- wp_localize_script( 'ampforwp_admin_js', 'amp_fields', $amp_fields );
90
  $redux_data = apply_filters("ampforwp_custom_localize_data", $redux_data);
91
  wp_localize_script( 'ampforwp_admin_js', 'redux_data', $redux_data );
92
- wp_localize_script( 'ampforwp_admin_js', 'ampforwp_nonce', wp_create_nonce('ampforwp-verify-request') );
 
 
 
93
  wp_enqueue_script( 'wp-color-picker' );
94
  wp_enqueue_script( 'ampforwp_admin_js' );
95
  }
@@ -234,7 +239,10 @@ function ampforwp_the_content_filter_full( $content_buffer ) {
234
  // Compatibility with the footnotes plugin. #2447
235
  if(class_exists('MCI_Footnotes')){
236
  $footnote_collapse_link = '';
237
- $footnote_collapse = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE));
 
 
 
238
  if( $footnote_collapse == true ){
239
  $footnote_collapse_link = 'on="tap:footnote_references_container.show" role="click" tabindex="1" ';
240
  $content_buffer = preg_replace( '/<div id=(.*?)footnote_references_container(.*?)\s/m','<div id=$1footnote_references_container$2 hidden ',$content_buffer);
@@ -823,7 +831,11 @@ function ampforwp_url_controller( $url, $nonamp = '' ) {
823
  }
824
  $new_url = "";
825
  $get_permalink_structure = "";
826
- if ( ampforwp_amp_nonamp_convert("", "check") || (isset($redux_builder_amp['ampforwp-amp-takeover']) && true == $redux_builder_amp['ampforwp-amp-takeover']) ) {
 
 
 
 
827
  $nonamp = 'nonamp';
828
  }
829
  if ( isset($nonamp) && 'nonamp' == $nonamp ) {
31
  wp_enqueue_style( 'ampforwp_admin_css' );
32
 
33
  // Admin area scripts file
34
+ $dep = array('wp-color-picker');
35
+ $dep = apply_filters('ampforwp_modify_script_dependency', $dep);
36
+ wp_register_script( 'ampforwp_admin_js', untrailingslashit(AMPFORWP_PLUGIN_DIR_URI) . '/includes/admin-script.js', $dep , AMPFORWP_VERSION );
37
 
38
  // Localize the script with new data
39
  $redux_data = array();
78
  $screen = get_current_screen();
79
  if ( 'toplevel_page_amp_options' == $screen->base ) {
80
  $opt = get_option("ampforwp_option_panel_view_type");
81
+ wp_localize_script( 'ampforwp_admin_js', 'amp_option_panel_view', array($opt));
82
  }else{
83
  $opt = get_option("ampforwp_option_panel_view_type");
84
  if($opt==1 || $opt==2){
86
  }else{
87
  $opt = "31";
88
  }
89
+ wp_localize_script( 'ampforwp_admin_js', 'amp_option_panel_view', array($opt));
90
  }
91
+ wp_localize_script( 'ampforwp_admin_js', 'amp_fields', array($amp_fields));
92
  $redux_data = apply_filters("ampforwp_custom_localize_data", $redux_data);
93
  wp_localize_script( 'ampforwp_admin_js', 'redux_data', $redux_data );
94
+ $ampforwp_nonce = array(
95
+ 'security' => wp_create_nonce( 'ampforwp-verify-request' )
96
+ );
97
+ wp_localize_script( 'ampforwp_admin_js', 'ampforwp_nonce', $ampforwp_nonce );
98
  wp_enqueue_script( 'wp-color-picker' );
99
  wp_enqueue_script( 'ampforwp_admin_js' );
100
  }
239
  // Compatibility with the footnotes plugin. #2447
240
  if(class_exists('MCI_Footnotes')){
241
  $footnote_collapse_link = '';
242
+ $footnote_collapse = false;
243
+ if (method_exists('MCI_Footnotes_Convert', 'toBool')) {
244
+ $footnote_collapse = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE));
245
+ }
246
  if( $footnote_collapse == true ){
247
  $footnote_collapse_link = 'on="tap:footnote_references_container.show" role="click" tabindex="1" ';
248
  $content_buffer = preg_replace( '/<div id=(.*?)footnote_references_container(.*?)\s/m','<div id=$1footnote_references_container$2 hidden ',$content_buffer);
831
  }
832
  $new_url = "";
833
  $get_permalink_structure = "";
834
+ $mob_pres_link = false;
835
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
836
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
837
+ }
838
+ if ( ampforwp_amp_nonamp_convert("", "check") || ($mob_pres_link == true || true == ampforwp_get_setting('ampforwp-amp-takeover'))) {
839
  $nonamp = 'nonamp';
840
  }
841
  if ( isset($nonamp) && 'nonamp' == $nonamp ) {
includes/features/notice-bar/notice-bar-functions.php CHANGED
@@ -35,8 +35,14 @@ function ampforwp_footer() {
35
  <?php } ?>
36
  <button on="tap:amp-user-notification1.dismiss"><?php echo esc_html__(ampforwp_get_setting('amp-accept-button-text'),'accelerated-mobile-pages'); ?></button>
37
  </amp-user-notification>
38
- <?php }
39
- }
 
 
 
 
 
 
40
 
41
  // 50. Properly adding noditification Scritps the AMP way
42
  add_filter( 'amp_post_template_data', 'ampforwp_add_notification_scripts', 75 );
35
  <?php } ?>
36
  <button on="tap:amp-user-notification1.dismiss"><?php echo esc_html__(ampforwp_get_setting('amp-accept-button-text'),'accelerated-mobile-pages'); ?></button>
37
  </amp-user-notification>
38
+ <?php }
39
+ if(ampforwp_get_setting('ampforwp-web-push-onesignal') && ampforwp_get_setting('ampforwp-web-push-onesignal-popup') && is_single()){ ?>
40
+ <amp-user-notification id="onesignal-popup-id" class="onesignal-popup" layout="nodisplay">
41
+ <div class="onesignal-popup_wrapper">
42
+ <?php echo ampforwp_onesignal_notifications_widget() ?>
43
+ <button class="onesignal-popup_x" on="tap:onesignal-popup-id.dismiss">X</button></div>
44
+ </amp-user-notification>
45
+ <?php } }
46
 
47
  // 50. Properly adding noditification Scritps the AMP way
48
  add_filter( 'amp_post_template_data', 'ampforwp_add_notification_scripts', 75 );
includes/features/notice-bar/notice-bar-options.php CHANGED
@@ -210,6 +210,54 @@ function ampforwp_notice_bar_options($opt_name){
210
  'title' => esc_html__('Privacy Page Button Text', 'accelerated-mobile-pages'),
211
  'default' => 'Click Here',
212
  'required' => array('amp-gdpr-compliance-switch', '=' , '1'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  ),
214
  array(
215
  'class' => 'amp-popup-fld',
210
  'title' => esc_html__('Privacy Page Button Text', 'accelerated-mobile-pages'),
211
  'default' => 'Click Here',
212
  'required' => array('amp-gdpr-compliance-switch', '=' , '1'),
213
+ ),
214
+ array(
215
+ 'id' => 'ampforwp-notice-quantcast',
216
+ 'type' => 'section',
217
+ 'title' => esc_html__('Quantcast Notice Bar in AMP', 'accelerated-mobile-pages'),
218
+ 'indent' => true,
219
+ 'layout_type' => 'accordion',
220
+ 'accordion-open'=> 1,
221
+ ),
222
+ array(
223
+ 'id' =>'amp-quantcast-notice-switch',
224
+ 'type' => 'switch',
225
+ 'title' => esc_html__('Quantcast Notice Bar', 'accelerated-mobile-pages'),
226
+ 'default' => 0,
227
+ 'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
228
+ esc_html__('Enable this option to add quantcast notice bar in AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-quantcast-notice-in-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
229
+ ),
230
+ array(
231
+ 'class' => 'child_opt',
232
+ 'id' =>'amp-quantcast-id',
233
+ 'type' => 'text',
234
+ 'title' => esc_html__('Account Id', 'accelerated-mobile-pages'),
235
+ 'placeholder'=> 'Quantcast Account Id',
236
+ 'required' => array('amp-quantcast-notice-switch', '=' , '1'),
237
+ ),
238
+ array(
239
+ 'class' => 'child_opt',
240
+ 'id' =>'amp-quantcast-hashcode',
241
+ 'type' => 'text',
242
+ 'title' => esc_html__('Hash Code', 'accelerated-mobile-pages'),
243
+ 'placeholder'=> '3BDXDqoakCk4Q4LzQqBGVQ',
244
+ 'required' => array('amp-quantcast-notice-switch', '=' , '1'),
245
+ ),
246
+ array(
247
+ 'class' => 'child_opt',
248
+ 'id' =>'amp-quantcast-publishercountrycode',
249
+ 'type' => 'text',
250
+ 'title' => esc_html__('Publisher Country Code', 'accelerated-mobile-pages'),
251
+ 'placeholder'=> 'US',
252
+ 'required' => array('amp-quantcast-notice-switch', '=' , '1'),
253
+ ),
254
+ array(
255
+ 'class' => 'child_opt',
256
+ 'id' =>'amp-quantcast-publishername',
257
+ 'type' => 'text',
258
+ 'title' => esc_html__('Publisher Name', 'accelerated-mobile-pages'),
259
+ 'placeholder'=> 'TestMeOut',
260
+ 'required' => array('amp-quantcast-notice-switch', '=' , '1'),
261
  ),
262
  array(
263
  'class' => 'amp-popup-fld',
includes/features/pagebuilders-support/pagebuilders_support.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
6
  function ampforwp_page_builders_support_options($opt_name){
7
- $divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = $avada_pb_for_ampchecker = $avia_pb_for_ampchecker = $oxygen_pb_for_ampchecker = array();
8
  if(!function_exists('amp_pagebuilder_compatibility_init')){
9
  $divi_pb_for_ampchecker = array(
10
  'id' => 'divi_pb_for_amp_info_normal',
@@ -50,6 +50,22 @@ if(!function_exists('amp_pagebuilder_compatibility_init')){
50
  ),
51
  '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' )),
52
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
54
  $pb_for_amp[] = array(
55
  'id' => 'ampforwp-pagebuilder-accor',
@@ -156,6 +172,43 @@ if(!function_exists('amp_pagebuilder_compatibility_init')){
156
  );
157
  }
158
  $pb_for_amp[] = $oxygen_pb_for_ampchecker;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  $pb_title = 'Page Builder';
160
  $theme = wp_get_theme(); // gets the current theme
161
  if( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ){
@@ -170,6 +223,9 @@ if(!function_exists('amp_pagebuilder_compatibility_init')){
170
  if(function_exists('avia_lang_setup')){
171
  $pb_title = 'Avia Builder Support';
172
  }
 
 
 
173
  Redux::setSection( $opt_name, array(
174
  'title' => esc_html__( $pb_title, 'accelerated-mobile-pages' ),
175
  'id' => 'amp-content-builder',
4
  exit;
5
  }
6
  function ampforwp_page_builders_support_options($opt_name){
7
+ $divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = $avada_pb_for_ampchecker = $avia_pb_for_ampchecker = $oxygen_pb_for_ampchecker = $ux_pb_for_ampchecker = $beaver_builder_pb_for_ampchecker = array();
8
  if(!function_exists('amp_pagebuilder_compatibility_init')){
9
  $divi_pb_for_ampchecker = array(
10
  'id' => 'divi_pb_for_amp_info_normal',
50
  ),
51
  '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' )),
52
  );
53
+ $ux_pb_for_ampchecker = array(
54
+ 'id' => 'ux_pb_for_amp_info_normal',
55
+ 'type' => 'info',
56
+ 'required' => array(
57
+ array('ampforwp-ux-pb-for-amp', '=' , true),
58
+ ),
59
+ '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' )),
60
+ );
61
+ $beaver_builder_pb_for_ampchecker = array(
62
+ 'id' => 'beaver_b_pb_for_amp_info_normal',
63
+ 'type' => 'info',
64
+ 'required' => array(
65
+ array('ampforwp-beaver-pb-for-amp', '=' , true),
66
+ ),
67
+ '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' )),
68
+ );
69
  }
70
  $pb_for_amp[] = array(
71
  'id' => 'ampforwp-pagebuilder-accor',
172
  );
173
  }
174
  $pb_for_amp[] = $oxygen_pb_for_ampchecker;
175
+ if(function_exists('flatsome_setup')){
176
+ $pb_for_amp[] = array(
177
+ 'id' => 'ampforwp-uxpb-for-amp-accordion-section',
178
+ 'type' => 'section',
179
+ 'title' => esc_html__('UX Builder Compatibility', 'accelerated-mobile-pages'),
180
+ 'indent' => true,
181
+ 'layout_type' => 'accordion',
182
+ 'accordion-open'=> 1,
183
+ );
184
+ $pb_for_amp[] = array(
185
+ 'id' => 'ampforwp-ux-pb-for-amp',
186
+ 'type' => 'switch',
187
+ 'title' => esc_html__('UX Builder Support','accelerated-mobile-pages'),
188
+ 'tooltip-subtitle' => esc_html__('Enable or Disable the UX Builder support for AMP', 'accelerated-mobile-pages'),
189
+ 'default' => false
190
+ );
191
+ }
192
+
193
+ $pb_for_amp[] = $ux_pb_for_ampchecker;
194
+ if (is_plugin_active('beaver-builder-lite-version/fl-builder.php')) {
195
+ $pb_for_amp[] = array(
196
+ 'id' => 'ampforwp-beaver-pb-for-amp-accor',
197
+ 'type' => 'section',
198
+ 'title' => esc_html__('Beaver Compatibility', 'accelerated-mobile-pages'),
199
+ 'indent' => true,
200
+ 'layout_type' => 'accordion',
201
+ 'accordion-open'=> 1,
202
+ );
203
+ $pb_for_amp[] = array(
204
+ 'id' => 'ampforwp-beaver-pb-for-amp',
205
+ 'type' => 'switch',
206
+ 'title' => esc_html__('Beaver Builder Support','accelerated-mobile-pages'),
207
+ 'tooltip-subtitle' => esc_html__('Enable or Disable the Beaver support for AMP', 'accelerated-mobile-pages'),
208
+ 'default' => false
209
+ );
210
+ }
211
+ $pb_for_amp[] = $beaver_builder_pb_for_ampchecker;
212
  $pb_title = 'Page Builder';
213
  $theme = wp_get_theme(); // gets the current theme
214
  if( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ){
223
  if(function_exists('avia_lang_setup')){
224
  $pb_title = 'Avia Builder Support';
225
  }
226
+ if(function_exists('flatsome_setup')){
227
+ $pb_title = 'UX Builder Support';
228
+ }
229
  Redux::setSection( $opt_name, array(
230
  'title' => esc_html__( $pb_title, 'accelerated-mobile-pages' ),
231
  'id' => 'amp-content-builder',
includes/features/performance/performance-functions.php CHANGED
@@ -55,6 +55,15 @@ function ampforwp_minify_html_output($content_buffer){
55
  if(preg_match('/<blockquote class="imgur-embed(.*?)"(.*?)data-id="(.*?)"(.*?)<\/blockquote>/', $content_buffer)){
56
  $content_buffer = preg_replace('/<blockquote class="imgur-embed(.*?)"(.*?)data-id="(.*?)"(.*?)<\/blockquote>/', '<amp-imgur data-imgur-id="$3" layout="responsive" width="500" height="600"></amp-imgur>', $content_buffer);
57
  }
 
 
 
 
 
 
 
 
 
58
  global $redux_builder_amp;
59
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
60
  return $content_buffer;
@@ -251,13 +260,11 @@ function ampforwp_code_to_add_in_htaccess(){
251
  $htaccess_cntn .= 'ExpiresByType image/x-icon "access 1 year"' . "\n";
252
  $htaccess_cntn .= 'ExpiresByType text/css "access '.esc_html($expires).'"' . "\n";
253
  $htaccess_cntn .= 'ExpiresByType text/javascript "access '.esc_html($expires).'"' . "\n";
254
- $htaccess_cntn .= 'ExpiresByType text/html "access '.esc_html($expires).'"' . "\n";
255
  $htaccess_cntn .= 'ExpiresByType application/javascript "access '.esc_html($expires).'"' . "\n";
256
  $htaccess_cntn .= 'ExpiresByType application/x-javascript "access '.esc_html($expires).'"' . "\n";
257
  $htaccess_cntn .= 'ExpiresByType application/xhtml-xml "access '.esc_html($expires).'"' . "\n";
258
  $htaccess_cntn .= 'ExpiresByType application/pdf "access '.esc_html($expires).'"' . "\n";
259
  $htaccess_cntn .= 'ExpiresByType application/x-shockwave-flash "access '.esc_html($expires).'"' . "\n";
260
- $htaccess_cntn .= 'ExpiresDefault "access '.esc_html($expires).'"' . "\n";
261
  $htaccess_cntn .= '</IfModule>' . "\n";
262
  $htaccess_cntn .= '# END Caching AMPFORWPLBROWSERCEND' . "\n";
263
  return $htaccess_cntn;
55
  if(preg_match('/<blockquote class="imgur-embed(.*?)"(.*?)data-id="(.*?)"(.*?)<\/blockquote>/', $content_buffer)){
56
  $content_buffer = preg_replace('/<blockquote class="imgur-embed(.*?)"(.*?)data-id="(.*?)"(.*?)<\/blockquote>/', '<amp-imgur data-imgur-id="$3" layout="responsive" width="500" height="600"></amp-imgur>', $content_buffer);
57
  }
58
+ if ( class_exists( 'Jetpack' ) && preg_match('/<div(.*?)id="v-(.*?)-(.*?)"(.*?)class="video-player">(.*?)<\/div>/', $content_buffer)) {
59
+ $content_buffer = preg_replace('/<div(.*?)id="v-(.*?)-(.*?)"(.*?)class="video-player">(.*?)<\/div>/', '<div$1id="v-$2-$3"$4class="video-player"><amp-iframe width="300" height="150" sandbox="allow-scripts allow-same-origin" layout="responsive" src="https://videopress.com/embed/$2"></amp-iframe></div>', $content_buffer);
60
+ }
61
+ if (class_exists('AddWidgetAfterContent') && preg_match('/<form(.*?)><label(.*?)for="cat"(.*?)name="cat"(.*?)<\/form>/s', $content_buffer)) {
62
+ $content_buffer = preg_replace('/<form(.*?)><label(.*?)for="cat"(.*?)name="cat"(.*?)<\/form>/s', '<form$1 id="amp-wp-widget-categories-1" on="change:amp-wp-widget-categories-1.submit"><label$2for="cat"$3name="cat"$4</form>', $content_buffer);
63
+ }
64
+ if(function_exists('vp_pfui_admin_init') && function_exists('penci_setup') && preg_match('/<amp-iframe src="(.*?)anchor.fm(.*?)"(.*?)<\/amp-iframe>/', $content_buffer)){
65
+ $content_buffer = preg_replace('/<amp-iframe src="(.*?)anchor.fm(.*?)"(.*?)<\/amp-iframe>/', '<amp-iframe src="$1anchor.fm$2" scrolling="no" $3</amp-iframe>', $content_buffer);
66
+ }
67
  global $redux_builder_amp;
68
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
69
  return $content_buffer;
260
  $htaccess_cntn .= 'ExpiresByType image/x-icon "access 1 year"' . "\n";
261
  $htaccess_cntn .= 'ExpiresByType text/css "access '.esc_html($expires).'"' . "\n";
262
  $htaccess_cntn .= 'ExpiresByType text/javascript "access '.esc_html($expires).'"' . "\n";
 
263
  $htaccess_cntn .= 'ExpiresByType application/javascript "access '.esc_html($expires).'"' . "\n";
264
  $htaccess_cntn .= 'ExpiresByType application/x-javascript "access '.esc_html($expires).'"' . "\n";
265
  $htaccess_cntn .= 'ExpiresByType application/xhtml-xml "access '.esc_html($expires).'"' . "\n";
266
  $htaccess_cntn .= 'ExpiresByType application/pdf "access '.esc_html($expires).'"' . "\n";
267
  $htaccess_cntn .= 'ExpiresByType application/x-shockwave-flash "access '.esc_html($expires).'"' . "\n";
 
268
  $htaccess_cntn .= '</IfModule>' . "\n";
269
  $htaccess_cntn .= '# END Caching AMPFORWPLBROWSERCEND' . "\n";
270
  return $htaccess_cntn;
includes/features/performance/performance-options.php CHANGED
@@ -11,11 +11,11 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  $cache_AD_URL = "http://ampforwp.com/amp-cache/#utm_source=options-panel&utm_medium=performance-tab&utm_campaign=AMP%20Plugin";
12
  $cache_desc = '<a href="'.$cache_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp_cache_b.png" width="560" height="85" /></a>';
13
  }
14
- // PWA Section
15
  Redux::setSection( $opt_name, array(
16
- 'title' => esc_html__( 'PWA', 'accelerated-mobile-pages' ),
17
- 'id' => 'pwa-for-wp',
18
- 'desc' => '',
19
  'subsection' => true,
20
  'fields' => array(
21
  array(
@@ -28,29 +28,16 @@ if ( ! defined( 'ABSPATH' ) ) {
28
  ),
29
 
30
  array(
31
- 'id' => 'ampforwp_pwa_module',
32
- 'type' => 'raw',
33
- 'title' => esc_html__('PWA Support', 'accelerated-mobile-pages'),
34
- 'content' => (!is_plugin_active('pwa-for-wp/pwa-for-wp.php')?
35
- '<div class="install-now ampforwp-activation-call-module-upgrade button " id="ampforwp-pwa-activation-call" data-secure="'.wp_create_nonce('verify_module').'">Activate this Module</div>'
36
- : '<div class="col-wrapper">
37
- <a href="'.admin_url('admin.php?page=pwaforwp&reference=ampforwp').'"> <div class="ampforwp-recommendation-btn updated-message"><p>Go to PWA Settings</p></div> </a>
38
- </div>
39
- ').'<a class="amp_recommend_learnmore" href="https://ampforwp.com/tutorials/article/what-is-pwa-for-wp-and-why-its-included-in-the-amp/" target="_blank">Learn more</a>'
40
  ),
41
-
42
- )
43
-
44
- )
45
-
46
- );
47
- // Performance SECTION
48
- Redux::setSection( $opt_name, array(
49
- 'title' => __( 'Performance', 'accelerated-mobile-pages' ),
50
- 'id' => 'amp-performance',
51
- 'desc' => $cache_desc,
52
- 'subsection' => true,
53
- 'fields' => array(
54
  array(
55
  'id' => 'ampforwp-performance',
56
  'type' => 'section',
11
  $cache_AD_URL = "http://ampforwp.com/amp-cache/#utm_source=options-panel&utm_medium=performance-tab&utm_campaign=AMP%20Plugin";
12
  $cache_desc = '<a href="'.$cache_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/amp_cache_b.png" width="560" height="85" /></a>';
13
  }
14
+ // Performance SECTION
15
  Redux::setSection( $opt_name, array(
16
+ 'title' => esc_html__( 'Performance', 'accelerated-mobile-pages' ),
17
+ 'id' => 'amp-performance',
18
+ 'desc' => $cache_desc,
19
  'subsection' => true,
20
  'fields' => array(
21
  array(
28
  ),
29
 
30
  array(
31
+ 'id' => 'ampforwp_pwa_module',
32
+ 'type' => 'raw',
33
+ 'title' => esc_html__('PWA Support', 'accelerated-mobile-pages'),
34
+ 'content' => (!is_plugin_active('pwa-for-wp/pwa-for-wp.php')?
35
+ '<div class="install-now ampforwp-activation-call-module-upgrade button " id="ampforwp-pwa-activation-call" data-secure="'.wp_create_nonce('verify_module').'">Activate this Module</div>'
36
+ : '<div class="col-wrapper">
37
+ <a href="'.admin_url('admin.php?page=pwaforwp&reference=ampforwp').'"> <div class="ampforwp-recommendation-btn updated-message"><p>Go to PWA Settings</p></div> </a>
38
+ </div>
39
+ ').'<a class="amp_recommend_learnmore" href="https://ampforwp.com/tutorials/article/what-is-pwa-for-wp-and-why-its-included-in-the-amp/" target="_blank">Learn more</a>'
40
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  array(
42
  'id' => 'ampforwp-performance',
43
  'type' => 'section',
includes/features/push-notification/push-notification-options.php CHANGED
@@ -210,6 +210,14 @@ function ampforwp_push_notification_options($opt_name){
210
  ),
211
  $izt_opt3,
212
  $izt_opt1,$izt_opt2,
 
 
 
 
 
 
 
 
213
  array(
214
  'id' => 'translation',
215
  'type' => 'section',
210
  ),
211
  $izt_opt3,
212
  $izt_opt1,$izt_opt2,
213
+ array(
214
+ 'id' => 'ampforwp-web-push-onesignal-popup',
215
+ 'type' => 'switch',
216
+ 'title' => 'Popup on Desktop',
217
+ 'default' => 0,
218
+ 'tooltip-subtitle' => 'Show Subscribe Button in Popup on Desktop',
219
+ 'required' => array('ampforwp-web-push-onesignal', '=' , '1'),
220
+ ),
221
  array(
222
  'id' => 'translation',
223
  'type' => 'section',
includes/features/structure-data/structured-data-functions.php CHANGED
@@ -412,7 +412,90 @@ if ( ! function_exists('ampforwp_sd_multiple_images') ) {
412
  // schema.org/SiteNavigationElement missing from menus #1229 & #2952
413
  add_action('amp_post_template_footer','ampforwp_sd_sitenavigation');
414
  function ampforwp_sd_sitenavigation(){
415
- if ( ! class_exists('saswp_fields_generator') ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
  $input = array();
417
  $navObj = array();
418
  $ampforwp_sd_menu = get_transient('ampforwp_sd_menu');
412
  // schema.org/SiteNavigationElement missing from menus #1229 & #2952
413
  add_action('amp_post_template_footer','ampforwp_sd_sitenavigation');
414
  function ampforwp_sd_sitenavigation(){
415
+ if (!ampforwp_get_setting('ampforwp-sd-switch')) {
416
+ return;
417
+ }
418
+ if (class_exists('Bunyad_Theme_SmartMag')) {
419
+ if (!is_single() || !Bunyad::posts()->meta('reviews')) {
420
+ return;
421
+ }
422
+ $schema_type = Bunyad::posts()->meta('review_schema') ? Bunyad::posts()->meta('review_schema') : 'Product';
423
+ $item_author = Bunyad::posts()->meta('review_item_author') ? Bunyad::posts()->meta('review_item_author') : get_the_author();
424
+ $item_name = Bunyad::posts()->meta('review_item_name') ? Bunyad::posts()->meta('review_item_name') : get_the_title();
425
+ $item_author_type = Bunyad::posts()->meta('review_item_author_type');
426
+ $image_url = ampforwp_get_post_thumbnail('url','full');
427
+ $image_width = ampforwp_get_post_thumbnail('width');
428
+ $image_height = ampforwp_get_post_thumbnail('height');
429
+ $post_image_meta = false;
430
+ if (!empty($image_url)) {
431
+ $post_image_meta = array(
432
+ '@type' => 'ImageObject',
433
+ 'url' => $image_url,
434
+ 'width' => $image_width,
435
+ 'height' => $image_height,
436
+ );
437
+ }
438
+ $publisher = array(
439
+ '@type' => 'Organization',
440
+ 'name' => get_bloginfo('name'),
441
+ 'sameAs' => get_bloginfo('url')
442
+ );
443
+ $description = (
444
+ Bunyad::posts()->meta('review_verdict_text')
445
+ ? Bunyad::posts()->meta('review_verdict_text')
446
+ : strip_tags(Bunyad::posts()->excerpt(null, 180, ['add_more' => false]))
447
+ );
448
+ $author_data = [
449
+ '@type' => $item_author_type ? ucfirst($item_author_type) : 'Person',
450
+ 'name' => $item_author
451
+ ];
452
+ $have_author = [
453
+ 'CreativeWorkSeason', 'CreativeWorkSeries', 'Game', 'MediaObject', 'MusicPlaylist', 'MusicRecording'
454
+ ];
455
+ // Final schema.
456
+ $schema = array(
457
+ '@context' => 'http://schema.org',
458
+ '@type' => 'Review',
459
+
460
+ 'itemReviewed' => array(
461
+ '@type' => $schema_type,
462
+ 'name' => $item_name,
463
+ 'image' => $post_image_meta,
464
+ ),
465
+ 'author' => array(
466
+ '@type' => 'Person',
467
+ 'name' => get_the_author(),
468
+ ),
469
+ 'publisher' => $publisher,
470
+ 'reviewRating' => array(
471
+ '@type' => 'Rating',
472
+ 'ratingValue' => Bunyad::posts()->meta('review_overall'),
473
+ 'bestRating' => Bunyad::options()->review_scale,
474
+ ),
475
+ 'description' => substr($description, 0, 200),
476
+ 'datePublished' => get_the_date(DATE_W3C),
477
+ );
478
+ if ($link = Bunyad::posts()->meta('review_item_link')) {
479
+ $schema['itemReviewed']['sameAs'] = esc_url($link);
480
+ }
481
+ $schema_id = esc_url(get_permalink()) . '#review';
482
+ $schema['@id'] = $schema_id;
483
+ $schema['itemReviewed']['review'] = ['@id' => $schema_id];
484
+ if (in_array($schema_type, $have_author)) {
485
+ $schema['itemReviewed']['author'] = $author_data;
486
+ }
487
+ if ($schema_type == 'Product' ) {
488
+ if (Bunyad::posts()->meta('review_item_author')) {
489
+ $author_data['@type'] = 'Brand';
490
+ $schema['itemReviewed']['brand'] = $author_data;
491
+ }
492
+ $schema['itemReviewed']['description'] = $description;
493
+ }else{
494
+ return;
495
+ }
496
+ echo '<script type="application/ld+json">' . json_encode($schema) . "</script>";
497
+ }
498
+ if ( ! class_exists('saswp_fields_generator') && ampforwp_get_setting('ampforwp-sd-navigation-schema')) {
499
  $input = array();
500
  $navObj = array();
501
  $ampforwp_sd_menu = get_transient('ampforwp_sd_menu');
includes/features/structure-data/structured-data-options.php CHANGED
@@ -44,7 +44,15 @@ function ampforwp_add_sd_fields($fields){
44
  return $fields;
45
  }
46
  else {
47
-
 
 
 
 
 
 
 
 
48
  $fields[] = array(
49
  'id' => 'ampforwp-sd_modules_section',
50
  'type' => 'section',
@@ -68,14 +76,7 @@ function ampforwp_add_sd_fields($fields){
68
  </ul> </div>' : '')
69
  .'
70
  <div class="col-1">
71
- '.(!is_plugin_active('schema-and-structured-data-for-wp/structured-data-for-wp.php')?
72
- '
73
- <div class="install-now ampforwp-activation-call-module-upgrade button " id="ampforwp-structure-data-activation-call" data-secure="'.wp_create_nonce('verify_module').'">
74
- <p>Upgrade for Free</p>
75
- </div>' :
76
- '<a href="'.admin_url('admin.php?page=structured_data_options&tab=general&reference=ampforwp').'"><div class="ampforwp-recommendation-btn updated-message"><p>Go to Structure Data settings</p></div></a>'
77
- )
78
- .'
79
  &nbsp;<a href="https://ampforwp.com/tutorials/article/what-is-the-structured-data-update-all-about/" class="amp_recommend_learnmore" target="_blank">Learn more</a>
80
  </div>
81
  </div>'
@@ -90,21 +91,38 @@ function ampforwp_add_sd_fields($fields){
90
  'layout_type' => 'accordion',
91
  'accordion-open'=> 1,
92
  );
 
 
 
 
 
 
93
  $fields[] = array(
94
  'id' => 'ampforwp-sd-type-posts',
95
  'type' => 'select',
 
96
  'title' => esc_html__('Posts', 'accelerated-mobile-pages'),
97
  'tooltip-subtitle' => esc_html__('Select the Structured Data Type for Posts', 'accelerated-mobile-pages'),
98
  'options' => ampforwp_get_sd_types(),
99
  'default' => 'BlogPosting',
 
100
  );
101
  $fields[] = array(
102
  'id' => 'ampforwp-sd-type-pages',
103
  'type' => 'select',
 
104
  'title' => esc_html__('Pages', 'accelerated-mobile-pages'),
105
  'tooltip-subtitle' => esc_html__('Select the Structured Data Type for Pages', 'accelerated-mobile-pages'),
106
  'options' => ampforwp_get_sd_types(),
107
  'default' => 'BlogPosting',
 
 
 
 
 
 
 
 
108
  );
109
  $fields[] = array(
110
  'id' => 'ampforwp-sd_2',
@@ -113,6 +131,7 @@ function ampforwp_add_sd_fields($fields){
113
  'indent' => true,
114
  'layout_type' => 'accordion',
115
  'accordion-open'=> 1,
 
116
  );
117
 
118
  $fields[] = array(
@@ -122,12 +141,14 @@ function ampforwp_add_sd_fields($fields){
122
  'title' => esc_html__('Default Structured Data Logo', 'accelerated-mobile-pages'),
123
  'tooltip-subtitle' => esc_html__('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
124
  'default' => array('url' => ampforwp_default_logo_settings() ),
 
125
  );
126
  $fields[] = array(
127
  'id' => 'ampforwp-sd-logo-dimensions',
128
  'title' => esc_html__('Custom Logo Size', 'accelerated-mobile-pages'),
129
  'type' => 'switch',
130
  'default' => 0,
 
131
  );
132
  $fields[] = array(
133
  'class'=>'child_opt child_opt_arrow',
@@ -155,6 +176,7 @@ function ampforwp_add_sd_fields($fields){
155
  'tooltip-subtitle' => esc_html__('Upload the Image you want to show as Placeholder Image.', 'accelerated-mobile-pages'),
156
  'placeholder' => esc_html__('when there is no featured image set in the post','accelerated-mobile-pages'),
157
  'default' => array('url' => AMPFORWP_IMAGE_DIR . '/SD-default-image.png' ),
 
158
  );
159
  $fields[] = array(
160
  'id' => 'amp-structured-data-placeholder-image-width',
@@ -162,7 +184,8 @@ function ampforwp_add_sd_fields($fields){
162
  'type' => 'text',
163
  'placeholder' => '550',
164
  'tooltip-subtitle' => esc_html__('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
165
- 'default' => '1280'
 
166
  );
167
  $fields[] = array(
168
  'id' => 'amp-structured-data-placeholder-image-height',
@@ -170,7 +193,8 @@ function ampforwp_add_sd_fields($fields){
170
  'type' => 'text',
171
  'placeholder' => '350',
172
  'tooltip-subtitle' => esc_html__('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
173
- 'default' => '720'
 
174
  );
175
  $fields[] = array(
176
  'id' => 'amporwp-structured-data-video-thumb-url',
@@ -180,12 +204,14 @@ function ampforwp_add_sd_fields($fields){
180
  'tooltip-subtitle' => esc_html__('Upload the Thumbnail you want to show as Video Thumbnail.', 'accelerated-mobile-pages'),
181
  'placeholder' => esc_html__('When there is no thumbnail set for the video','accelerated-mobile-pages'),
182
  'default' => array('url' => AMPFORWP_IMAGE_DIR . '/SD-default-image.png' ),
 
183
  );
184
  $fields[] = array(
185
  'id' => 'ampforwp-sd-multiple-images',
186
  'title' => esc_html__('High-resolution Images', 'accelerated-mobile-pages'),
187
  'type' => 'switch',
188
  'default' => 0,
 
189
  'tooltip-subtitle' => esc_html__('For best results, provide multiple high-resolution images (minimum of 800,000 pixels when multiplying width and height) with the following aspect ratios: 16x9, 4x3, and 1x1 ', 'accelerated-mobile-pages'). '<a href="https://developers.google.com/search/docs/data-types/article#article_types" target="_blank">'.esc_html__('Read more','accelerated-mobile-pages').'</a>'
190
  );
191
  }// is_plugin_active('schema-and-structured-data-for-wp/structured-data-for-wp.php') Closed
@@ -210,10 +236,12 @@ if( ! function_exists('saswp_non_amp') ) {
210
  $custom_fields[] = array(
211
  'id' => 'ampforwp-sd-type-'.esc_attr($p_type),
212
  'type' => 'select',
213
- 'title' => __($post_type, 'accelerated-mobile-pages'),
 
214
  'tooltip-subtitle' => 'Select the Structured Data Type for '.esc_attr($p_type),
215
  'options' => ampforwp_get_sd_types(),
216
  'default' => 'BlogPosting',
 
217
  );
218
  $extra_fields = array_merge($extra_fields, $custom_fields);
219
  }
44
  return $fields;
45
  }
46
  else {
47
+ $schema_install = '';
48
+ if(function_exists('saswp_add_plugin_meta_links')){
49
+ $schema_install = '<a href="'.admin_url('admin.php?page=structured_data_options&tab=general&reference=ampforwp').'"><div class="ampforwp-recommendation-btn updated-message"><p>'.esc_html__('Go to Structure Data settings','accelerated-mobile-pages').'</p></div></a>';
50
+ }else{
51
+ $schema_install = '<div class="install-now ampforwp-activation-call-module-upgrade button " id="ampforwp-structure-data-activation-call" data-secure="'.wp_create_nonce('verify_module').'"><p>'.esc_html__('Upgrade for Free','accelerated-mobile-pages').'</p></div>';
52
+ }
53
+ if(file_exists(AMPFORWP_MAIN_PLUGIN_DIR."schema-and-structured-data-for-wp/structured-data-for-wp.php") && !function_exists('saswp_add_plugin_meta_links')){
54
+ $schema_install = '<div class="install-now button"><a style="text-decoration: none;" target="_blank" href="'.admin_url('plugins.php').'">'.esc_html__('Activate Plugin','accelerated-mobile-pages').'</a></div>';
55
+ }
56
  $fields[] = array(
57
  'id' => 'ampforwp-sd_modules_section',
58
  'type' => 'section',
76
  </ul> </div>' : '')
77
  .'
78
  <div class="col-1">
79
+ '. $schema_install /* $schema_install XSS escaped */.'
 
 
 
 
 
 
 
80
  &nbsp;<a href="https://ampforwp.com/tutorials/article/what-is-the-structured-data-update-all-about/" class="amp_recommend_learnmore" target="_blank">Learn more</a>
81
  </div>
82
  </div>'
91
  'layout_type' => 'accordion',
92
  'accordion-open'=> 1,
93
  );
94
+ $fields[] = array(
95
+ 'id' => 'ampforwp-sd-switch',
96
+ 'type' => 'switch',
97
+ 'title' => esc_html__('Schema & Structured Data', 'accelerated-mobile-pages'),
98
+ 'default' => 1,
99
+ );
100
  $fields[] = array(
101
  'id' => 'ampforwp-sd-type-posts',
102
  'type' => 'select',
103
+ 'class' => 'child_opt child_opt_arrow',
104
  'title' => esc_html__('Posts', 'accelerated-mobile-pages'),
105
  'tooltip-subtitle' => esc_html__('Select the Structured Data Type for Posts', 'accelerated-mobile-pages'),
106
  'options' => ampforwp_get_sd_types(),
107
  'default' => 'BlogPosting',
108
+ 'required'=>array('ampforwp-sd-switch','=','1'),
109
  );
110
  $fields[] = array(
111
  'id' => 'ampforwp-sd-type-pages',
112
  'type' => 'select',
113
+ 'class' => 'child_opt child_opt_arrow',
114
  'title' => esc_html__('Pages', 'accelerated-mobile-pages'),
115
  'tooltip-subtitle' => esc_html__('Select the Structured Data Type for Pages', 'accelerated-mobile-pages'),
116
  'options' => ampforwp_get_sd_types(),
117
  'default' => 'BlogPosting',
118
+ 'required'=>array('ampforwp-sd-switch','=','1'),
119
+ );
120
+ $fields[] = array(
121
+ 'id' => 'ampforwp-sd-navigation-schema',
122
+ 'type' => 'switch',
123
+ 'title' => esc_html__('Site Navigation Schema', 'accelerated-mobile-pages'),
124
+ 'tooltip-subtitle' => esc_html__('Enable or disable site navigation schema', 'accelerated-mobile-pages'),
125
+ 'default' => 1,
126
  );
127
  $fields[] = array(
128
  'id' => 'ampforwp-sd_2',
131
  'indent' => true,
132
  'layout_type' => 'accordion',
133
  'accordion-open'=> 1,
134
+ 'required'=>array('ampforwp-sd-switch','=','1'),
135
  );
136
 
137
  $fields[] = array(
141
  'title' => esc_html__('Default Structured Data Logo', 'accelerated-mobile-pages'),
142
  'tooltip-subtitle' => esc_html__('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
143
  'default' => array('url' => ampforwp_default_logo_settings() ),
144
+ 'required'=>array('ampforwp-sd-switch','=','1'),
145
  );
146
  $fields[] = array(
147
  'id' => 'ampforwp-sd-logo-dimensions',
148
  'title' => esc_html__('Custom Logo Size', 'accelerated-mobile-pages'),
149
  'type' => 'switch',
150
  'default' => 0,
151
+ 'required'=>array('ampforwp-sd-switch','=','1'),
152
  );
153
  $fields[] = array(
154
  'class'=>'child_opt child_opt_arrow',
176
  'tooltip-subtitle' => esc_html__('Upload the Image you want to show as Placeholder Image.', 'accelerated-mobile-pages'),
177
  'placeholder' => esc_html__('when there is no featured image set in the post','accelerated-mobile-pages'),
178
  'default' => array('url' => AMPFORWP_IMAGE_DIR . '/SD-default-image.png' ),
179
+ 'required'=>array('ampforwp-sd-switch','=','1'),
180
  );
181
  $fields[] = array(
182
  'id' => 'amp-structured-data-placeholder-image-width',
184
  'type' => 'text',
185
  'placeholder' => '550',
186
  'tooltip-subtitle' => esc_html__('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
187
+ 'default' => '1280',
188
+ 'required'=>array('ampforwp-sd-switch','=','1'),
189
  );
190
  $fields[] = array(
191
  'id' => 'amp-structured-data-placeholder-image-height',
193
  'type' => 'text',
194
  'placeholder' => '350',
195
  'tooltip-subtitle' => esc_html__('Please don\'t add "PX" in the image size.','accelerated-mobile-pages'),
196
+ 'default' => '720',
197
+ 'required'=>array('ampforwp-sd-switch','=','1'),
198
  );
199
  $fields[] = array(
200
  'id' => 'amporwp-structured-data-video-thumb-url',
204
  'tooltip-subtitle' => esc_html__('Upload the Thumbnail you want to show as Video Thumbnail.', 'accelerated-mobile-pages'),
205
  'placeholder' => esc_html__('When there is no thumbnail set for the video','accelerated-mobile-pages'),
206
  'default' => array('url' => AMPFORWP_IMAGE_DIR . '/SD-default-image.png' ),
207
+ 'required'=>array('ampforwp-sd-switch','=','1'),
208
  );
209
  $fields[] = array(
210
  'id' => 'ampforwp-sd-multiple-images',
211
  'title' => esc_html__('High-resolution Images', 'accelerated-mobile-pages'),
212
  'type' => 'switch',
213
  'default' => 0,
214
+ 'required'=>array('ampforwp-sd-switch','=','1'),
215
  'tooltip-subtitle' => esc_html__('For best results, provide multiple high-resolution images (minimum of 800,000 pixels when multiplying width and height) with the following aspect ratios: 16x9, 4x3, and 1x1 ', 'accelerated-mobile-pages'). '<a href="https://developers.google.com/search/docs/data-types/article#article_types" target="_blank">'.esc_html__('Read more','accelerated-mobile-pages').'</a>'
216
  );
217
  }// is_plugin_active('schema-and-structured-data-for-wp/structured-data-for-wp.php') Closed
236
  $custom_fields[] = array(
237
  'id' => 'ampforwp-sd-type-'.esc_attr($p_type),
238
  'type' => 'select',
239
+ 'class' => 'child_opt child_opt_arrow',
240
+ 'title' => esc_html__($post_type, 'accelerated-mobile-pages'),
241
  'tooltip-subtitle' => 'Select the Structured Data Type for '.esc_attr($p_type),
242
  'options' => ampforwp_get_sd_types(),
243
  'default' => 'BlogPosting',
244
+ 'required'=>array('ampforwp-sd-switch','=','1'),
245
  );
246
  $extra_fields = array_merge($extra_fields, $custom_fields);
247
  }
includes/options/admin-config.php CHANGED
@@ -687,6 +687,30 @@ $extension_listing_array = array(
687
  'store_url'=>'https://accounts.ampforwp.com',
688
  'is_activated'=>(is_plugin_active('ultimate-membership-pro-compatibility-for-amp/ultimate-membership-pro-compatibility-for-amp.php')? 1 : 2),
689
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
690
  array(
691
  'name'=>'Paid Memberships PRO for AMP',
692
  'class'=>'new-ext',
@@ -1130,8 +1154,8 @@ $freepro_listing = '
1130
  </div><!-- /.pri-lst -->
1131
  <div class="tru-us">
1132
  <img src="'.AMPFORWP_IMAGE_DIR . '/rating.png" />
1133
- <h2>Trusted by more that 180000+ Users!</h2>
1134
- <p>More than 180k Websites, Blogs & E-Commerce website are powered by our AMP making it the #1 Rated AMP plugin in WordPress Community.</p>
1135
  <a href="https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/?filter=5" target="_blank">Read The Reviews</a>
1136
  </div>
1137
  </div><!--/ .amp-upg -->
@@ -2314,19 +2338,6 @@ function ampforwp_get_all_tags($id){
2314
  'required' => array('amp-inspection-tool', '=' , '0'),
2315
  'switch-text' => true,
2316
  ),
2317
- array(
2318
- 'id' => 'ampforwp-the-seo-checklist',
2319
- 'type' => 'section',
2320
- 'title' => esc_html__('The SEO Checklist - Get your website on the first page of Google', 'accelerated-mobile-pages'),
2321
- 'indent' => true,
2322
- 'layout_type' => 'accordion',
2323
- 'accordion-open'=> 1,
2324
- ),
2325
- array(
2326
- 'id' => 'ampforwp-the-seo-checklist-title',
2327
- 'type' => 'select',
2328
- 'desc' => '<div style="text-align:center;"><a href="https://seobuddy.com/seo-checklist/magazine3" target="_blank"><img src="'.AMPFORWP_IMAGE_DIR . '/the-seo-checklist-by-seo-buddy.png" width="100" height="60" /></a><br/><br/><b>RECOMMENDED:</b> We would like to recommend <a href="https://seobuddy.com/seo-checklist/magazine3" target="_blank">102-Point SEO Checklist</a>. It includes 40+ step-by-step guides (SOPs) to every important SEO action you need to take to optimize your website and get more organic traffic. And using discount coupon MAGAZINE3 you get a 25% off the original price.<br/><br/><a class="premium_features_btn" target="_blank" href="https://seobuddy.com/seo-checklist/magazine3" style="color: #000;padding: 10px 15px;cursor: pointer;text-decoration: none;" >Read more about this SEO Checklist</a></div>',
2329
- ),
2330
  )
2331
  )
2332
  );
@@ -2487,6 +2498,31 @@ function ampforwp_get_all_tags($id){
2487
  'tooltip-subtitle' => esc_html__('Enable/Disable Facebook comments using this switch.', 'accelerated-mobile-pages'),
2488
  'default' => 0,
2489
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2490
  array(
2491
  'class' => 'child_opt child_opt_arrow',
2492
  'id' => 'ampforwp-facebook-comments-title',
@@ -2817,7 +2853,48 @@ Redux::setSection( $opt_name, array(
2817
  ),
2818
  )
2819
  );
2820
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2821
  // Hide AMP Bulk Tools
2822
  Redux::setSection( $opt_name, array(
2823
  'title' => esc_html__( 'Tools', 'accelerated-mobile-pages' ),
@@ -2883,6 +2960,18 @@ Redux::setSection( $opt_name, array(
2883
  'default' => 1,
2884
  'tooltip-subtitle' => esc_html__('Enable/Disable Query Monitor for amp when logged in as admin and Query Monitor Plugin installed', 'accelerated-mobile-pages'),
2885
  ),
 
 
 
 
 
 
 
 
 
 
 
 
2886
  )
2887
  )
2888
  );
@@ -2911,12 +3000,21 @@ Redux::setSection( $opt_name, array(
2911
  'default' => 0,
2912
 
2913
  ),
 
 
 
 
 
 
 
 
 
2914
  array(
2915
  'id' => 'amp-tablet-redirection',
2916
  'class' => 'child_opt child_opt_arrow',
2917
  'type' => 'switch',
2918
- 'title' => __('Tablets', 'accelerated-mobile-pages'),
2919
- 'tooltip-subtitle' => __('Enable/Disable Mobile redirection for Tablets.','accelerated-mobile-pages'),
2920
  'default' => 1,
2921
  'required' => array( 'amp-mobile-redirection', '=' , 1 )
2922
  ),
@@ -2927,6 +3025,14 @@ Redux::setSection( $opt_name, array(
2927
  'tooltip-subtitle' => esc_html__('Disable this option if you want your search pages in Non-AMP.','accelerated-mobile-pages'),
2928
  'default' => 1,
2929
  ),
 
 
 
 
 
 
 
 
2930
  array(
2931
  'id' => 'convert-internal-nonamplinks-to-amp',
2932
  'type' => 'switch',
@@ -3342,6 +3448,14 @@ $e_commerce_support[] = array(
3342
  'placeholder'=>esc_html__('write here','accelerated-mobile-pages'),
3343
  'required' => array( 'amp-use-pot', '=' , 0 )
3344
  ),
 
 
 
 
 
 
 
 
3345
  array(
3346
  'id' => 'amp-translator-recent-text',
3347
  'type' => 'text',
@@ -4183,6 +4297,28 @@ Redux::setSection( $opt_name, array(
4183
  'default' => true,
4184
  'required' => array( 'ampforwp-infinite-scroll', '=' , 1 )
4185
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4186
  array(
4187
  'id' => 'google-icons',
4188
  'type' => 'section',
@@ -4324,6 +4460,22 @@ Redux::setSection( $opt_name, array(
4324
  ),
4325
  'default' => '1'
4326
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4327
  array(
4328
  'id' => 'amp-swift-menu-cprt',
4329
  'type' => 'switch',
@@ -4452,6 +4604,15 @@ Redux::setSection( $opt_name, array(
4452
  array('signin-button','=',1)
4453
  )
4454
  ),
 
 
 
 
 
 
 
 
 
4455
  array(
4456
  'id' => 'signin-button-border-line',
4457
  'class' => 'child_opt child_opt_arrow',
@@ -5699,14 +5860,6 @@ if(class_exists('WPSEO_Options')){
5699
  );
5700
  }
5701
  if(!is_plugin_active( 'amp-newspaper-theme/ampforwp-custom-theme.php' ) ){
5702
- function ampforwp_get_post_percent(){
5703
- return 0;
5704
- }
5705
- $post_percent = 0;
5706
- $current_page = ampforwp_get_admin_current_page();
5707
- if($current_page=="amp_options"){
5708
- $post_percent = ampforwp_get_post_percent();
5709
- }
5710
  $single_page_options = array(
5711
  array(
5712
  'id' => 'ampforwp-single_section_1',
@@ -5802,6 +5955,17 @@ $single_page_options = array(
5802
  array('amp-design-selector' , '=' , '4'),
5803
  )
5804
  ),
 
 
 
 
 
 
 
 
 
 
 
5805
  array(
5806
  'id' => 'swift-date',
5807
  'type' => 'switch',
@@ -5812,6 +5976,17 @@ $single_page_options = array(
5812
 
5813
  'required' => array( array('amp-design-selector', '=' , '4') ),
5814
  ),
 
 
 
 
 
 
 
 
 
 
 
5815
  //Breadcrumb ON/OFF
5816
  array(
5817
  'id' => 'ampforwp-bread-crumb',
@@ -6079,6 +6254,25 @@ $single_page_options = array(
6079
  'default' => '6',
6080
  'required' => array('ampforwp-swift-recent-posts' , '=' , '1'),
6081
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6082
  array(
6083
  'id' => 'ampforwp-single_section_3',
6084
  'type' => 'section',
@@ -6285,6 +6479,25 @@ $single_page_options = array(
6285
  'required' => array(
6286
  array('ampforwp-related-posts-days-switch', '=' , '1'),
6287
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6288
  ),
6289
  // DESIGN 3 RECENT POST BELOW RELATED
6290
  array(
@@ -6431,19 +6644,6 @@ $single_page_options = array(
6431
  'default' => '7',
6432
  'required' => array('ampforwp-in-content-related-posts-days-switch', '=' , '1'),
6433
  ),
6434
- array(
6435
- 'id' => 'ampforwp-refersh-related-post',
6436
- 'type' => 'raw',
6437
- 'class' => 'hide',
6438
- 'title' => esc_html__('Refresh Related Post', 'accelerated-mobile-pages'),
6439
- 'content' => "<span class='button button-primary button-small' id='ampforwp-refersh-related-post' target='_blank' data-id='".intval($post_percent)."' data-nonce='".wp_create_nonce( 'ampforwp_refresh_related_poost')."'><i class='el el-refresh'></i> Refresh</span>
6440
- <div class='ref-rel-bar-cont'>
6441
- <div id='ref_rel_post_bar' class='ref-rel-post-bar' style='width:".intval($post_percent)."%;'>".intval($post_percent)."%</div>
6442
- </div>",
6443
- 'tooltip-subtitle' => esc_html__('If related post is not showing up properly, please refresh it and check it once again.', 'accelerated-mobile-pages'),
6444
- 'full_width' => false,
6445
- 'description' => "It will refresh only 50 records at once, please try refreshing until it will complete to 100%",
6446
- ),
6447
  $jetpack_rp,
6448
  array(
6449
  'id' => 'single-tab-2',
@@ -7283,7 +7483,14 @@ else{
7283
  'layout_type' => 'accordion',
7284
  'accordion-open'=> 1,
7285
  ),
7286
-
 
 
 
 
 
 
 
7287
  // Meta ON/OFF Pages
7288
  array(
7289
  'id' => 'featured_image_swift_page',
687
  'store_url'=>'https://accounts.ampforwp.com',
688
  'is_activated'=>(is_plugin_active('ultimate-membership-pro-compatibility-for-amp/ultimate-membership-pro-compatibility-for-amp.php')? 1 : 2),
689
  ),
690
+ array(
691
+ 'name'=>'Forminator for AMP',
692
+ 'class'=>'new-ext',
693
+ 'desc'=>'Add Forminator forms Support in AMP',
694
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/forminator-for-amp.png',
695
+ 'price'=>'$39',
696
+ 'url_link'=>'https://ampforwp.com/addons/forminator-for-amp/',
697
+ 'plugin_active_path'=> 'forminator-for-amp/forminator-for-amp.php',
698
+ 'item_name'=>'Forminator for AMP',
699
+ 'store_url'=>'https://accounts.ampforwp.com',
700
+ 'is_activated'=>(is_plugin_active('forminator-for-amp/forminator-for-amp.php')? 1 : 2),
701
+ ),
702
+ array(
703
+ 'name'=>'Happyforms for AMP',
704
+ 'class'=>'new-ext',
705
+ 'desc'=>'Add Happy forms Support in AMP',
706
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/happyforms-for-amp.png',
707
+ 'price'=>'$39',
708
+ 'url_link'=>'https://ampforwp.com/addons/happyforms-for-amp/',
709
+ 'plugin_active_path'=> 'happyforms-for-amp/happyforms-for-amp.php',
710
+ 'item_name'=>'Happyforms for AMP',
711
+ 'store_url'=>'https://accounts.ampforwp.com',
712
+ 'is_activated'=>(is_plugin_active('happyforms-for-amp/happyforms-for-amp.php')? 1 : 2),
713
+ ),
714
  array(
715
  'name'=>'Paid Memberships PRO for AMP',
716
  'class'=>'new-ext',
1154
  </div><!-- /.pri-lst -->
1155
  <div class="tru-us">
1156
  <img src="'.AMPFORWP_IMAGE_DIR . '/rating.png" />
1157
+ <h2>Trusted by more that 200000+ Users!</h2>
1158
+ <p>More than 200k Websites, Blogs & E-Commerce website are powered by our AMP making it the #1 Rated AMP plugin in WordPress Community.</p>
1159
  <a href="https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/?filter=5" target="_blank">Read The Reviews</a>
1160
  </div>
1161
  </div><!--/ .amp-upg -->
2338
  'required' => array('amp-inspection-tool', '=' , '0'),
2339
  'switch-text' => true,
2340
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
2341
  )
2342
  )
2343
  );
2498
  'tooltip-subtitle' => esc_html__('Enable/Disable Facebook comments using this switch.', 'accelerated-mobile-pages'),
2499
  'default' => 0,
2500
  ),
2501
+ array(
2502
+ 'class' => 'child_opt child_opt_arrow',
2503
+ 'id' => 'ampforwp-fb-moderation-app-id',
2504
+ 'type' => 'text',
2505
+ 'tooltip-subtitle' =>
2506
+ sprintf('%s <a href="https://developers.facebook.com/docs/plugins/comments/#moderation-setup-instructions" target="_blank">%s</a>.',esc_html__( 'If your site has many comments boxes, we recommend you specify a Facebook app ID as the managing entity, which means that all app administrators can moderate comments. Doing this enables a moderator interface on Facebook where comments from all plugins administered by your app ID can be easily moderated together. For details, see the','accelerated-mobile-pages' ),esc_html__('Facebook Moderation Setup documentation','accelerated-mobile-pages') ),
2507
+ 'title' => esc_html__('Facebook APP ID', 'accelerated-mobile-pages'),
2508
+ 'default' => '',
2509
+ 'required' => array(
2510
+ array('ampforwp-facebook-comments-support', '=' , 1),
2511
+ ),
2512
+ ),
2513
+ array(
2514
+ 'class' => 'child_opt child_opt_arrow',
2515
+ 'id' => 'ampforwp-fb-moderation-admin-id',
2516
+ 'type' => 'text',
2517
+ 'tooltip-subtitle' =>
2518
+ sprintf('%s <a href="https://developers.facebook.com/docs/plugins/comments/#moderation-setup-instructions" target="_blank">%s</a>.',esc_html__( 'To assign a Facebook account to be the admin of a comments plugin implementation, see the','accelerated-mobile-pages' ),esc_html__('Facebook Moderation Setup documentation','accelerated-mobile-pages') ),
2519
+ 'title' => esc_html__('Facebook Admin User ID', 'accelerated-mobile-pages'),
2520
+ 'default' => '',
2521
+ 'desc' => 'You can add multiple ID(S) separated by comma(,) sign',
2522
+ 'required' => array(
2523
+ array('ampforwp-facebook-comments-support', '=' , 1),
2524
+ ),
2525
+ ),
2526
  array(
2527
  'class' => 'child_opt child_opt_arrow',
2528
  'id' => 'ampforwp-facebook-comments-title',
2853
  ),
2854
  )
2855
  );
2856
+ function ampforwp_get_post_percent(){
2857
+ $total_post = $post_count = $post_percent = '';
2858
+ $args=array(
2859
+ 'fields' => 'ids',
2860
+ 'post_type' => 'post',
2861
+ 'posts_per_page'=> 1,
2862
+ 'ignore_sticky_posts'=>1,
2863
+ 'has_password' => false ,
2864
+ 'post_status'=> 'publish',
2865
+ 'no_found_rows' => true,
2866
+ 'meta_query' => array(
2867
+ array(
2868
+ 'key' => 'ampforwp-amp-on-off',
2869
+ 'compare' => 'NOT EXISTS',
2870
+ )
2871
+ )
2872
+ );
2873
+ $my_query = new wp_query( $args );
2874
+ $post_count = $my_query->post_count;
2875
+ if ($post_count == 0) {
2876
+ return 100;
2877
+ }
2878
+ $count_posts = wp_count_posts();
2879
+ if($count_posts){
2880
+ $total_post = $count_posts->publish;
2881
+ }
2882
+ $post_count = $total_post-$post_count;
2883
+ $post_percent = ($post_count/$total_post)*100;
2884
+ $post_percent = $post_percent - 24;
2885
+ return round($post_percent);
2886
+ }
2887
+ $post_percent = 0;
2888
+ $current_page = ampforwp_get_admin_current_page();
2889
+ $refresh_btn = "";
2890
+ $refresh_text = esc_html__('All post metas are upto date.', 'accelerated-mobile-pages'); ;
2891
+ if($current_page=="amp_options"){
2892
+ $post_percent = ampforwp_get_post_percent();
2893
+ if ($post_percent != 100) {
2894
+ $refresh_btn = "<span class='button button-primary button-small' id='ampforwp-refersh-related-post' target='_blank' data-id='".intval($post_percent)."' data-nonce='".wp_create_nonce( 'ampforwp_refresh_related_poost')."'><i class='el el-refresh'></i> Refresh</span>";
2895
+ $refresh_text = esc_html__('It will refresh only 30 records at once, please try refreshing until it will complete to 100%', 'accelerated-mobile-pages');
2896
+ }
2897
+ }
2898
  // Hide AMP Bulk Tools
2899
  Redux::setSection( $opt_name, array(
2900
  'title' => esc_html__( 'Tools', 'accelerated-mobile-pages' ),
2960
  'default' => 1,
2961
  'tooltip-subtitle' => esc_html__('Enable/Disable Query Monitor for amp when logged in as admin and Query Monitor Plugin installed', 'accelerated-mobile-pages'),
2962
  ),
2963
+ array(
2964
+ 'id' => 'ampforwp-refersh-related-post',
2965
+ 'type' => 'raw',
2966
+ 'title' => esc_html__('Refresh Related Post', 'accelerated-mobile-pages'),
2967
+ 'content' => $refresh_btn /* XXS OK */."
2968
+ <div class='ref-rel-bar-cont'>
2969
+ <div id='ref_rel_post_bar' class='ref-rel-post-bar' style='width:".intval($post_percent)."%;'>".intval($post_percent)."%</div>
2970
+ </div>",
2971
+ 'tooltip-subtitle' => esc_html__('If related post is not showing up properly, please refresh it and check it once again.', 'accelerated-mobile-pages'),
2972
+ 'full_width' => false,
2973
+ 'description' => $refresh_text, /* XXS OK */
2974
+ ),
2975
  )
2976
  )
2977
  );
3000
  'default' => 0,
3001
 
3002
  ),
3003
+ array(
3004
+ 'id' => 'amp-mob-redirection-pres-link',
3005
+ 'class' => 'child_opt child_opt_arrow',
3006
+ 'type' => 'switch',
3007
+ 'title' => esc_html__('Preserve Original Permalinks', 'accelerated-mobile-pages'),
3008
+ 'tooltip-subtitle' => esc_html__('Enable/Disable Mobile redirection for preserve original permalinks.','accelerated-mobile-pages'),
3009
+ 'default' => 0,
3010
+ 'required' => array( 'amp-mobile-redirection', '=' , 1 )
3011
+ ),
3012
  array(
3013
  'id' => 'amp-tablet-redirection',
3014
  'class' => 'child_opt child_opt_arrow',
3015
  'type' => 'switch',
3016
+ 'title' => esc_html__('Tablets', 'accelerated-mobile-pages'),
3017
+ 'tooltip-subtitle' => esc_html__('Enable/Disable Mobile redirection for Tablets.','accelerated-mobile-pages'),
3018
  'default' => 1,
3019
  'required' => array( 'amp-mobile-redirection', '=' , 1 )
3020
  ),
3025
  'tooltip-subtitle' => esc_html__('Disable this option if you want your search pages in Non-AMP.','accelerated-mobile-pages'),
3026
  'default' => 1,
3027
  ),
3028
+ array(
3029
+ 'id' => 'amp-desktop-redirection',
3030
+ 'type' => 'switch',
3031
+ 'title' => esc_html__('Disable AMP on Desktop', 'accelerated-mobile-pages'),
3032
+ 'tooltip-subtitle' => esc_html__('
3033
+ Enable this option to give your visitors normal version on Desktop when accessing AMP','accelerated-mobile-pages'),
3034
+ 'default' => 0,
3035
+ ),
3036
  array(
3037
  'id' => 'convert-internal-nonamplinks-to-amp',
3038
  'type' => 'switch',
3448
  'placeholder'=>esc_html__('write here','accelerated-mobile-pages'),
3449
  'required' => array( 'amp-use-pot', '=' , 0 )
3450
  ),
3451
+ array(
3452
+ 'id' => 'amp-translator-incontent-related-text',
3453
+ 'type' => 'text',
3454
+ 'title' => esc_html__('In-Content Related Post', 'accelerated-mobile-pages'),
3455
+ 'default' => esc_html__('Related Post','accelerated-mobile-pages'),
3456
+ 'placeholder'=>esc_html__('write here','accelerated-mobile-pages'),
3457
+ 'required' => array( 'amp-use-pot', '=' , 0 )
3458
+ ),
3459
  array(
3460
  'id' => 'amp-translator-recent-text',
3461
  'type' => 'text',
4297
  'default' => true,
4298
  'required' => array( 'ampforwp-infinite-scroll', '=' , 1 )
4299
  ),
4300
+ array(
4301
+ 'id' => 'ampforwp-infinite-scroll-single-category',
4302
+ 'type' => 'switch',
4303
+ 'class' => 'child_opt child_opt_arrow',
4304
+ 'title' => esc_html__('Same Category', 'accelerated-mobile-pages'),
4305
+ 'default' => false,
4306
+ 'required' => array(
4307
+ array('ampforwp-infinite-scroll', '=' , '1'),
4308
+ array('ampforwp-infinite-scroll-single', '=' , '1')
4309
+ ),
4310
+ ),
4311
+ array(
4312
+ 'id' => 'ampforwp-infinite-scroll-single-tag',
4313
+ 'type' => 'switch',
4314
+ 'class' => 'child_opt child_opt_arrow',
4315
+ 'title' => esc_html__('Same Tag', 'accelerated-mobile-pages'),
4316
+ 'default' => false,
4317
+ 'required' => array(
4318
+ array('ampforwp-infinite-scroll', '=' , '1'),
4319
+ array('ampforwp-infinite-scroll-single', '=' , '1')
4320
+ ),
4321
+ ),
4322
  array(
4323
  'id' => 'google-icons',
4324
  'type' => 'section',
4460
  ),
4461
  'default' => '1'
4462
  ),
4463
+ array(
4464
+ 'id' => 'menu-search-after-menu',
4465
+ 'class' => 'child_opt child_opt_arrow',
4466
+ 'type' => 'switch',
4467
+ 'title' => esc_html__('After Menu', 'accelerated-mobile-pages'),
4468
+ 'required' => array('menu-search', '=' , '1'),
4469
+ 'default' => '1'
4470
+ ),
4471
+ array(
4472
+ 'id' => 'menu-search-before-menu',
4473
+ 'class' => 'child_opt child_opt_arrow',
4474
+ 'type' => 'switch',
4475
+ 'title' => esc_html__('Before Menu', 'accelerated-mobile-pages'),
4476
+ 'required' => array('menu-search', '=' , '1'),
4477
+ 'default' => '0'
4478
+ ),
4479
  array(
4480
  'id' => 'amp-swift-menu-cprt',
4481
  'type' => 'switch',
4604
  array('signin-button','=',1)
4605
  )
4606
  ),
4607
+ array(
4608
+ 'id' => 'signin-button-new-tab',
4609
+ 'class' => 'child_opt child_opt_arrow',
4610
+ 'title' => esc_html__('New Tab', 'accelerated-mobile-pages'),
4611
+ 'tooltip-subtitle' => esc_html__('Open the button link in new tab','accelerated-mobile-pages'),
4612
+ 'type' => 'switch',
4613
+ 'default' => '1',
4614
+ 'required' => array('signin-button', '=', '1')
4615
+ ),
4616
  array(
4617
  'id' => 'signin-button-border-line',
4618
  'class' => 'child_opt child_opt_arrow',
5860
  );
5861
  }
5862
  if(!is_plugin_active( 'amp-newspaper-theme/ampforwp-custom-theme.php' ) ){
 
 
 
 
 
 
 
 
5863
  $single_page_options = array(
5864
  array(
5865
  'id' => 'ampforwp-single_section_1',
5955
  array('amp-design-selector' , '=' , '4'),
5956
  )
5957
  ),
5958
+ array(
5959
+ 'id' => 'amp-author-name-display',
5960
+ 'type' => 'switch',
5961
+ 'class' => 'child_opt child_opt_arrow',
5962
+ 'title' => esc_html__( 'Below Title on Mobile', 'accelerated-mobile-pages' ),
5963
+ 'default' => 0,
5964
+ 'tooltip-subtitle' => esc_html__('Enable this option to show author name below the title in mobile view','accelerated-mobile-pages'),
5965
+ 'required' => array(
5966
+ array('amp-author-name' , '=' , '1'),
5967
+ )
5968
+ ),
5969
  array(
5970
  'id' => 'swift-date',
5971
  'type' => 'switch',
5976
 
5977
  'required' => array( array('amp-design-selector', '=' , '4') ),
5978
  ),
5979
+ array(
5980
+ 'id' => 'amp-published-date-display',
5981
+ 'type' => 'switch',
5982
+ 'class' => 'child_opt child_opt_arrow',
5983
+ 'title' => esc_html__( 'Below Title on Mobile', 'accelerated-mobile-pages' ),
5984
+ 'default' => 0,
5985
+ 'tooltip-subtitle' => esc_html__('Enable this option to show published date below the title in mobile view','accelerated-mobile-pages'),
5986
+ 'required' => array(
5987
+ array('swift-date' , '=' , '1'),
5988
+ )
5989
+ ),
5990
  //Breadcrumb ON/OFF
5991
  array(
5992
  'id' => 'ampforwp-bread-crumb',
6254
  'default' => '6',
6255
  'required' => array('ampforwp-swift-recent-posts' , '=' , '1'),
6256
  ),
6257
+ array(
6258
+ 'id' => 'ampforwp-recent-post-utm-tracking-switch',
6259
+ 'type' => 'switch',
6260
+ 'class' => 'child_opt child_opt_arrow',
6261
+ 'title' => esc_html__('UTM Tracking', 'accelerated-mobile-pages'),
6262
+ 'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6263
+ esc_html__('Enable this option to add utm tracking to all your recent post links and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-utm-tracking-to-all-your-recent-post-links/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6264
+ 'default' => 0,
6265
+ 'required' => array('ampforwp-swift-recent-posts', '=', '1')
6266
+ ),
6267
+ array(
6268
+ 'id' => 'ampforwp-recent-posts-utm-tracking',
6269
+ 'title' => esc_html__('Campaign Source', 'accelerated-mobile-pages'),
6270
+ 'desc' =>esc_html__('Use \'&\' for adding parameters in the tracking. Example: utm_source=xxx&utm_medium=xxx','accelerated-mobile-pages'),
6271
+ 'type' => 'text',
6272
+ 'class' => 'child_opt child_opt_arrow',
6273
+ 'required' => array('ampforwp-recent-post-utm-tracking-switch', '=' , '1'),
6274
+ 'default' => '',
6275
+ ),
6276
  array(
6277
  'id' => 'ampforwp-single_section_3',
6278
  'type' => 'section',
6479
  'required' => array(
6480
  array('ampforwp-related-posts-days-switch', '=' , '1'),
6481
  ),
6482
+ ),
6483
+ array(
6484
+ 'id' => 'ampforwp-related-post-utm-tracking-switch',
6485
+ 'type' => 'switch',
6486
+ 'class' => 'child_opt child_opt_arrow',
6487
+ 'title' => esc_html__('UTM Tracking', 'accelerated-mobile-pages'),
6488
+ 'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6489
+ esc_html__('Enable this option to add utm tracking to all your related post links and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-utm-tracking-to-all-your-related-post-links/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6490
+ 'default' => 0,
6491
+ 'required' => array('ampforwp-single-related-posts-switch', '=', '1')
6492
+ ),
6493
+ array(
6494
+ 'id' => 'ampforwp-related-posts-utm-tracking',
6495
+ 'title' => esc_html__('Campaign Source', 'accelerated-mobile-pages'),
6496
+ 'desc' =>esc_html__('Use \'&\' for adding parameters in the tracking. Example: utm_source=xxx&utm_medium=xxx','accelerated-mobile-pages'),
6497
+ 'type' => 'text',
6498
+ 'class' => 'child_opt child_opt_arrow',
6499
+ 'required' => array('ampforwp-related-post-utm-tracking-switch', '=' , '1'),
6500
+ 'default' => '',
6501
  ),
6502
  // DESIGN 3 RECENT POST BELOW RELATED
6503
  array(
6644
  'default' => '7',
6645
  'required' => array('ampforwp-in-content-related-posts-days-switch', '=' , '1'),
6646
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
6647
  $jetpack_rp,
6648
  array(
6649
  'id' => 'single-tab-2',
7483
  'layout_type' => 'accordion',
7484
  'accordion-open'=> 1,
7485
  ),
7486
+ array(
7487
+ 'id' => 'ampforwp_pages_title',
7488
+ 'type' => 'switch',
7489
+ 'default' => '1',
7490
+ 'title' => esc_html__('Title', 'accelerated-mobile-pages'),
7491
+ 'tooltip-subtitle' => esc_html__('Enable Title on Pages.','accelerated-mobile-pages'),
7492
+ 'required' => array('amp-design-selector','=','4'),
7493
+ ),
7494
  // Meta ON/OFF Pages
7495
  array(
7496
  'id' => 'featured_image_swift_page',
includes/options/extensions/amp_slider/amp_slider/field_amp_slider.php CHANGED
@@ -39,7 +39,7 @@ if ( ! class_exists( 'ReduxCore\\ReduxFramework\\ReduxFramework_amp_slider' ) )
39
 
40
 
41
 
42
- function __construct( $field = array(), $value = '', $parent ) {
43
 
44
  //parent::__construct( $parent->sections, $parent->args );
45
  $this->parent = $parent;
39
 
40
 
41
 
42
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
43
 
44
  //parent::__construct( $parent->sections, $parent->args );
45
  $this->parent = $parent;
includes/options/extensions/demolink_image_select/demolink_image_select/field_demolink_image_select.php CHANGED
@@ -23,7 +23,7 @@ if ( ! class_exists( 'ReduxCore\\ReduxFramework\\ReduxFramework_demolink_image_s
23
  *
24
  * @since ReduxFramework 1.0.0
25
  */
26
- function __construct( $field = array(), $value = '', $parent ) {
27
  $this->parent = $parent;
28
  $this->field = $field;
29
  $this->value = $value;
23
  *
24
  * @since ReduxFramework 1.0.0
25
  */
26
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
27
  $this->parent = $parent;
28
  $this->field = $field;
29
  $this->value = $value;
includes/options/extensions/loader.php CHANGED
@@ -22,7 +22,7 @@ if(!function_exists('ampforwp_register_custom_extension_loader')) :
22
  require_once( $class_file );
23
  }
24
  }
25
- if ( ! isset( $ReduxFramework->extensions[ $folder ] ) ) {
26
  $ReduxFramework->extensions[ $folder ] = new $extension_class( $ReduxFramework );
27
  }
28
  }
22
  require_once( $class_file );
23
  }
24
  }
25
+ if ( !class_exists('Redux_Framework_Plugin') && ! isset( $ReduxFramework->extensions[ $folder ] ) ) {
26
  $ReduxFramework->extensions[ $folder ] = new $extension_class( $ReduxFramework );
27
  }
28
  }
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -1568,7 +1568,4 @@ doc-cnt h1 , .doc-cnt p{
1568
  top: 7px;
1569
  }
1570
 
1571
- /** Discount Offer CSS Ends **/
1572
- table#section-table-ampforwp-the-seo-checklist strong , table#section-table-ampforwp-the-seo-checklist th {
1573
- display: none;
1574
- }
1568
  top: 7px;
1569
  }
1570
 
1571
+ /** Discount Offer CSS Ends **/
 
 
 
includes/options/redux-core/framework.php CHANGED
@@ -2250,7 +2250,7 @@
2250
  150,
2251
  150
2252
  ) );
2253
- $this->options[ $field['id'] ]['thumbnail'] = $data[0];
2254
  $doUpdate = true;
2255
  }
2256
  }
2250
  150,
2251
  150
2252
  ) );
2253
+ $this->options[ $field['id'] ]['thumbnail'] = isset($data[0]) ? $data[0] : '' ;
2254
  $doUpdate = true;
2255
  }
2256
  }
includes/options/redux-core/inc/class.redux_cdn.php CHANGED
@@ -18,7 +18,7 @@
18
  static public $_parent;
19
  static private $_set;
20
 
21
- private static function is_enqueued( $handle, $list = 'enqueued', $is_script ) {
22
  if ( $is_script ) {
23
  wp_script_is( $handle, $list );
24
  } else {
@@ -42,13 +42,14 @@
42
  }
43
  }
44
 
45
- private static function _cdn( $register = true, $handle, $src_cdn, $deps, $ver, $footer_or_media, $is_script = true ) {
46
  $tran_key = '_style_cdn_is_up';
47
  if ( $is_script ) {
48
  $tran_key = '_script_cdn_is_up';
49
  }
50
-
51
- $cdn_is_up = get_transient( $handle . $tran_key );
 
52
  if ( $cdn_is_up ) {
53
  if ( $register ) {
54
  self::_register( $handle, $src_cdn, $deps, $ver, $footer_or_media, $is_script );
@@ -97,10 +98,11 @@
97
  }
98
  }
99
 
100
- private static function _vendor_plugin( $register = true, $handle, $src_cdn, $deps, $ver, $footer_or_media, $is_script = true ) {
101
  if ( class_exists( 'ReduxCore\\ReduxFramework\\Redux_VendorURL' ) ) {
102
- $src = Redux_VendorURL::get_url( $handle );
103
-
 
104
  if ( $register ) {
105
  self::_register( $handle, $src, $deps, $ver, $footer_or_media, $is_script );
106
  } else {
@@ -152,4 +154,4 @@
152
  }
153
  }
154
  }
155
- }
18
  static public $_parent;
19
  static private $_set;
20
 
21
+ private static function is_enqueued( $handle, $list = 'enqueued', $is_script = true ) {
22
  if ( $is_script ) {
23
  wp_script_is( $handle, $list );
24
  } else {
42
  }
43
  }
44
 
45
+ private static function _cdn( $register = true, $handle = '', $src_cdn = '', $deps = '', $ver = '', $footer_or_media = '', $is_script = true ) {
46
  $tran_key = '_style_cdn_is_up';
47
  if ( $is_script ) {
48
  $tran_key = '_script_cdn_is_up';
49
  }
50
+ if (!empty($handle)) {
51
+ $cdn_is_up = get_transient( $handle . $tran_key );
52
+ }
53
  if ( $cdn_is_up ) {
54
  if ( $register ) {
55
  self::_register( $handle, $src_cdn, $deps, $ver, $footer_or_media, $is_script );
98
  }
99
  }
100
 
101
+ private static function _vendor_plugin( $register = true, $handle = '', $src_cdn = '', $deps = '', $ver = '', $footer_or_media = '', $is_script = true ) {
102
  if ( class_exists( 'ReduxCore\\ReduxFramework\\Redux_VendorURL' ) ) {
103
+ if (!empty($handle)) {
104
+ $src = Redux_VendorURL::get_url( $handle );
105
+ }
106
  if ( $register ) {
107
  self::_register( $handle, $src, $deps, $ver, $footer_or_media, $is_script );
108
  } else {
154
  }
155
  }
156
  }
157
+ }
includes/options/redux-core/inc/class.redux_functions.php CHANGED
@@ -51,8 +51,8 @@
51
  * @param boolean $secure HTTPS only.
52
  * @param boolean $httponly Only set cookie on HTTP calls.
53
  */
54
- public static function setCookie( $name, $value, $expire = 0, $path, $domain = null, $secure = false, $httponly = false ) {
55
- if ( ! defined( 'WP_TESTS_DOMAIN' ) ) {
56
  setcookie( $name, $value, $expire, $path, $domain, $secure, $httponly );
57
  }
58
  }
51
  * @param boolean $secure HTTPS only.
52
  * @param boolean $httponly Only set cookie on HTTP calls.
53
  */
54
+ public static function setCookie( $name, $value, $expire = 0, $path = '', $domain = null, $secure = false, $httponly = false ) {
55
+ if ( ! defined( 'WP_TESTS_DOMAIN' ) && !empty($path)) {
56
  setcookie( $name, $value, $expire, $path, $domain, $secure, $httponly );
57
  }
58
  }
includes/options/redux-core/inc/extensions/customizer/extension_customizer.php CHANGED
@@ -582,14 +582,16 @@ namespace ReduxCore\ReduxFramework;
582
 
583
  }
584
 
585
- public function add_section( $id, $args = array(), $wp_customize ) {
586
 
587
  if ( is_a( $id, 'WP_Customize_Section' ) ) {
588
  $section = $id;
589
  } else {
590
 
591
  $section_class = apply_filters( 'redux/customizer/section/class_name', "Redux_Customizer_Section" );
592
- $section = new $section_class( $wp_customize, $id, $args );
 
 
593
  }
594
 
595
  $wp_customize->add_section( $section, $args );
@@ -605,12 +607,14 @@ namespace ReduxCore\ReduxFramework;
605
  * @param WP_Customize_Panel|string $id Customize Panel object, or Panel ID.
606
  * @param array $args Optional. Panel arguments. Default empty array.
607
  */
608
- public function add_panel( $id, $args = array(), $wp_customize ) {
609
  if ( is_a( $id, 'WP_Customize_Panel' ) ) {
610
  $panel = $id;
611
  } else {
612
  $panel_class = apply_filters( 'redux/customizer/panel/class_name', "Redux_Customizer_Panel" );
613
- $panel = new $panel_class( $wp_customize, $id, $args );
 
 
614
  }
615
 
616
  $wp_customize->add_panel( $panel, $args );
@@ -817,4 +821,4 @@ namespace ReduxCore\ReduxFramework;
817
  function redux_customizer_custom_validation( $field ) {
818
  return $field;
819
  }
820
- } // if
582
 
583
  }
584
 
585
+ public function add_section( $id, $args = array(), $wp_customize = '' ) {
586
 
587
  if ( is_a( $id, 'WP_Customize_Section' ) ) {
588
  $section = $id;
589
  } else {
590
 
591
  $section_class = apply_filters( 'redux/customizer/section/class_name', "Redux_Customizer_Section" );
592
+ if (!empty($wp_customize)) {
593
+ $section = new $section_class( $wp_customize, $id, $args );
594
+ }
595
  }
596
 
597
  $wp_customize->add_section( $section, $args );
607
  * @param WP_Customize_Panel|string $id Customize Panel object, or Panel ID.
608
  * @param array $args Optional. Panel arguments. Default empty array.
609
  */
610
+ public function add_panel( $id, $args = array(), $wp_customize = '' ) {
611
  if ( is_a( $id, 'WP_Customize_Panel' ) ) {
612
  $panel = $id;
613
  } else {
614
  $panel_class = apply_filters( 'redux/customizer/panel/class_name', "Redux_Customizer_Panel" );
615
+ if (!empty($wp_customize)) {
616
+ $panel = new $panel_class( $wp_customize, $id, $args );
617
+ }
618
  }
619
 
620
  $wp_customize->add_panel( $panel, $args );
821
  function redux_customizer_custom_validation( $field ) {
822
  return $field;
823
  }
824
+ } // if
includes/options/redux-core/inc/extensions/import_export/import_export/field_import_export.php CHANGED
@@ -40,7 +40,7 @@ namespace ReduxCore\ReduxFramework;
40
  * @access public
41
  * @return void
42
  */
43
- function __construct( $field = array(), $value = '', $parent ) {
44
 
45
  $this->parent = $parent;
46
  $this->field = $field;
40
  * @access public
41
  * @return void
42
  */
43
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
44
 
45
  $this->parent = $parent;
46
  $this->field = $field;
includes/options/redux-core/inc/extensions/options_object/options_object/field_options_object.php CHANGED
@@ -40,7 +40,7 @@ namespace ReduxCore\ReduxFramework;
40
  * @access public
41
  * @return void
42
  */
43
- function __construct( $field = array(), $value = '', $parent ) {
44
 
45
  $this->parent = $parent;
46
  $this->field = $field;
40
  * @access public
41
  * @return void
42
  */
43
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
44
 
45
  $this->parent = $parent;
46
  $this->field = $field;
includes/options/redux-core/inc/fields/ace_editor/field_ace_editor.php CHANGED
@@ -33,7 +33,7 @@ namespace ReduxCore\ReduxFramework;
33
  * @since ReduxFramework 1.0.0
34
  */
35
  private $time = '';
36
- function __construct( $field = array(), $value = '', $parent ) {
37
  $this->parent = $parent;
38
  $this->field = $field;
39
  $this->value = $value;
33
  * @since ReduxFramework 1.0.0
34
  */
35
  private $time = '';
36
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
37
  $this->parent = $parent;
38
  $this->field = $field;
39
  $this->value = $value;
includes/options/redux-core/inc/fields/background/field_background.php CHANGED
@@ -40,7 +40,7 @@ namespace ReduxCore\ReduxFramework;
40
  * @access public
41
  * @return void
42
  */
43
- function __construct( $field = array(), $value = '', $parent ) {
44
 
45
  $this->parent = $parent;
46
  $this->field = $field;
40
  * @access public
41
  * @return void
42
  */
43
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
44
 
45
  $this->parent = $parent;
46
  $this->field = $field;
includes/options/redux-core/inc/fields/border/field_border.php CHANGED
@@ -33,7 +33,7 @@ if ( ! class_exists( 'ReduxCore\\ReduxFramework\\ReduxFramework_border' ) ) {
33
  *
34
  * @since ReduxFramework 1.0.0
35
  */
36
- function __construct( $field = array(), $value = '', $parent ) {
37
 
38
  $this->parent = $parent;
39
  $this->field = $field;
33
  *
34
  * @since ReduxFramework 1.0.0
35
  */
36
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
37
 
38
  $this->parent = $parent;
39
  $this->field = $field;
includes/options/redux-core/inc/fields/button_set/field_button_set.php CHANGED
@@ -68,7 +68,7 @@ namespace ReduxCore\ReduxFramework;
68
  * @access public
69
  * @return void
70
  */
71
- function __construct( $field = array(), $value = '', $parent ) {
72
 
73
  $this->parent = $parent;
74
  $this->field = $field;
68
  * @access public
69
  * @return void
70
  */
71
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
72
 
73
  $this->parent = $parent;
74
  $this->field = $field;
includes/options/redux-core/inc/fields/color/field_color.php CHANGED
@@ -43,7 +43,7 @@ if ( ! class_exists( 'ReduxCore\\ReduxFramework\\ReduxFramework_color' ) ) {
43
  * @return void
44
  */
45
  private $time = '';
46
- function __construct( $field = array(), $value = '', $parent ) {
47
 
48
  $this->parent = $parent;
49
  $this->field = $field;
43
  * @return void
44
  */
45
  private $time = '';
46
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
47
 
48
  $this->parent = $parent;
49
  $this->field = $field;
includes/options/redux-core/inc/fields/color_gradient/field_color_gradient.php CHANGED
@@ -41,7 +41,7 @@ if ( ! class_exists( 'ReduxCore\\ReduxFramework\\ReduxFramework_color_gradient'
41
  * @access public
42
  * @return void
43
  */
44
- function __construct( $field = array(), $value = '', $parent ) {
45
  $this->parent = $parent;
46
  $this->field = $field;
47
  $this->value = $value;
41
  * @access public
42
  * @return void
43
  */
44
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
45
  $this->parent = $parent;
46
  $this->field = $field;
47
  $this->value = $value;
includes/options/redux-core/inc/fields/color_rgba/field_color_rgba.php CHANGED
@@ -45,7 +45,7 @@ if( !class_exists( 'ReduxCore\\ReduxFramework\\ReduxFramework_color_rgba' ) ) {
45
  * @param array $parent Parent object.
46
  * @return void
47
  */
48
- public function __construct( $field = array(), $value ='', $parent ) {
49
 
50
  // Set required variables
51
  $this->parent = $parent;
45
  * @param array $parent Parent object.
46
  * @return void
47
  */
48
+ public function __construct( $field = array(), $value ='', $parent = ' ') {
49
 
50
  // Set required variables
51
  $this->parent = $parent;
includes/options/redux-core/inc/fields/date/field_date.php CHANGED
@@ -43,7 +43,7 @@ if ( ! class_exists( 'ReduxFramework_date' ) ) {
43
  * @access public
44
  * @return void
45
  */
46
- function __construct( $field = array(), $value = '', $parent ) {
47
  $this->parent = $parent;
48
  $this->field = $field;
49
  $this->value = $value;
43
  * @access public
44
  * @return void
45
  */
46
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
47
  $this->parent = $parent;
48
  $this->field = $field;
49
  $this->value = $value;
includes/options/redux-core/inc/fields/dimensions/field_dimensions.php CHANGED
@@ -13,7 +13,7 @@ namespace ReduxCore\ReduxFramework;
13
  *
14
  * @since ReduxFramework 1.0.0
15
  */
16
- function __construct( $field = array(), $value = '', $parent ) {
17
  $this->parent = $parent;
18
  $this->field = $field;
19
  $this->value = $value;
13
  *
14
  * @since ReduxFramework 1.0.0
15
  */
16
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
17
  $this->parent = $parent;
18
  $this->field = $field;
19
  $this->value = $value;
includes/options/redux-core/inc/fields/editor/field_editor.php CHANGED
@@ -43,7 +43,7 @@ if ( ! class_exists( 'ReduxFramework_editor' ) ) {
43
  * @access public
44
  * @return void
45
  */
46
- function __construct( $field = array(), $value = '', $parent ) {
47
  $this->parent = $parent;
48
  $this->field = $field;
49
  $this->value = $value;
43
  * @access public
44
  * @return void
45
  */
46
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
47
  $this->parent = $parent;
48
  $this->field = $field;
49
  $this->value = $value;
includes/options/redux-core/inc/fields/gallery/field_gallery.php CHANGED
@@ -41,7 +41,7 @@ if ( ! class_exists( 'ReduxFramework_gallery' ) ) {
41
  * @access public
42
  * @return void
43
  */
44
- function __construct( $field = array(), $value = '', $parent ) {
45
  $this->parent = $parent;
46
  $this->field = $field;
47
  $this->value = $value;
41
  * @access public
42
  * @return void
43
  */
44
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
45
  $this->parent = $parent;
46
  $this->field = $field;
47
  $this->value = $value;
includes/options/redux-core/inc/fields/image_select/field_image_select.php CHANGED
@@ -43,7 +43,7 @@ if ( ! class_exists( 'ReduxFramework_image_select' ) ) {
43
  * @return void
44
  */
45
  private $time = '';
46
- function __construct( $field = array(), $value = '', $parent ) {
47
  $this->parent = $parent;
48
  $this->field = $field;
49
  $this->value = $value;
43
  * @return void
44
  */
45
  private $time = '';
46
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
47
  $this->parent = $parent;
48
  $this->field = $field;
49
  $this->value = $value;
includes/options/redux-core/inc/fields/info/field_info.php CHANGED
@@ -42,7 +42,7 @@ namespace ReduxCore\ReduxFramework;
42
  * @access public
43
  * @return void
44
  */
45
- function __construct( $field = array(), $value = '', $parent ) {
46
  $this->parent = $parent;
47
  $this->field = $field;
48
  $this->value = $value;
42
  * @access public
43
  * @return void
44
  */
45
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
46
  $this->parent = $parent;
47
  $this->field = $field;
48
  $this->value = $value;
includes/options/redux-core/inc/fields/link_color/field_link_color.php CHANGED
@@ -44,7 +44,7 @@ if ( ! class_exists( 'ReduxFramework_link_color' ) ) {
44
  * @access public
45
  * @return void
46
  */
47
- function __construct( $field = array(), $value = '', $parent ) {
48
  $this->parent = $parent;
49
  $this->field = $field;
50
  $this->value = $value;
44
  * @access public
45
  * @return void
46
  */
47
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
48
  $this->parent = $parent;
49
  $this->field = $field;
50
  $this->value = $value;
includes/options/redux-core/inc/fields/media/field_media.php CHANGED
@@ -45,7 +45,7 @@ if ( ! class_exists( 'ReduxFramework_media' ) ) {
45
  */
46
  private $timestamp = '';
47
 
48
- function __construct( $field = array(), $value = '', $parent ) {
49
  $this->parent = $parent;
50
  $this->field = $field;
51
  $this->value = $value;
45
  */
46
  private $timestamp = '';
47
 
48
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
49
  $this->parent = $parent;
50
  $this->field = $field;
51
  $this->value = $value;
includes/options/redux-core/inc/fields/multi_text/field_multi_text.php CHANGED
@@ -42,7 +42,7 @@ if ( ! class_exists( 'ReduxFramework_multi_text' ) ) {
42
  * @access public
43
  * @return void
44
  */
45
- function __construct( $field = array(), $value = '', $parent ) {
46
  $this->parent = $parent;
47
  $this->field = $field;
48
  $this->value = $value;
42
  * @access public
43
  * @return void
44
  */
45
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
46
  $this->parent = $parent;
47
  $this->field = $field;
48
  $this->value = $value;
includes/options/redux-core/inc/fields/multitext_repeater/field_multitext_repeater.php CHANGED
@@ -42,7 +42,7 @@ if ( ! class_exists( 'ReduxFramework_multitext_repeater' ) ) {
42
  * @access public
43
  * @return void
44
  */
45
- function __construct( $field = array(), $value = '', $parent ) {
46
  $this->parent = $parent;
47
  $this->field = $field;
48
  $this->value = $value;
42
  * @access public
43
  * @return void
44
  */
45
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
46
  $this->parent = $parent;
47
  $this->field = $field;
48
  $this->value = $value;
includes/options/redux-core/inc/fields/palette/field_palette.php CHANGED
@@ -34,7 +34,7 @@ if ( ! class_exists( 'ReduxFramework_palette' ) ) {
34
  * @access public
35
  * @return void
36
  */
37
- function __construct( $field = array(), $value = '', $parent ) {
38
  $this->parent = $parent;
39
  $this->field = $field;
40
  $this->value = $value;
34
  * @access public
35
  * @return void
36
  */
37
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
38
  $this->parent = $parent;
39
  $this->field = $field;
40
  $this->value = $value;
includes/options/redux-core/inc/fields/password/field_password.php CHANGED
@@ -18,7 +18,7 @@ namespace ReduxCore\ReduxFramework;
18
  *
19
  * @since ReduxFramework 1.0.1
20
  */
21
- function __construct( $field = array(), $value = '', $parent ) {
22
  $this->parent = $parent;
23
  $this->field = $field;
24
  $this->value = $value;
18
  *
19
  * @since ReduxFramework 1.0.1
20
  */
21
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
22
  $this->parent = $parent;
23
  $this->field = $field;
24
  $this->value = $value;
includes/options/redux-core/inc/fields/radio/field_radio.php CHANGED
@@ -14,7 +14,7 @@ namespace ReduxCore\ReduxFramework;
14
  *
15
  * @since ReduxFramework 1.0.0
16
  */
17
- function __construct( $field = array(), $value = '', $parent ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
14
  *
15
  * @since ReduxFramework 1.0.0
16
  */
17
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
includes/options/redux-core/inc/fields/raw/field_raw.php CHANGED
@@ -14,7 +14,7 @@ namespace ReduxCore\ReduxFramework;
14
  *
15
  * @since ReduxFramework 3.0.4
16
  */
17
- function __construct( $field = array(), $value = '', $parent ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
14
  *
15
  * @since ReduxFramework 3.0.4
16
  */
17
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
includes/options/redux-core/inc/fields/repeater/field_repeater.php CHANGED
@@ -42,7 +42,7 @@ if ( ! class_exists( 'ReduxFramework_repeater' ) ) {
42
  * @access public
43
  * @return void
44
  */
45
- function __construct( $field = array(), $value = '', $parent ) {
46
  $this->parent = $parent;
47
  $this->field = $field;
48
  $this->value = $value;
42
  * @access public
43
  * @return void
44
  */
45
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
46
  $this->parent = $parent;
47
  $this->field = $field;
48
  $this->value = $value;
includes/options/redux-core/inc/fields/section/field_section.php CHANGED
@@ -41,7 +41,7 @@ namespace ReduxCore\ReduxFramework;
41
  * @access public
42
  * @return void
43
  */
44
- public function __construct( $field = array(), $value = '', $parent ) {
45
  $this->parent = $parent;
46
  $this->field = $field;
47
  $this->value = $value;
41
  * @access public
42
  * @return void
43
  */
44
+ public function __construct( $field = array(), $value = '', $parent = ' ' ) {
45
  $this->parent = $parent;
46
  $this->field = $field;
47
  $this->value = $value;
includes/options/redux-core/inc/fields/select/field_select.php CHANGED
@@ -15,7 +15,7 @@ if ( ! class_exists( 'ReduxFramework_select' ) ) {
15
  * @since ReduxFramework 1.0.0
16
  */
17
  private $time = '';
18
- public function __construct( $field = array(), $value = '', $parent ) {
19
  $this->parent = $parent;
20
  $this->field = $field;
21
  $this->value = $value;
15
  * @since ReduxFramework 1.0.0
16
  */
17
  private $time = '';
18
+ public function __construct( $field = array(), $value = '', $parent = ' ' ) {
19
  $this->parent = $parent;
20
  $this->field = $field;
21
  $this->value = $value;
includes/options/redux-core/inc/fields/select_image/field_select_image.php CHANGED
@@ -23,7 +23,7 @@ if ( ! class_exists( 'ReduxFramework_select_image' ) ) {
23
  *
24
  * @since ReduxFramework 1.0.0
25
  */
26
- function __construct( $field = array(), $value = '', $parent ) {
27
  $this->parent = $parent;
28
  $this->field = $field;
29
  $this->value = $value;
23
  *
24
  * @since ReduxFramework 1.0.0
25
  */
26
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
27
  $this->parent = $parent;
28
  $this->field = $field;
29
  $this->value = $value;
includes/options/redux-core/inc/fields/slider/field_slider.php CHANGED
@@ -37,7 +37,7 @@ if ( ! class_exists( 'ReduxFramework_slider' ) ) {
37
  private $display_text = 2;
38
  private $display_select = 3;
39
 
40
- function __construct( $field = array(), $value = '', $parent ) {
41
 
42
  //parent::__construct( $parent->sections, $parent->args );
43
  $this->parent = $parent;
37
  private $display_text = 2;
38
  private $display_select = 3;
39
 
40
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
41
 
42
  //parent::__construct( $parent->sections, $parent->args );
43
  $this->parent = $parent;
includes/options/redux-core/inc/fields/sortable/field_sortable.php CHANGED
@@ -14,7 +14,7 @@ if ( ! class_exists( 'ReduxFramework_sortable' ) ) {
14
  *
15
  * @since Redux_Options 2.0.1
16
  */
17
- function __construct( $field = array(), $value = '', $parent ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
14
  *
15
  * @since Redux_Options 2.0.1
16
  */
17
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
includes/options/redux-core/inc/fields/sorter/field_sorter.php CHANGED
@@ -14,7 +14,7 @@ namespace ReduxCore\ReduxFramework;
14
  *
15
  * @since Redux_Options 1.0.0
16
  */
17
- function __construct( $field = array(), $value = '', $parent ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
14
  *
15
  * @since Redux_Options 1.0.0
16
  */
17
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
includes/options/redux-core/inc/fields/spacing/field_spacing.php CHANGED
@@ -14,7 +14,7 @@ if ( ! class_exists( 'ReduxFramework_spacing' ) ) {
14
  *
15
  * @since ReduxFramework 1.0.0
16
  */
17
- function __construct( $field = array(), $value = '', $parent ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
14
  *
15
  * @since ReduxFramework 1.0.0
16
  */
17
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
includes/options/redux-core/inc/fields/spinner/field_spinner.php CHANGED
@@ -14,7 +14,7 @@ if ( ! class_exists( 'ReduxFramework_spinner' ) ) {
14
  *
15
  * @since ReduxFramework 3.0.0
16
  */
17
- function __construct( $field = array(), $value = '', $parent ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
14
  *
15
  * @since ReduxFramework 3.0.0
16
  */
17
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
includes/options/redux-core/inc/fields/switch/field_switch.php CHANGED
@@ -14,7 +14,7 @@ if ( ! class_exists( 'ReduxFramework_switch' ) ) {
14
  *
15
  * @since ReduxFramework 0.0.4
16
  */
17
- function __construct( $field = array(), $value = '', $parent ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
14
  *
15
  * @since ReduxFramework 0.0.4
16
  */
17
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
includes/options/redux-core/inc/fields/text/field_text.php CHANGED
@@ -14,7 +14,7 @@ if ( ! class_exists( 'ReduxFramework_text' ) ) {
14
  *
15
  * @since ReduxFramework 1.0.0
16
  */
17
- function __construct( $field = array(), $value = '', $parent ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
14
  *
15
  * @since ReduxFramework 1.0.0
16
  */
17
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
18
  $this->parent = $parent;
19
  $this->field = $field;
20
  $this->value = $value;
includes/options/redux-core/inc/fields/textarea/field_textarea.php CHANGED
@@ -39,7 +39,7 @@ namespace ReduxCore\ReduxFramework;
39
  * @since ReduxFramework 1.0.0
40
  * @type string $field [test] Description. Default <value>. Accepts <value>, <value>.
41
  */
42
- function __construct( $field = array(), $value = '', $parent ) {
43
  $this->parent = $parent;
44
  $this->field = $field;
45
  $this->value = $value;
39
  * @since ReduxFramework 1.0.0
40
  * @type string $field [test] Description. Default <value>. Accepts <value>, <value>.
41
  */
42
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
43
  $this->parent = $parent;
44
  $this->field = $field;
45
  $this->value = $value;
includes/options/redux-core/inc/fields/typography/field_typography.json CHANGED
@@ -47,7 +47,7 @@
47
  *
48
  * @since ReduxFramework 1.0.0
49
  */
50
- function __construct( $field = array(), $value = '', $parent ) {
51
  $this->parent = $parent;
52
  $this->field = $field;
53
  $this->value = $value;
47
  *
48
  * @since ReduxFramework 1.0.0
49
  */
50
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
51
  $this->parent = $parent;
52
  $this->field = $field;
53
  $this->value = $value;
includes/options/redux-core/inc/fields/typography/field_typography.php CHANGED
@@ -47,7 +47,7 @@ if ( ! class_exists( 'ReduxFramework_typography' ) ) {
47
  *
48
  * @since ReduxFramework 1.0.0
49
  */
50
- function __construct( $field = array(), $value = '', $parent ) {
51
  $this->parent = $parent;
52
  $this->field = $field;
53
  $this->value = $value;
47
  *
48
  * @since ReduxFramework 1.0.0
49
  */
50
+ function __construct( $field = array(), $value = '', $parent = ' ' ) {
51
  $this->parent = $parent;
52
  $this->field = $field;
53
  $this->value = $value;
includes/redirect.php CHANGED
@@ -61,7 +61,25 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
61
  }else{
62
  return;
63
  }
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  // Redirect ?nonamp=1 to normal url #3269
66
  $current_url = $check = '';
67
  $current_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ?
@@ -132,9 +150,12 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
132
  exit;
133
  }
134
  }
135
-
 
 
 
136
  // AMP Takeover
137
- if ( ampforwp_get_setting('ampforwp-amp-takeover') && !ampforwp_is_non_amp() ) {
138
  $redirection_location = '';
139
  $current_location = '';
140
  $home_url = '';
@@ -268,7 +289,7 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
268
  if ( 'disable' == ampforwp_meta_redirection_status() ) {
269
  return;
270
  }
271
- if ( false == $supported_amp_post_types ) {
272
  return;
273
  }
274
  if ( is_archive() && 0 == $redux_builder_amp['ampforwp-archive-support'] ) {
@@ -298,7 +319,7 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
298
  return;
299
  }
300
 
301
- if ( is_page() && 0 == $redux_builder_amp['amp-on-off-for-all-pages'] ) {
302
  return;
303
  }
304
 
61
  }else{
62
  return;
63
  }
64
+ }
65
+ if (ampforwp_get_setting('amp-desktop-redirection')) {
66
+ require_once AMPFORWP_PLUGIN_DIR.'/includes/vendor/Mobile_Detect.php';
67
+ $mobile_detect = new AMPforWP_Mobile_Detect;
68
+ $isMobile = $mobile_detect->isMobile();
69
+ if (!$isMobile ) {
70
+ $current_url = home_url(add_query_arg(array($_GET), $wp->request));
71
+ $current_url = explode('/', $current_url);
72
+ $check = AMPFORWP_AMP_QUERY_VAR;
73
+ if (in_array( $check , $current_url ) ) {
74
+ $current_url = array_flip($current_url);
75
+ unset($current_url['amp']);
76
+ $current_url = array_flip($current_url);
77
+ $current_url = implode('/', $current_url);
78
+ wp_safe_redirect( $current_url );
79
+ exit;
80
+ }
81
+ }
82
+ }
83
  // Redirect ?nonamp=1 to normal url #3269
84
  $current_url = $check = '';
85
  $current_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ?
150
  exit;
151
  }
152
  }
153
+ $mob_pres_link = false;
154
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
155
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
156
+ }
157
  // AMP Takeover
158
+ if ( (ampforwp_get_setting('ampforwp-amp-takeover') || $mob_pres_link == true) && !ampforwp_is_non_amp() ) {
159
  $redirection_location = '';
160
  $current_location = '';
161
  $home_url = '';
289
  if ( 'disable' == ampforwp_meta_redirection_status() ) {
290
  return;
291
  }
292
+ if ( false == $supported_amp_post_types && !ampforwp_is_front_page() ) {
293
  return;
294
  }
295
  if ( is_archive() && 0 == $redux_builder_amp['ampforwp-archive-support'] ) {
319
  return;
320
  }
321
 
322
+ if ( is_page() && 0 == ampforwp_get_setting('amp-on-off-for-all-pages') && !ampforwp_is_front_page() ) {
323
  return;
324
  }
325
 
includes/sassy-style-optimized.css ADDED
@@ -0,0 +1 @@
 
1
+ a.heateor_sss_amp{padding:0 4px;}div.heateor_sss_horizontal_sharing a amp-amp-img{display:inline-block;}.heateor_sss_amp_instagram amp-img{background-color:#624E47}.heateor_sss_amp_yummly amp-img{background-color:#E16120}.heateor_sss_amp_youtube amp-img{background-color:#ff0000}.heateor_sss_amp_buffer amp-img{background-color:#000}.heateor_sss_amp_delicious amp-img{background-color:#53BEEE}.heateor_sss_amp_facebook amp-img{background-color:#3C589A}.heateor_sss_amp_digg amp-img{background-color:#006094}.heateor_sss_amp_email amp-img{background-color:#649A3F}.heateor_sss_amp_float_it amp-img{background-color:#53BEEE}.heateor_sss_amp_linkedin amp-img{background-color:#0077B5}.heateor_sss_amp_pinterest amp-img{background-color:#CC2329}.heateor_sss_amp_print amp-img{background-color:#FD6500}.heateor_sss_amp_reddit amp-img{background-color:#FF5700}.heateor_sss_amp_stocktwits amp-img{background-color: #40576F}.heateor_sss_amp_mewe amp-img{background-color:#007da1}.heateor_sss_amp_mix amp-img{background-color:#ff8226}.heateor_sss_amp_tumblr amp-img{background-color:#29435D}.heateor_sss_amp_twitter amp-img{background-color:#55acee}.heateor_sss_amp_vkontakte amp-img{background-color:#5E84AC}.heateor_sss_amp_yahoo amp-img{background-color:#8F03CC}.heateor_sss_amp_xing amp-img{background-color:#00797D}.heateor_sss_amp_instagram amp-img{background-color:#527FA4}.heateor_sss_amp_whatsapp amp-img{background-color:#55EB4C}.heateor_sss_amp_aim amp-img{background-color: #10ff00}.heateor_sss_amp_amazon_wish_list amp-img{background-color: #ffe000}.heateor_sss_amp_aol_mail amp-img{background-color: #2A2A2A}.heateor_sss_amp_app_net amp-img{background-color: #5D5D5D}.heateor_sss_amp_baidu amp-img{background-color: #2319DC}.heateor_sss_amp_balatarin amp-img{background-color: #fff}.heateor_sss_amp_bibsonomy amp-img{background-color: #000}.heateor_sss_amp_bitty_browser amp-img{background-color: #EFEFEF}.heateor_sss_amp_blinklist amp-img{background-color: #3D3C3B}.heateor_sss_amp_blogger_post amp-img{background-color: #FDA352}.heateor_sss_amp_blogmarks amp-img{background-color: #535353}.heateor_sss_amp_bookmarks_fr amp-img{background-color: #E8EAD4}.heateor_sss_amp_box_net amp-img{background-color: #1A74B0}.heateor_sss_amp_buddymarks amp-img{background-color: #ffd400}.heateor_sss_amp_care2_news amp-img{background-color: #6EB43F}.heateor_sss_amp_citeulike amp-img{background-color: #2781CD}.heateor_sss_amp_comment amp-img{background-color: #444}.heateor_sss_amp_diary_ru amp-img{background-color: #E8D8C6}.heateor_sss_amp_diaspora amp-img{background-color: #2E3436}.heateor_sss_amp_dihitt amp-img{background-color: #FF6300}.heateor_sss_amp_diigo amp-img{background-color: #4A8BCA}.heateor_sss_amp_douban amp-img{background-color: #497700}.heateor_sss_amp_draugiem amp-img{background-color: #ffad66}.heateor_sss_amp_dzone amp-img{background-color: #fff088}.heateor_sss_amp_evernote amp-img{background-color: #8BE056}.heateor_sss_amp_facebook_messenger amp-img{background-color: #0084FF}.heateor_sss_amp_fark amp-img{background-color: #555}.heateor_sss_amp_fintel amp-img{background-color: #087515}.heateor_sss_amp_flipboard amp-img{background-color: #CC0000}.heateor_sss_amp_folkd amp-img{background-color: #0F70B2}.heateor_sss_amp_google_classroom amp-img{background-color: #FFC112}.heateor_sss_amp_google_bookmarks amp-img{background-color: #CB0909}.heateor_sss_amp_google_gmail amp-img{background-color: #E5E5E5}.heateor_sss_amp_hacker_news amp-img{background-color: #F60}.heateor_sss_amp_hatena amp-img{background-color: #00A6DB}.heateor_sss_amp_instapaper amp-img{background-color: #EDEDED}.heateor_sss_amp_jamespot amp-img{background-color: #FF9E2C}.heateor_sss_amp_kakao amp-img{background-color: #FCB700}.heateor_sss_amp_kik amp-img{background-color: #2A2A2A}.heateor_sss_amp_kindle_it amp-img{background-color: #2A2A2A}.heateor_sss_amp_known amp-img{background-color: #fff101}.heateor_sss_amp_line amp-img{background-color: #00C300}.heateor_sss_amp_livejournal amp-img{background-color: #EDEDED}.heateor_sss_amp_mail_ru amp-img{background-color: #356FAC}.heateor_sss_amp_mendeley amp-img{background-color: #A70805}.heateor_sss_amp_meneame amp-img{background-color: #FF7D12}.heateor_sss_amp_mixi amp-img{background-color: #EDEDED}.heateor_sss_amp_myspace amp-img{background-color: #2A2A2A}.heateor_sss_amp_netlog amp-img{background-color: #2A2A2A}.heateor_sss_amp_netvouz amp-img{background-color: #c0ff00}.heateor_sss_amp_newsvine amp-img{background-color: #055D00}.heateor_sss_amp_nujij amp-img{background-color: #D40000}.heateor_sss_amp_odnoklassniki amp-img{background-color: #F2720C}.heateor_sss_amp_oknotizie amp-img{background-color: #fdff88}.heateor_sss_amp_outlook_com amp-img{background-color: #0072C6}.heateor_sss_amp_papaly amp-img{background-color: #3AC0F6}.heateor_sss_amp_pinboard amp-img{background-color: #1341DE}.heateor_sss_amp_plurk amp-img{background-color: #CF682F}.heateor_sss_amp_pocket amp-img{background-color: #f0f0f0}.heateor_sss_amp_polyvore amp-img{background-color: #2A2A2A}.heateor_sss_amp_printfriendly amp-img{background-color: #61D1D5}.heateor_sss_amp_protopage_bookmarks amp-img{background-color: #413FFF}.heateor_sss_amp_pusha amp-img{background-color: #0072B8}.heateor_sss_amp_qzone amp-img{background-color: #2B82D9}.heateor_sss_amp_refind amp-img{background-color: #1492ef}.heateor_sss_amp_rediff_mypage amp-img{background-color: #D20000}.heateor_sss_amp_renren amp-img{background-color: #005EAC}.heateor_sss_amp_segnalo amp-img{background-color: #fdff88}.heateor_sss_amp_sina_weibo amp-img{background-color: #ff0}.heateor_sss_amp_sitejot amp-img{background-color: #ffc800}.heateor_sss_amp_skype amp-img{background-color: #00AFF0}.heateor_sss_amp_sms amp-img{background-color: #6ebe45}.heateor_sss_amp_slashdot amp-img{background-color: #004242}.heateor_sss_amp_stumpedia amp-img{background-color: #EDEDED}.heateor_sss_amp_svejo amp-img{background-color: #fa7aa3}.heateor_sss_amp_symbaloo_feeds amp-img{background-color: #6DA8F7}.heateor_sss_amp_telegram amp-img{background-color: #3DA5f1}.heateor_sss_amp_trello amp-img{background-color: #1189CE}.heateor_sss_amp_tuenti amp-img{background-color: #0075C9}.heateor_sss_amp_twiddla amp-img{background-color: #EDEDED}.heateor_sss_amp_typepad_post amp-img{background-color: #2A2A2A}.heateor_sss_amp_viadeo amp-img{background-color: #2A2A2A}.heateor_sss_amp_viber amp-img{background-color: #8B628F}.heateor_sss_amp_wanelo amp-img{background-color: #fff}.heateor_sss_amp_webnews amp-img{background-color: #CC2512}.heateor_sss_amp_wordpress amp-img{background-color: #464646}.heateor_sss_amp_wykop amp-img{background-color: #367DA9}.heateor_sss_amp_yahoo_mail amp-img{background-color: #400090}.heateor_sss_amp_yahoo_messenger amp-img{background-color: #400090}.heateor_sss_amp_yoolink amp-img{background-color: #A2C538}.heateor_sss_amp_youmob amp-img{background-color: #3B599D}.heateor_sss_amp_gentlereader amp-img{background-color: #46aecf}.heateor_sss_amp_threema amp-img{background-color: #2A2A2A}.heateor_sss_vertical_sharing{position: fixed;left:11px;z-index: 99999;}.heateor-total-share-count .sss_share_count{color:#666;font-size:23px;}.heateor-total-share-count .sss_share_lbl{color:#666;}.amp-wp-article-content .heateor_sss_vertical_sharing {left:5px;}amp-img.amp-wp-enforced-sizes[alt="Pinterest"]{background: #cc2329;border-radius: 50%;margin: 0 5px 0 0;}amp-img.amp-wp-enforced-sizes[alt="Viber"]{background: #8b628f;}amp-img.amp-wp-enforced-sizes[alt="Print"]{background: #fd6500;}amp-img.amp-wp-enforced-sizes[alt="Threema"]{background: #2a2a2a;}amp-img.amp-wp-enforced-sizes[alt="Pinterest"]{left:4px;}amp-img.amp-wp-enforced-sizes[alt="MySpace"]{background: #2a2a2a;}
includes/thirdparty-compatibility.php CHANGED
@@ -71,6 +71,10 @@ function ampforwp_thirdparty_compatibility(){
71
  if(class_exists('FinalTiles_Gallery')){
72
  add_filter('wp_is_mobile','ampforwp_final_tiles_grid_gallery');
73
  }
 
 
 
 
74
  $yoast_canonical = $yoast_canonical_post = $yoast_canonical_page = '';
75
  $yoast_canonical = get_option( 'wpseo_titles' );
76
  if(isset($yoast_canonical['noindex-post'])){
@@ -799,8 +803,11 @@ function ampforwp_seopress_social(){
799
  if ( '' == $url && has_post_thumbnail() ) {
800
  $url = get_the_post_thumbnail_url();
801
  }
802
- if (function_exists('attachment_url_to_postid')) {
803
  $image_id = attachment_url_to_postid( $url );
 
 
 
804
  if ( !$image_id ){
805
  return;
806
  }
@@ -1149,6 +1156,9 @@ function ampforwp_wp_optimize_iframe($content){
1149
  }
1150
  add_action('init','ampforwp_include_required_yoast_files');
1151
  function ampforwp_include_required_yoast_files(){
 
 
 
1152
  // Yoast SEO 14+ support helper class #4574
1153
  $include_file = $include_yoast_files = $include_yoast_premium_files= '';
1154
  $include_yoast_files = WP_PLUGIN_DIR . '/wordpress-seo/admin/class-meta-columns.php';
@@ -1208,6 +1218,9 @@ function ampforwp_is_amp_inURL($url){
1208
  if(get_option('permalink_structure') == '' && isset($_GET['amp'])){
1209
  return true;
1210
  }
 
 
 
1211
  $urlArray = explode("/", $url);
1212
  if( !in_array( AMPFORWP_AMP_QUERY_VAR , $urlArray ) ) {
1213
  return false;
71
  if(class_exists('FinalTiles_Gallery')){
72
  add_filter('wp_is_mobile','ampforwp_final_tiles_grid_gallery');
73
  }
74
+ if(class_exists('Getty_Images')){
75
+ add_filter( 'embed_oembed_html', 'ampforwp_get_gitty_image_embed',10,4);
76
+ add_filter( 'ampforwp_the_content_last_filter','ampforwp_getty_image_compatibility',10);
77
+ }
78
  $yoast_canonical = $yoast_canonical_post = $yoast_canonical_page = '';
79
  $yoast_canonical = get_option( 'wpseo_titles' );
80
  if(isset($yoast_canonical['noindex-post'])){
803
  if ( '' == $url && has_post_thumbnail() ) {
804
  $url = get_the_post_thumbnail_url();
805
  }
806
+ if (function_exists('attachment_url_to_postid') || has_post_thumbnail(ampforwp_get_the_ID()) ) {
807
  $image_id = attachment_url_to_postid( $url );
808
+ if(empty($image_id)){
809
+ $image_id = get_post_thumbnail_id( ampforwp_get_the_ID() );
810
+ }
811
  if ( !$image_id ){
812
  return;
813
  }
1156
  }
1157
  add_action('init','ampforwp_include_required_yoast_files');
1158
  function ampforwp_include_required_yoast_files(){
1159
+ if(class_exists('WPSEO_Premium') && defined('WPSEO_VERSION') && version_compare(WPSEO_VERSION,'15.8', '>=') && !method_exists('WPSEO_Meta_Columns', 'get_context_for_post_id')){
1160
+ return;
1161
+ }
1162
  // Yoast SEO 14+ support helper class #4574
1163
  $include_file = $include_yoast_files = $include_yoast_premium_files= '';
1164
  $include_yoast_files = WP_PLUGIN_DIR . '/wordpress-seo/admin/class-meta-columns.php';
1218
  if(get_option('permalink_structure') == '' && isset($_GET['amp'])){
1219
  return true;
1220
  }
1221
+ if (class_exists('AMPforWP_Subdomain_Endpoint') && ampforwp_get_setting('amp-subdomain-url-format')) {
1222
+ return true;
1223
+ }
1224
  $urlArray = explode("/", $url);
1225
  if( !in_array( AMPFORWP_AMP_QUERY_VAR , $urlArray ) ) {
1226
  return false;
includes/truepush-integration/amp-web-push-helper-frame.html CHANGED
@@ -2,7 +2,7 @@
2
  <html>
3
  <head>
4
  <meta charset="utf-8">
5
- <script src="https://sdki.truepush.com/sdk/v2.0.2/amp-helper-frame.js"></script>
6
  </head>
7
  <body>
8
  </body>
2
  <html>
3
  <head>
4
  <meta charset="utf-8">
5
+ <script src="https://sdki.truepush.com/sdk/v2.0.3/amp-helper-frame.js"></script>
6
  </head>
7
  <body>
8
  </body>
includes/truepush-integration/amp-web-push-permission-dialog.html CHANGED
@@ -253,7 +253,7 @@
253
  </div>
254
 
255
 
256
- <script src="https://sdki.truepush.com/sdk/v2.0.2/amp-permission-dialog.js"></script>
257
 
258
  </body>
259
 
253
  </div>
254
 
255
 
256
+ <script src="https://sdki.truepush.com/sdk/v2.0.3/amp-permission-dialog.js"></script>
257
 
258
  </body>
259
 
includes/updater/update.php CHANGED
@@ -257,7 +257,7 @@ function ampforwp_admin_notices() {
257
  }
258
  }
259
 
260
- function ampforwp_set_plugin_limit( $force=false, $license_data='', $data) {
261
 
262
  global $wp_version;
263
 
257
  }
258
  }
259
 
260
+ function ampforwp_set_plugin_limit( $force=false, $license_data='', $data = '') {
261
 
262
  global $wp_version;
263
 
includes/vendor/amp/includes/amp-post-template-actions.php CHANGED
@@ -99,7 +99,7 @@ function amp_post_template_add_boilerplate_css( $amp_template ) {
99
  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
100
  <?php
101
  }
102
- if(!function_exists('ampforwp_with_scheme_app_output') && !function_exists('saswp_schema_markup_output') && ( ampforwp_get_setting('ampforwp-seo-selection') != "rank_math" || ! ampforwp_get_setting('ampforwp-seo-rank_math-schema')) && ! class_exists('SQ_Classes_ObjController') ):
103
  add_action( 'amp_post_template_footer', 'AMPforWP\\AMPVendor\\amp_post_template_add_schemaorg_metadata' );
104
  function amp_post_template_add_schemaorg_metadata( $amp_template ) {
105
  $metadata = $amp_template->get( 'metadata' );
99
  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
100
  <?php
101
  }
102
+ if(ampforwp_get_setting('ampforwp-sd-switch') && !function_exists('ampforwp_with_scheme_app_output') && !function_exists('saswp_schema_markup_output') && ( ampforwp_get_setting('ampforwp-seo-selection') != "rank_math" || ! ampforwp_get_setting('ampforwp-seo-rank_math-schema')) && ! class_exists('SQ_Classes_ObjController') ):
103
  add_action( 'amp_post_template_footer', 'AMPforWP\\AMPVendor\\amp_post_template_add_schemaorg_metadata' );
104
  function amp_post_template_add_schemaorg_metadata( $amp_template ) {
105
  $metadata = $amp_template->get( 'metadata' );
includes/vendor/amp/includes/embeds/class-amp-facebook-embed.php CHANGED
@@ -51,7 +51,9 @@ class AMP_Facebook_Embed_Handler extends AMP_Base_Embed_Handler {
51
  'height' => $this->args['height'],
52
  );
53
  $attrs = ampforwp_amp_consent_check( $attrs );
54
-
 
 
55
  return AMP_HTML_Utils::build_tag('amp-facebook-page',$attrs);
56
  }
57
  }
51
  'height' => $this->args['height'],
52
  );
53
  $attrs = ampforwp_amp_consent_check( $attrs );
54
+ if(preg_match('/facebook(.*?)posts(.*?)/', $attrs['data-href'])){
55
+ return AMP_HTML_Utils::build_tag('amp-facebook',$attrs);
56
+ }
57
  return AMP_HTML_Utils::build_tag('amp-facebook-page',$attrs);
58
  }
59
  }
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -2653,6 +2653,7 @@ class AMP_Allowed_Tags_Generated {
2653
  'placeholder' => array(),
2654
  'poster' => array(),
2655
  'dock' => array(),
 
2656
  'preload' => array(
2657
  'value_regex' => '(none|metadata|auto|)',
2658
  ),
@@ -2895,6 +2896,7 @@ class AMP_Allowed_Tags_Generated {
2895
  '[data-videoid]' => array(),
2896
  '[dock]' => array(),
2897
  'autoplay' => array(),
 
2898
  'credentials' => array(
2899
  'value_regex_casei' => '(include|omit)',
2900
  ),
@@ -5057,6 +5059,8 @@ class AMP_Allowed_Tags_Generated {
5057
  array(
5058
  'attr_spec_list' => array(
5059
  'accept' => array(),
 
 
5060
  'accesskey' => array(),
5061
  'autocomplete' => array(),
5062
  'autofocus' => array(),
2653
  'placeholder' => array(),
2654
  'poster' => array(),
2655
  'dock' => array(),
2656
+ 'loop' => array(),
2657
  'preload' => array(
2658
  'value_regex' => '(none|metadata|auto|)',
2659
  ),
2896
  '[data-videoid]' => array(),
2897
  '[dock]' => array(),
2898
  'autoplay' => array(),
2899
+ 'loop' => array(),
2900
  'credentials' => array(
2901
  'value_regex_casei' => '(include|omit)',
2902
  ),
5059
  array(
5060
  'attr_spec_list' => array(
5061
  'accept' => array(),
5062
+ 'mask' => array(),
5063
+ 'mask-output' => array(),
5064
  'accesskey' => array(),
5065
  'autocomplete' => array(),
5066
  'autofocus' => array(),
includes/vendor/amp/includes/sanitizers/class-amp-base-sanitizer.php CHANGED
@@ -48,8 +48,9 @@ abstract class AMP_Base_Sanitizer {
48
  return $value;
49
  }
50
 
51
- if ( false !== filter_var( $value, FILTER_VALIDATE_INT ) ) {
52
- return absint( $value );
 
53
  }
54
 
55
  if ( AMP_String_Utils::endswith( $value, 'px' ) ) {
48
  return $value;
49
  }
50
 
51
+ // Accepts both integers and floats & prevents negative values #5005
52
+ if ( is_numeric( $value ) ) {
53
+ return max( 0, (float) $value );
54
  }
55
 
56
  if ( AMP_String_Utils::endswith( $value, 'px' ) ) {
includes/vendor/amp/includes/sanitizers/class-amp-video-sanitizer.php CHANGED
@@ -41,6 +41,8 @@ class AMP_Video_Sanitizer extends AMP_Base_Sanitizer {
41
  $new_attributes = $this->enforce_sizes_attribute( $new_attributes );
42
  if(ampforwp_get_setting('ampforwp-amp-video-docking')==true){
43
  $new_attributes['dock'] = '#dock-slot';
 
 
44
  }
45
  $new_node = AMP_DOM_Utils::create_node( $this->dom, 'amp-video', $new_attributes );
46
 
41
  $new_attributes = $this->enforce_sizes_attribute( $new_attributes );
42
  if(ampforwp_get_setting('ampforwp-amp-video-docking')==true){
43
  $new_attributes['dock'] = '#dock-slot';
44
+ $new_attributes['width'] = '500';
45
+ $new_attributes['layout'] = 'responsive';
46
  }
47
  $new_node = AMP_DOM_Utils::create_node( $this->dom, 'amp-video', $new_attributes );
48
 
includes/vendor/aq_resizer.php CHANGED
@@ -289,7 +289,7 @@ if(!function_exists('ampforwp_aq_resize')) {
289
  // Disable ampforwp_aq_resize and return images without compressing.
290
  // Useful for some who wants to disable when using CDN images
291
  $disable_aq_resize = false;
292
- if (function_exists('imagify_set_activation')) {
293
  $disable_aq_resize = true;
294
  }
295
  $disable_aq_resize = apply_filters('ampforwp_disable_aq_resize', $disable_aq_resize, $url);
289
  // Disable ampforwp_aq_resize and return images without compressing.
290
  // Useful for some who wants to disable when using CDN images
291
  $disable_aq_resize = false;
292
+ if (function_exists('imagify_set_activation') || function_exists('ud_check_stateless_media')) {
293
  $disable_aq_resize = true;
294
  }
295
  $disable_aq_resize = apply_filters('ampforwp_disable_aq_resize', $disable_aq_resize, $url);
pagebuilder/amp-page-builder.php CHANGED
@@ -128,7 +128,11 @@ function ampforwp_call_page_builder(){
128
  unset($backendRowSetting['front_common_css']);
129
  wp_nonce_field( basename( __FILE__) , 'amp_content_editor_nonce' );
130
 
131
- if(class_exists('WPSEO_Frontend') && true == ampforwp_get_setting('ampforwp-yoast-seo-analysis') && true == ampforwp_get_setting('ampforwp-amp-takeover') ) {
 
 
 
 
132
  $pb_content = get_post_field('amp-page-builder',$post->ID);
133
  ?>
134
  <script type="text/template" class="hide" id="amp-page-builder-ready"><?php echo stripcslashes( $pb_content ); ?></script>
128
  unset($backendRowSetting['front_common_css']);
129
  wp_nonce_field( basename( __FILE__) , 'amp_content_editor_nonce' );
130
 
131
+ $mob_pres_link = false;
132
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
133
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
134
+ }
135
+ if(class_exists('WPSEO_Frontend') && true == ampforwp_get_setting('ampforwp-yoast-seo-analysis') && (true == ampforwp_get_setting('ampforwp-amp-takeover') || $mob_pres_link == true) ) {
136
  $pb_content = get_post_field('amp-page-builder',$post->ID);
137
  ?>
138
  <script type="text/template" class="hide" id="amp-page-builder-ready"><?php echo stripcslashes( $pb_content ); ?></script>
pagebuilder/config/moduleTemplate.php CHANGED
@@ -60,7 +60,7 @@ if(!function_exists("ampforwp_module_templates")){
60
  }//If Fucntion check closed
61
 
62
  //Row Contents
63
- $output = '<section {{if_row_id}}id={{row_id}}{{ifend_row_id}} class="ap_m {{row_class}} {{grid_type}} {{if_condition_check_for_slant==1}}slant_clr{{ifend_condition_check_for_slant_1}}">
64
  {{if_condition_background_type==video}}
65
  <div class="amp_video">
66
  <div class="amp-txt">
@@ -88,6 +88,7 @@ $output = '<section {{if_row_id}}id={{row_id}}{{ifend_row_id}} class="ap_m {{row
88
  {{if_condition_enable_mp4video_autoplay==1}}autoplay{{ifend_condition_enable_mp4video_autoplay_1}}
89
  src="{{row_background_mp4video}}"
90
  layout="responsive"
 
91
  {{if_condition_enable_mp4video_controls==1}}controls{{ifend_condition_enable_mp4video_controls_1}}>
92
  </amp-video>
93
  {{if_condition_check_for_overlay==1}}
@@ -108,7 +109,7 @@ $output = '<section {{if_row_id}}id={{row_id}}{{ifend_row_id}} class="ap_m {{row
108
  {{if_condition_enable_modestbranding==1}}data-param-modestbranding="1"{{ifend_condition_enable_modestbranding_1}}
109
  {{if_condition_enable_youtube_rel==1}}data-param-rel="1"{{ifend_condition_enable_youtube_rel_1}}
110
  {{if_condition_enable_youtube_rel==0}}data-param-rel="0"{{ifend_condition_enable_youtube_rel_0}}
111
- {{if_condition_enable_youtube_loop==1}}data-param-playlist="{{row_background_youtubevideo}}"{{ifend_condition_enable_youtube_loop_1}}
112
  data-videoid="{{row_background_youtubevideo}}"
113
  {{if_condition_enable_youtube_autoplay==1}}autoplay{{ifend_condition_enable_youtube_autoplay_1}}>
114
  </amp-youtube>
@@ -448,7 +449,24 @@ $containerCommonSettings = array(
448
  'content_type'=>'css',
449
  'output_format'=>"color: %default%"
450
  ),
451
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
452
  array(
453
  'type' =>'select',
454
  'name' =>"background_type",
@@ -615,7 +633,7 @@ $containerCommonSettings = array(
615
  )
616
  ),
617
  'content_type'=>'html',
618
- 'required' => array('background_type'=> 'youtubevideo')
619
  ),
620
  array(
621
  'type' =>'checkbox_bool',
60
  }//If Fucntion check closed
61
 
62
  //Row Contents
63
+ $output = '<section {{if_row_id}}id={{row_id}}{{ifend_row_id}} class="ap_m {{row_class}} {{grid_type}} {{mobile_display}} {{if_condition_check_for_slant==1}}slant_clr{{ifend_condition_check_for_slant_1}}">
64
  {{if_condition_background_type==video}}
65
  <div class="amp_video">
66
  <div class="amp-txt">
88
  {{if_condition_enable_mp4video_autoplay==1}}autoplay{{ifend_condition_enable_mp4video_autoplay_1}}
89
  src="{{row_background_mp4video}}"
90
  layout="responsive"
91
+ {{if_condition_enable_youtube_loop==1}}loop{{ifend_condition_enable_youtube_loop_1}}
92
  {{if_condition_enable_mp4video_controls==1}}controls{{ifend_condition_enable_mp4video_controls_1}}>
93
  </amp-video>
94
  {{if_condition_check_for_overlay==1}}
109
  {{if_condition_enable_modestbranding==1}}data-param-modestbranding="1"{{ifend_condition_enable_modestbranding_1}}
110
  {{if_condition_enable_youtube_rel==1}}data-param-rel="1"{{ifend_condition_enable_youtube_rel_1}}
111
  {{if_condition_enable_youtube_rel==0}}data-param-rel="0"{{ifend_condition_enable_youtube_rel_0}}
112
+ {{if_condition_enable_youtube_loop==1}}loop{{ifend_condition_enable_youtube_loop_1}}
113
  data-videoid="{{row_background_youtubevideo}}"
114
  {{if_condition_enable_youtube_autoplay==1}}autoplay{{ifend_condition_enable_youtube_autoplay_1}}>
115
  </amp-youtube>
449
  'content_type'=>'css',
450
  'output_format'=>"color: %default%"
451
  ),
452
+ array(
453
+ 'type' => 'radio',
454
+ 'name' => "mobile_display",
455
+ 'label' => esc_html__('Mobile Display'),
456
+ 'tab' => 'customizer',
457
+ 'default' => 'stack',
458
+ 'options' => array(
459
+ array(
460
+ 'label'=> 'Stack',
461
+ 'value'=> 'stack',
462
+ ),
463
+ array(
464
+ 'label'=> 'Side By Side',
465
+ 'value'=> 'sbs',
466
+ ),
467
+ ),
468
+ 'content_type' => 'html',
469
+ ),
470
  array(
471
  'type' =>'select',
472
  'name' =>"background_type",
633
  )
634
  ),
635
  'content_type'=>'html',
636
+ 'required' => array('background_type'=> array('mp4video','youtubevideo'))
637
  ),
638
  array(
639
  'type' =>'checkbox_bool',
pagebuilder/inc/admin-amp-page-builder.css CHANGED
@@ -668,15 +668,16 @@ position: fixed;
668
  display: table-cell;
669
  vertical-align: middle;
670
  }
671
- .modal-header{
672
  background: #fff;
673
  width: 100%;
674
  z-index: 100;
675
  border-bottom: 1px solid #D8D8D8;
676
  position: relative;
677
  padding-left: 20px;
 
678
  }
679
- .modal-container {position: fixed;overflow: hidden;top:30px;left: 30px;right: 30px;bottom: 30px;z-index: 160000;overflow: hidden;min-height: 300px;box-shadow: 0 5px 15px rgba(0,0,0,.7);background: #fcfcfc;-webkit-font-smoothing: subpixel-antialiased;}
680
 
681
  .modal-header h3 {
682
  font-weight: normal;
668
  display: table-cell;
669
  vertical-align: middle;
670
  }
671
+ #amp-page-builder .modal-header{
672
  background: #fff;
673
  width: 100%;
674
  z-index: 100;
675
  border-bottom: 1px solid #D8D8D8;
676
  position: relative;
677
  padding-left: 20px;
678
+ padding-top: 0px;
679
  }
680
+ #amp-page-builder .modal-container {position: fixed;overflow: hidden;top:30px;left: 30px;right: 30px;bottom: 30px;z-index: 160000;overflow: hidden;min-height: 300px;box-shadow: 0 5px 15px rgba(0,0,0,.7);background: #fcfcfc;-webkit-font-smoothing: subpixel-antialiased;max-width: 1200px;}
681
 
682
  .modal-header h3 {
683
  font-weight: normal;
pagebuilder/inc/viewShowFrontData.php CHANGED
@@ -160,6 +160,7 @@ function amp_pagebuilder_content_styles(){
160
  .col-2{width:100%;float:none;margin-bottom:10%;}
161
  .col-2-wrap .col-2:nth-child(1){padding-right:0px;}
162
  .col-2-wrap .col-2:nth-child(2){padding-left:0px;}
 
163
  }
164
  ';
165
 
@@ -951,7 +952,7 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
951
  if(!is_array($replace)){
952
 
953
  if($field['type']=="upload"){
954
- $image_alt = $imageUrl = $imageWidth = $imageHeight = $image_caption = '';
955
  if(isset($contentArray[$field['name']."_image_data"])){
956
  $replace= $contentArray[$field['name']."_image_data"];
957
  $imageUrl = $replace[0];
@@ -959,6 +960,7 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
959
  $imageHeight = $replace[2];
960
  $image_alt = (isset($replace['alt'])? $replace['alt']: "");
961
  $image_caption = (isset($replace['caption'])? $replace['caption']: "");
 
962
  }elseif( $replace != "" ){
963
  $imageDetails = ampforwp_get_attachment_id( $replace);
964
  if(is_array($imageDetails)){
@@ -1009,6 +1011,16 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
1009
  ),
1010
  $moduleFrontHtml
1011
  );
 
 
 
 
 
 
 
 
 
 
1012
  $moduleFrontHtml = ampforwp_replaceIfContentConditional('image_alt', $image_alt, $moduleFrontHtml);
1013
  $moduleFrontHtml = str_replace(
1014
  array('{{image_caption}}',
160
  .col-2{width:100%;float:none;margin-bottom:10%;}
161
  .col-2-wrap .col-2:nth-child(1){padding-right:0px;}
162
  .col-2-wrap .col-2:nth-child(2){padding-left:0px;}
163
+ .sbs .col-2{width: calc(50% - 5px);float: left;margin:2px;}
164
  }
165
  ';
166
 
952
  if(!is_array($replace)){
953
 
954
  if($field['type']=="upload"){
955
+ $image_alt = $imageUrl = $imageWidth = $imageHeight = $image_caption = $image_srcset = '';
956
  if(isset($contentArray[$field['name']."_image_data"])){
957
  $replace= $contentArray[$field['name']."_image_data"];
958
  $imageUrl = $replace[0];
960
  $imageHeight = $replace[2];
961
  $image_alt = (isset($replace['alt'])? $replace['alt']: "");
962
  $image_caption = (isset($replace['caption'])? $replace['caption']: "");
963
+ $image_srcset = $replace[0];
964
  }elseif( $replace != "" ){
965
  $imageDetails = ampforwp_get_attachment_id( $replace);
966
  if(is_array($imageDetails)){
1011
  ),
1012
  $moduleFrontHtml
1013
  );
1014
+ $moduleFrontHtml = str_replace(
1015
+ array('{{image_srcset}}',
1016
+ '{{image_srcset_'.$field['name'].'}}'
1017
+ ),
1018
+ array($image_srcset,
1019
+ $image_srcset
1020
+ ),
1021
+ $moduleFrontHtml
1022
+ );
1023
+ $moduleFrontHtml = ampforwp_replaceIfContentConditional('image_srcset', $image_srcset, $moduleFrontHtml);
1024
  $moduleFrontHtml = ampforwp_replaceIfContentConditional('image_alt', $image_alt, $moduleFrontHtml);
1025
  $moduleFrontHtml = str_replace(
1026
  array('{{image_caption}}',
pagebuilder/modules/contact-form-shortcode-module.php CHANGED
@@ -32,6 +32,7 @@ if(is_plugin_active('amp-cf7/amp-cf7.php')){
32
  $cf7formArray = array();
33
  if(count($form_titles)>0){
34
  foreach ($form_titles as $key => $formName) {
 
35
  $cf7formArray[$form_id[$key]] = $formName;
36
  }
37
  }
32
  $cf7formArray = array();
33
  if(count($form_titles)>0){
34
  foreach ($form_titles as $key => $formName) {
35
+ $formName = esc_html($formName);
36
  $cf7formArray[$form_id[$key]] = $formName;
37
  }
38
  }
pagebuilder/modules/contents-module.php CHANGED
@@ -386,18 +386,22 @@ if ( is_admin() ) {
386
  $ampforwp_show_excerpt = (isset($fieldValues['ampforwp_show_excerpt'])? $fieldValues['ampforwp_show_excerpt']: 'yes');
387
  $ampforwp_excerpt_length = (isset($fieldValues['ampforwp_excerpt_length'])? $fieldValues['ampforwp_excerpt_length']: 15);
388
  $ampforwp_excerpt_length = (int) $ampforwp_excerpt_length;
389
-
 
 
 
390
  if ( $the_query->have_posts() ) {
391
  while ( $the_query->have_posts() ) {
392
  $the_query->the_post();
393
  $ampforwp_post_url = get_permalink();
394
- if(ampforwp_get_setting('ampforwp-amp-takeover') == true){
395
  $ampforwp_post_url = user_trailingslashit($ampforwp_post_url);
396
  }else if(true == ampforwp_get_setting('amp-core-end-point')){
397
  $ampforwp_post_url = user_trailingslashit($ampforwp_post_url);
398
  $ampforwp_post_url = add_query_arg( 'amp', '', $ampforwp_post_url);
399
  }else{
400
  $ampforwp_post_url = user_trailingslashit($ampforwp_post_url) . AMPFORWP_AMP_QUERY_VAR;
 
401
  }
402
  $image = $height = $width = $image_alt = $image_srcset = "";
403
  if ( has_post_thumbnail() ) {
386
  $ampforwp_show_excerpt = (isset($fieldValues['ampforwp_show_excerpt'])? $fieldValues['ampforwp_show_excerpt']: 'yes');
387
  $ampforwp_excerpt_length = (isset($fieldValues['ampforwp_excerpt_length'])? $fieldValues['ampforwp_excerpt_length']: 15);
388
  $ampforwp_excerpt_length = (int) $ampforwp_excerpt_length;
389
+ $mob_pres_link = false;
390
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
391
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
392
+ }
393
  if ( $the_query->have_posts() ) {
394
  while ( $the_query->have_posts() ) {
395
  $the_query->the_post();
396
  $ampforwp_post_url = get_permalink();
397
+ if(ampforwp_get_setting('ampforwp-amp-takeover') == true || $mob_pres_link == true){
398
  $ampforwp_post_url = user_trailingslashit($ampforwp_post_url);
399
  }else if(true == ampforwp_get_setting('amp-core-end-point')){
400
  $ampforwp_post_url = user_trailingslashit($ampforwp_post_url);
401
  $ampforwp_post_url = add_query_arg( 'amp', '', $ampforwp_post_url);
402
  }else{
403
  $ampforwp_post_url = user_trailingslashit($ampforwp_post_url) . AMPFORWP_AMP_QUERY_VAR;
404
+ $ampforwp_post_url = user_trailingslashit($ampforwp_post_url);
405
  }
406
  $image = $height = $width = $image_alt = $image_srcset = "";
407
  if ( has_post_thumbnail() ) {
pagebuilder/modules/image-mod-module.php CHANGED
@@ -3,7 +3,7 @@
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
  $output = '
5
  {{if_condition_img_hyperlink==1}}<a href="{{hyperlink_link_img}}" {{if_condition_img_link_open==new_page}}target="_blank"{{ifend_condition_img_link_open_new_page}}>{{ifend_condition_img_hyperlink_1}}
6
- {{if_img_upload}}<figure><amp-img src="{{img_upload}}" {{if_id}}id="{{id}}"{{ifend_id}} width="{{image_width}}" height="{{image_height}}" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}" class="{{user_class}}"></amp-img>{{if_condition_image_caption==1}}<figcaption><center>{{image_caption}}</center></figcaption>{{ifend_condition_image_caption_1}}</figure>{{ifend_img_upload}}
7
  {{if_condition_img_hyperlink==1}}</a>{{ifend_condition_img_hyperlink_1}}';
8
 
9
  $css = '
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
  $output = '
5
  {{if_condition_img_hyperlink==1}}<a href="{{hyperlink_link_img}}" {{if_condition_img_link_open==new_page}}target="_blank"{{ifend_condition_img_link_open_new_page}}>{{ifend_condition_img_hyperlink_1}}
6
+ {{if_img_upload}}<figure><amp-img src="{{img_upload}}" {{if_id}}id="{{id}}"{{ifend_id}} width="{{image_width}}" height="{{image_height}}" srcset="{{image_srcset}}" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}" class="{{user_class}}"></amp-img>{{if_condition_image_caption==1}}<figcaption><center>{{image_caption}}</center></figcaption>{{ifend_condition_image_caption_1}}</figure>{{ifend_img_upload}}
7
  {{if_condition_img_hyperlink==1}}</a>{{ifend_condition_img_hyperlink_1}}';
8
 
9
  $css = '
pagebuilder/modules/slider-mod-module.php CHANGED
@@ -5,7 +5,7 @@ $output = '
5
  <div {{if_id}}id="{{id}}"{{ifend_id}} class="{{user_class}}">
6
  {{if_condition_carousel_layout_type==1}}
7
  <amp-carousel {{if_condition_lightbox_gallery==1}} lightbox {{ifend_condition_lightbox_gallery_1}}
8
- width="400" height="300" layout="responsive" type="slides" autoplay delay="{{delay}}">
9
  {{repeater_image}}
10
  </amp-carousel>
11
  {{ifend_condition_carousel_layout_type_1}}
@@ -103,6 +103,20 @@ return array(
103
  ),
104
  'content_type'=>'html',
105
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  array(
107
  'type' =>'checkbox_bool',
108
  'name' =>"lightbox_gallery",
5
  <div {{if_id}}id="{{id}}"{{ifend_id}} class="{{user_class}}">
6
  {{if_condition_carousel_layout_type==1}}
7
  <amp-carousel {{if_condition_lightbox_gallery==1}} lightbox {{ifend_condition_lightbox_gallery_1}}
8
+ width="400" height="300" layout="responsive" type="slides" {{if_condition_slider_autoplay==1}} autoplay {{ifend_condition_slider_autoplay_1}} controls delay="{{delay}}">
9
  {{repeater_image}}
10
  </amp-carousel>
11
  {{ifend_condition_carousel_layout_type_1}}
103
  ),
104
  'content_type'=>'html',
105
  ),
106
+ array(
107
+ 'type' => 'checkbox_bool',
108
+ 'name' => "slider_autoplay",
109
+ 'tab' => 'customizer',
110
+ 'label' => 'Autoplay',
111
+ 'default' => 1,
112
+ 'content_type'=> 'html',
113
+ 'options' => array(
114
+ array(
115
+ 'label'=>esc_html__('Autoplay','accelerated-mobile-pages'),
116
+ 'value'=>1,
117
+ ),
118
+ ),
119
+ ),
120
  array(
121
  'type' =>'checkbox_bool',
122
  'name' =>"lightbox_gallery",
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
- Tested up to: 5.6
7
- Stable tag: 1.0.76
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,25 +190,22 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
193
- = 1.0.76 (9th February 2021) =
194
- * Improvement: The SEO Checklist Banner #4912
195
- * Fixed: Telegram icon not visible in menu #4919
196
- * Fixed: Validation error in amp-img with transposh plugin #4918
197
- * Fixed: Fatal error when FIFU plugin is activate #4920
198
- * Fixed: AMP admin option panel is showing blank on user end #4914
199
- * Fixed: Tag base remove in AMP not working after 1.0.60 #4908
200
- * Fixed: data-playlist gets removed automatically in amp-brid-player #4906
201
- * Fixed: View Non-Amp Version link does not link to proper canonical url #4901
202
- * Fixed: Srcset not loading in category module of AMP page builder #4900
203
- * Fixed: Debug warnings #4917
204
-
205
- = 1.0.75 (23rd January 2021) =
206
- * Fixed: Imgur embed code not working in AMP #4899
207
- * Fixed: Srcset not loading in category module of AMP page builder #4900
208
- * Fixed: Advertising section displaying blank when AdsforWP plugin is active #4889
209
- * Fixed: AMP Page Builder not working on the pages and posts except the homepage #4890
210
- * Fixed: Swift 2nd header menu aligned towards right with polylang plugin #4893
211
- * Fixed: Post Pagination not working after 1.0.69 version #4902
212
- * Fixed: Debug warnings #4896
213
 
214
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
+ Tested up to: 5.7
7
+ Stable tag: 1.0.77
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
190
 
191
  == Changelog ==
192
 
193
+ = 1.0.77 (17th May 2021) =
194
+ * Fixed: Related posts doesn't show more than 3-4 #4300
195
+
196
+ = 1.0.76.17 (7th May 2021) =
197
+ * Improvements: Added Beaver builder Pagebuilder Support in AMP Pagebuilder Extension #5009
198
+ * Fixed: Title on Static Front Page is not displaying #5007
199
+ * Fixed: The attribute 'height' in tag 'amp-img' is set to the invalid value. #5005
200
+ * Fixed: ?amp doesn’t removing from view non-amp text #5006
201
+ * Fixed: Errors in Schema Pro FAQ #4956
202
+ * Fixed: PHP Warning error when enable Breadcrumbs option #5008
203
+
204
+ = 1.0.76.16 (4th May 2021) =
205
+ * Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
206
+ * Fixed: Slide Anything Plugin text slider not working in AMP #4999
207
+ * Fixed: Backend button translation #4717
208
+ * Fixed: Alignment issue with Gutenberg image block #4997
209
+ * Fixed: Undefined variable $q / Attempt to read property max_num_pages on null #5004
 
 
 
210
 
211
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-1/elements/related-posts.php CHANGED
@@ -47,7 +47,6 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2) {
47
  'fields'=>'ids',
48
  'category__in' => $category_ids,
49
  'posts_per_page' => $int_number_of_related_posts,
50
- 'post__not_in' => array($post->ID),
51
  'ignore_sticky_posts'=> 1,
52
  'has_password' => false ,
53
  'post_status' => 'publish',
@@ -55,10 +54,10 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2) {
55
  'no_found_rows' => true,
56
  'meta_query' => array(
57
  array(
58
- 'key' => 'ampforwp-amp-on-off',
59
- 'value' => 'default',
60
  )
61
- )
62
  );
63
  }
64
  } //end of block for categories
@@ -81,9 +80,9 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
81
  'no_found_rows' => true,
82
  'meta_query' => array(
83
  array(
84
- 'key' => 'ampforwp-amp-on-off',
85
- 'value' => 'default',
86
- )
87
  )
88
  );
89
  }
@@ -104,7 +103,7 @@ if ( isset($redux_builder_amp['ampforwp-related-posts-days-switch']) && true ==
104
  if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] && $redux_builder_amp['ampforwp-single-select-type-of-related'] ){
105
  $args = apply_filters('ampforwp_related_posts_query_args', $args);
106
  $my_query = new wp_query( $args );
107
- if( $my_query->have_posts() ) { ?>
108
  <div class="amp-wp-content relatedpost">
109
  <div class="rp">
110
  <span><?php
@@ -115,21 +114,25 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
115
  }?></span>
116
  <ol class="clearfix">
117
  <?php
118
-
119
  while( $my_query->have_posts() ) {
120
- $my_query->the_post();
 
 
 
121
 
122
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
123
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
124
  $related_post_permalink = get_permalink();
125
  }
 
126
  ?>
127
  <li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
128
  <?php if ( ampforwp_has_post_thumbnail() ) {
129
  if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
130
  $width = 150;
131
  $height = 150;
132
- $image_args = array("tag"=>'div','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height,'responsive'=> 'true' );
133
  amp_loop_image($image_args);
134
  }
135
  }?>
47
  'fields'=>'ids',
48
  'category__in' => $category_ids,
49
  'posts_per_page' => $int_number_of_related_posts,
 
50
  'ignore_sticky_posts'=> 1,
51
  'has_password' => false ,
52
  'post_status' => 'publish',
54
  'no_found_rows' => true,
55
  'meta_query' => array(
56
  array(
57
+ 'key' => 'ampforwp-amp-on-off',
58
+ 'value' => 'default',
59
  )
60
+ )
61
  );
62
  }
63
  } //end of block for categories
80
  'no_found_rows' => true,
81
  'meta_query' => array(
82
  array(
83
+ 'key' => 'ampforwp-amp-on-off',
84
+ 'value' => 'default',
85
+ )
86
  )
87
  );
88
  }
103
  if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_builder_amp['ampforwp-single-related-posts-switch'] && $redux_builder_amp['ampforwp-single-select-type-of-related'] ){
104
  $args = apply_filters('ampforwp_related_posts_query_args', $args);
105
  $my_query = new wp_query( $args );
106
+ if( $my_query->have_posts() ) {?>
107
  <div class="amp-wp-content relatedpost">
108
  <div class="rp">
109
  <span><?php
114
  }?></span>
115
  <ol class="clearfix">
116
  <?php
117
+ $current_id = ampforwp_get_the_ID();
118
  while( $my_query->have_posts() ) {
119
+ $my_query->the_post();
120
+ if(ampforwp_get_the_ID()==$current_id){
121
+ continue;
122
+ }
123
 
124
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
125
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
126
  $related_post_permalink = get_permalink();
127
  }
128
+ $related_post_permalink = ampforwp_modify_url_utm_params($related_post_permalink);
129
  ?>
130
  <li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
131
  <?php if ( ampforwp_has_post_thumbnail() ) {
132
  if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
133
  $width = 150;
134
  $height = 150;
135
+ $image_args = array("tag"=>'div','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height,'responsive'=> 'true','referer'=>"related_post" );
136
  amp_loop_image($image_args);
137
  }
138
  }?>
templates/design-manager/design-1/single.php CHANGED
@@ -16,14 +16,11 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  </style>
17
  </head>
18
  <?php
19
- $lightbox = $right_click = '';
20
  if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
21
  $lightbox = 'data-amp-auto-lightbox-disable ';
22
- }
23
- if( true == ampforwp_get_setting('ampforwp-right-click-disable') ){
24
- $right_click = 'oncontextmenu="return false"';
25
- }?>
26
- <body <?php echo sanitize_text_field($right_click); ?> <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('single-post design_1_wrapper');?>>
27
  <?php do_action('ampforwp_body_beginning', $this); ?>
28
  <?php $this->load_parts( array( 'header-bar' ) ); ?>
29
  <?php do_action( 'below_the_header_design_1', $this ); ?>
16
  </style>
17
  </head>
18
  <?php
19
+ $lightbox = '';
20
  if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
21
  $lightbox = 'data-amp-auto-lightbox-disable ';
22
+ }?>
23
+ <body <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('single-post design_1_wrapper');?>>
 
 
 
24
  <?php do_action('ampforwp_body_beginning', $this); ?>
25
  <?php $this->load_parts( array( 'header-bar' ) ); ?>
26
  <?php do_action( 'below_the_header_design_1', $this ); ?>
templates/design-manager/design-2/archive.php CHANGED
@@ -157,7 +157,7 @@ if ( ! defined( 'ABSPATH' ) ) {
157
  <?php do_action('ampforwp_loop_before_pagination') ?>
158
  <div class="amp-wp-content pagination-holder">
159
  <div id="pagination">
160
- <?php if ( get_next_posts_link('next', $q->max_num_pages) ){ ?><div class="next"><?php echo apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' ).'&raquo;', 0), $paged);?></div><?php }?>
161
  <?php if ( get_previous_posts_link() ){ ?><div class="prev"><?php echo apply_filters( 'ampforwp_previous_posts_link', get_previous_posts_link( '&laquo; '. ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' )), $paged ); ?></div><?php }?>
162
  <div class="clearfix"></div>
163
  </div>
157
  <?php do_action('ampforwp_loop_before_pagination') ?>
158
  <div class="amp-wp-content pagination-holder">
159
  <div id="pagination">
160
+ <?php $paged = get_query_var('paged'); if ( get_next_posts_link() ){ ?><div class="next"><?php echo apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' ).'&raquo;', 0), $paged);?></div><?php }?>
161
  <?php if ( get_previous_posts_link() ){ ?><div class="prev"><?php echo apply_filters( 'ampforwp_previous_posts_link', get_previous_posts_link( '&laquo; '. ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' )), $paged ); ?></div><?php }?>
162
  <div class="clearfix"></div>
163
  </div>
templates/design-manager/design-2/elements/bread-crumbs.php CHANGED
@@ -117,7 +117,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
117
  // Get parent any categories and create array
118
  $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, '>'),'>');
119
  if(class_exists( 'WPSEO_Options' )){
120
- $primary_cateogory = get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_primary_category', true);
121
  if(isset($primary_cateogory) && $primary_cateogory!=""){
122
  $pcname = get_the_category_by_ID($primary_cateogory);
123
  $category_name = $pcname;
117
  // Get parent any categories and create array
118
  $get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, '>'),'>');
119
  if(class_exists( 'WPSEO_Options' )){
120
+ $primary_cateogory = (string) get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_primary_category', true);
121
  if(isset($primary_cateogory) && $primary_cateogory!=""){
122
  $pcname = get_the_category_by_ID($primary_cateogory);
123
  $category_name = $pcname;
templates/design-manager/design-2/elements/related-posts.php CHANGED
@@ -47,18 +47,17 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
47
  'fields'=>'ids',
48
  'category__in' => $category_ids,
49
  'posts_per_page' => $int_number_of_related_posts,
50
- 'post__not_in' => array($post->ID),
51
  'ignore_sticky_posts'=> 1,
52
  'has_password' => false ,
53
  'post_status' => 'publish',
54
  'orderby' => $orderby,
55
  'no_found_rows' => true,
56
  'meta_query' => array(
57
- array(
58
- 'key' => 'ampforwp-amp-on-off',
59
- 'value' => 'default',
60
- )
61
- )
62
  );
63
  }
64
  } //end of block for categories
@@ -80,9 +79,9 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
80
  'no_found_rows' => true,
81
  'meta_query' => array(
82
  array(
83
- 'key' => 'ampforwp-amp-on-off',
84
- 'value' => 'default',
85
- )
86
  )
87
  );
88
  }
@@ -115,20 +114,24 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
115
  } ?></span>
116
  <ol class="clearfix">
117
  <?php
118
-
119
  while( $my_query->have_posts() ) {
120
  $my_query->the_post();
121
-
 
 
122
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
123
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
124
  $related_post_permalink = get_permalink();
125
- } ?>
 
 
126
  <li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
127
  <?php if ( ampforwp_has_post_thumbnail() ) {
128
  if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
129
  $width = 150;
130
  $height = 150;
131
- $image_args = array("tag"=>'div','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height,'responsive'=> 'true' );
132
  amp_loop_image($image_args);
133
  }
134
  }?>
47
  'fields'=>'ids',
48
  'category__in' => $category_ids,
49
  'posts_per_page' => $int_number_of_related_posts,
 
50
  'ignore_sticky_posts'=> 1,
51
  'has_password' => false ,
52
  'post_status' => 'publish',
53
  'orderby' => $orderby,
54
  'no_found_rows' => true,
55
  'meta_query' => array(
56
+ array(
57
+ 'key' => 'ampforwp-amp-on-off',
58
+ 'value' => 'default',
59
+ )
60
+ )
61
  );
62
  }
63
  } //end of block for categories
79
  'no_found_rows' => true,
80
  'meta_query' => array(
81
  array(
82
+ 'key' => 'ampforwp-amp-on-off',
83
+ 'value' => 'default',
84
+ )
85
  )
86
  );
87
  }
114
  } ?></span>
115
  <ol class="clearfix">
116
  <?php
117
+ $current_id = ampforwp_get_the_ID();
118
  while( $my_query->have_posts() ) {
119
  $my_query->the_post();
120
+ if(ampforwp_get_the_ID()==$current_id){
121
+ continue;
122
+ }
123
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
124
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
125
  $related_post_permalink = get_permalink();
126
+ }
127
+ $related_post_permalink = ampforwp_modify_url_utm_params($related_post_permalink);
128
+ ?>
129
  <li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
130
  <?php if ( ampforwp_has_post_thumbnail() ) {
131
  if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
132
  $width = 150;
133
  $height = 150;
134
+ $image_args = array("tag"=>'div','image_size'=>'full','image_crop'=>'true','image_crop_width'=>$width,'image_crop_height'=>$height,'responsive'=> 'true','referer'=>"related_post" );
135
  amp_loop_image($image_args);
136
  }
137
  }?>
templates/design-manager/design-2/single.php CHANGED
@@ -17,14 +17,11 @@ if ( ! defined( 'ABSPATH' ) ) {
17
  </style>
18
  </head>
19
  <?php
20
- $lightbox = $right_click = '';
21
  if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
22
  $lightbox = 'data-amp-auto-lightbox-disable ';
23
- }
24
- if( true == ampforwp_get_setting('ampforwp-right-click-disable') ){
25
- $right_click = 'oncontextmenu="return false"';
26
- }?>
27
- <body <?php echo sanitize_text_field($right_click); ?> <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('single-post design_2_wrapper');?> >
28
  <?php do_action('ampforwp_body_beginning', $this); ?>
29
  <?php $this->load_parts( array( 'header-bar' ) ); ?>
30
 
17
  </style>
18
  </head>
19
  <?php
20
+ $lightbox = '';
21
  if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
22
  $lightbox = 'data-amp-auto-lightbox-disable ';
23
+ }?>
24
+ <body <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('single-post design_2_wrapper');?> >
 
 
 
25
  <?php do_action('ampforwp_body_beginning', $this); ?>
26
  <?php $this->load_parts( array( 'header-bar' ) ); ?>
27
 
templates/design-manager/design-3/elements/related-posts.php CHANGED
@@ -47,19 +47,18 @@ if(ampforwp_get_setting('ampforwp-single-select-type-of-related')==2){
47
  $args=array(
48
  'fields'=>'ids',
49
  'category__in' => $category_ids,
50
- 'posts_per_page' => $int_number_of_related_posts,
51
- 'post__not_in' => array($post->ID),
52
  'ignore_sticky_posts'=> 1,
53
  'has_password' => false ,
54
  'post_status' => 'publish',
55
  'no_found_rows' => true,
56
  'orderby' => $orderby,
57
  'meta_query' => array(
58
- array(
59
- 'key' => 'ampforwp-amp-on-off',
60
- 'value' => 'default',
61
- )
62
- )
63
  );
64
  }
65
  } //end of block for categories
@@ -117,15 +116,19 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
117
  } ?></span>
118
  <ol class="clearfix">
119
  <?php
120
-
121
  while( $my_query->have_posts() ) {
122
  $my_query->the_post();
123
-
 
 
124
  $related_post_permalink = "";
125
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
126
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
127
  $related_post_permalink = get_permalink();
128
- } ?>
 
 
129
  <li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
130
  <div class="related-post_image">
131
  <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
47
  $args=array(
48
  'fields'=>'ids',
49
  'category__in' => $category_ids,
50
+ 'posts_per_page' => $int_number_of_related_posts,
 
51
  'ignore_sticky_posts'=> 1,
52
  'has_password' => false ,
53
  'post_status' => 'publish',
54
  'no_found_rows' => true,
55
  'orderby' => $orderby,
56
  'meta_query' => array(
57
+ array(
58
+ 'key' => 'ampforwp-amp-on-off',
59
+ 'value' => 'default',
60
+ )
61
+ )
62
  );
63
  }
64
  } //end of block for categories
116
  } ?></span>
117
  <ol class="clearfix">
118
  <?php
119
+ $current_id = ampforwp_get_the_ID();
120
  while( $my_query->have_posts() ) {
121
  $my_query->the_post();
122
+ if(ampforwp_get_the_ID()==$current_id){
123
+ continue;
124
+ }
125
  $related_post_permalink = "";
126
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
127
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
128
  $related_post_permalink = get_permalink();
129
+ }
130
+ $related_post_permalink = ampforwp_modify_url_utm_params($related_post_permalink);
131
+ ?>
132
  <li class="<?php if ( ampforwp_has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
133
  <div class="related-post_image">
134
  <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
templates/design-manager/design-3/header-bar.php CHANGED
@@ -90,7 +90,7 @@ if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforw
90
  </ul>
91
  </div>
92
  </div>
93
- <button class="cl-btn" on='tap:sidebar.toggle' tabindex="-1"></button>
94
  </amp-sidebar>
95
  <?php } ?>
96
  <div id="designthree" class="designthree main_container">
90
  </ul>
91
  </div>
92
  </div>
93
+ <div on='tap:sidebar.toggle' role="button" class="cl-btn" tabindex="initial"></div>
94
  </amp-sidebar>
95
  <?php } ?>
96
  <div id="designthree" class="designthree main_container">
templates/design-manager/design-3/single.php CHANGED
@@ -17,14 +17,11 @@ if ( ! defined( 'ABSPATH' ) ) {
17
  </style>
18
  </head>
19
  <?php
20
- $lightbox = $right_click = '';
21
  if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
22
  $lightbox = 'data-amp-auto-lightbox-disable ';
23
- }
24
- if( true == ampforwp_get_setting('ampforwp-right-click-disable') ){
25
- $right_click = 'oncontextmenu="return false"';
26
- }?>
27
- <body <?php echo sanitize_text_field($right_click); ?><?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('design_3_wrapper');?> >
28
  <?php do_action('ampforwp_body_beginning', $this); ?>
29
  <?php $this->load_parts( array( 'header-bar' ) ); ?>
30
 
17
  </style>
18
  </head>
19
  <?php
20
+ $lightbox = '';
21
  if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
22
  $lightbox = 'data-amp-auto-lightbox-disable ';
23
+ }?>
24
+ <body <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('design_3_wrapper');?> >
 
 
 
25
  <?php do_action('ampforwp_body_beginning', $this); ?>
26
  <?php $this->load_parts( array( 'header-bar' ) ); ?>
27
 
templates/design-manager/design-3/style.php CHANGED
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  /* Global Styling */
39
  body{
40
  font-size: 16px;
41
- line-height:1.6;
42
  }
43
  body, amp-sidebar, .single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6, h2.amp-wp-title , h3.amp-wp-title, .cmt-button-wrapper a, h1.amp-wp-title, .single-post main,.related-title,.single-post .cmts_list h3, .rp .related_link a{
44
  <?php $fontFamily = "font-family: sans-serif;"; ?>
38
  /* Global Styling */
39
  body{
40
  font-size: 16px;
41
+ line-height:1.4;
42
  }
43
  body, amp-sidebar, .single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6, h2.amp-wp-title , h3.amp-wp-title, .cmt-button-wrapper a, h1.amp-wp-title, .single-post main,.related-title,.single-post .cmts_list h3, .rp .related_link a{
44
  <?php $fontFamily = "font-family: sans-serif;"; ?>
templates/design-manager/swift/footer.php CHANGED
@@ -117,7 +117,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
117
  <?php if(ampforwp_get_setting('enable-single-facebook-share')){
118
  $facebook_icon = '';
119
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
120
- $facebook_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDg2LjAzNyAxMDA3IiBmaWxsPSIjZmZmZmZmIiA+PHBhdGggZD0iTTEyNCAxMDA1VjUzNkgwVjM2N2gxMjRWMjIzQzEyNCAxMTAgMTk3IDUgMzY2IDVjNjggMCAxMTkgNyAxMTkgN2wtNCAxNThzLTUyLTEtMTA4LTFjLTYxIDAtNzEgMjgtNzEgNzV2MTIzaDE4M2wtOCAxNjlIMzAydjQ2OUgxMjMiPjwvcGF0aD48L3N2Zz4=" width="16" height="16" ></amp-img>';
121
  }
122
 
123
  ?>
@@ -142,7 +142,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
142
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.'';
143
  $twitter_icon = '';
144
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
145
- $twitter_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNjQwLjAxNzEgNjAxLjA4NjkiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMCA1MzAuMTU1YzEwLjQyIDEuMDE1IDIwLjgyNiAxLjU0OCAzMS4yMiAxLjU0OCA2MS4wNSAwIDExNS41MjgtMTguNzMgMTYzLjM4Ny01Ni4xNy0yOC40MjQtLjM1Mi01My45MzMtOS4wNC03Ni40NzctMjYuMDQzLTIyLjU3LTE2Ljk5LTM3Ljk4NC0zOC42NzUtNDYuM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k2IDMyLjA2NS00Ni4wNSA2MC42Mi03NS4xOSA4NS41Ny0yOS4xMjYgMjQuOTc2LTY0LjA4IDQ0Ljg1My0xMDQuODUgNTkuNTktNDAuNzU0IDE0Ljc1My04NC41NTMgMjIuMDktMTMxLjM5NyAyMi4wOUMxMjguODYyIDU4OC45NCA2MS43NCA1NjkuMzUgMCA1MzAuMTU0eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16"></amp-img>';}
146
  ?>
147
  <li>
148
  <a title="twitter share" class="s_tw" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>"><?php echo $twitter_icon; ?>
@@ -152,7 +152,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
152
  <?php if(ampforwp_get_setting('enable-single-email-share')){
153
  $email_icon = '';
154
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
155
- $email_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgODk2IDEwMjYiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMCAxOTN2NjQwaDg5NlYxOTNIMHptNzY4IDY0TDQ0OCA1MjEgMTI4IDI1N2g2NDB6TTY0IDMyMWwyNTIuMDMgMTkxLjYyNUw2NCA3MDVWMzIxem02NCA0NDhsMjU0LTIwNi4yNUw0NDggNjEzbDY1Ljg3NS01MC4xMjVMNzY4IDc2OUgxMjh6bTcwNC02NEw1NzkuNjI1IDUxMi45MzggODMyIDMyMXYzODR6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" ></amp-img>';
156
  }
157
 
158
  ?>
@@ -164,7 +164,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
164
  $image = '';
165
  $pinterest_icon = '';
166
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
167
- $pinterest_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNOC42MTcgMTMuMjI3QzguMDkgMTUuOTggNy40NSAxOC42MiA1LjU1IDIwYy0uNTg3LTQuMTYyLjg2LTcuMjg3IDEuNTMzLTEwLjYwNS0xLjE0Ny0xLjkzLjEzOC01LjgxMiAyLjU1NS00Ljg1NSAyLjk3NSAxLjE3Ni0yLjU3NiA3LjE3MiAxLjE1IDcuOTIyIDMuODkuNzggNS40OC02Ljc1IDMuMDY2LTkuMkMxMC4zNy0uMjc0IDMuNzA4IDMuMTggNC41MjggOC4yNDZjLjIgMS4yMzggMS40NzggMS42MTMuNTEgMy4zMjItMi4yMy0uNDk0LTIuODk2LTIuMjU0LTIuODEtNC42LjEzOC0zLjg0IDMuNDUtNi41MjcgNi43Ny02LjkgNC4yMDItLjQ3IDguMTQ1IDEuNTQzIDguNjkgNS40OTQuNjEzIDQuNDYyLTEuODk2IDkuMjk0LTYuMzkgOC45NDYtMS4yMTctLjA5NS0xLjcyNy0uNy0yLjY4LTEuMjh6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" ></amp-img>';
168
  }
169
  if (ampforwp_has_post_thumbnail( ) ){
170
  $image = ampforwp_get_post_thumbnail( 'url', 'full' );
@@ -176,7 +176,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
176
  <?php if(ampforwp_get_setting('enable-single-linkedin-share')){
177
  $linkedin_icon = '';
178
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
179
- $linkedin_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTA0NiAxMDA3IiBmaWxsPSIjZmZmZmZmIiA+PHBhdGggZD0iTTIzNyAxMDA1VjMzMEgxM3Y2NzVoMjI0ek0xMjUgMjM4Yzc4IDAgMTI3LTUyIDEyNy0xMTdDMjUxIDU1IDIwMyA0IDEyNyA0IDUwIDQgMCA1NCAwIDEyMWMwIDY1IDQ5IDExNyAxMjQgMTE3aDF6bTIzNiA3NjdoMjI0VjYyOGMwLTIwIDEtNDAgNy01NSAxNi00MCA1My04MiAxMTUtODIgODEgMCAxMTQgNjIgMTE0IDE1M3YzNjFoMjI0VjYxOGMwLTIwNy0xMTEtMzA0LTI1OC0zMDQtMTIxIDAtMTc0IDY4LTIwNCAxMTRoMXYtOThIMzYwYzMgNjMgMCA2NzUgMCA2NzV6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" ></amp-img>';
180
  }
181
  ?>
182
  <li>
@@ -186,7 +186,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
186
  <?php if(ampforwp_get_setting('enable-single-whatsapp-share')){
187
  $whatsapp_icon = '';
188
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
189
- $whatsapp_icon = '<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLC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OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="16" height="16" ></amp-img>';
190
  }
191
  ?>
192
  <li>
@@ -199,7 +199,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
199
  ?>
200
  <li>
201
  <a title="line share" class="s_li" <?php ampforwp_rel_attributes_social_links(); ?> href="<?php echo esc_url($line_amp_permalink); ?>">
202
- <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI5Ni41MjggMjk2LjUyOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjk2LjUyOCAyOTYuNT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2LDAsNywzLjEzNCw3LDdWMTUzLjM3MXogTTIzMy4zMTEsMTU5LjI2OWgtMzQuNjQ1Yy0zLjg2NiwwLTctMy4xMzQtNy03di0yNi44NDdWOTguNTczICAgYzAtMy44NjYsMy4xMzQtNyw3LTdoMzMuNTdjMy44NjYsMCw3LDMuMTM0LDcsN3MtMy4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
203
 
204
  L</a>
205
  </li>
@@ -207,7 +207,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
207
  <?php if(ampforwp_get_setting('enable-single-vk-share')){
208
  $vk_icon = '';
209
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
210
- $vk_icon = '<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz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SwyMi44MjctMTkuMTc0LDMzLjI1MWMtOC4wNDMsMTEuMTI5LTE2LjY0NSwyMS44NzctMjQuNjIxLDMzLjA3MiAgIEMyNTIuMjYsMTYxLjU0NCwyNTIuODQyLDE2Ni42OTcsMjYxLjk0NSwxNzUuNTc2TDI2MS45NDUsMTc1LjU3NnogTTI2MS45NDUsMTc1LjU3NiIgZmlsbD0iI0ZGRkZGRiIvPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=" width="16" height="16" ></amp-img>';
211
  }
212
  ?>
213
  <li>
@@ -217,7 +217,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
217
  <?php if(ampforwp_get_setting('enable-single-odnoklassniki-share')){
218
  $odnoklassniki_icon = '';
219
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
220
- $odnoklassniki_icon = '<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcm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nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=" width="16" height="16" ></amp-img>';
221
  }
222
  ?>
223
  <li>
@@ -232,7 +232,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
232
  <?php if(ampforwp_get_setting('enable-single-reddit-share')){
233
  $reddit_icon = '';
234
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
235
- $reddit_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDQ5IDUxMiIgZmlsbD0iI2ZmZmZmZiIgPjxwYXRoIGQ9Ik00NDkgMjUxYzAgMjAtMTEgMzctMjcgNDUgMSA1IDEgOSAxIDE0IDAgNzYtODkgMTM4LTE5OSAxMzhTMjYgMzg3IDI2IDMxMWMwLTUgMC0xMCAxLTE1LTE2LTgtMjctMjUtMjctNDUgMC0yOCAyMy01MCA1MC01MCAxMyAwIDI0IDUgMzMgMTMgMzMtMjMgNzktMzkgMTI5LTQxaDJsMzEtMTAzIDkwIDE4YzgtMTQgMjItMjQgMzktMjRoMWMyNSAwIDQ0IDIwIDQ0IDQ1cy0xOSA0NS00NCA0NWgtMWMtMjMgMC00Mi0xNy00NC00MGwtNjctMTQtMjIgNzRjNDkgMyA5MyAxNyAxMjUgNDAgOS04IDIxLTEzIDM0LTEzIDI3IDAgNDkgMjIgNDkgNTB6TTM0IDI3MWM1LTE1IDE1LTI5IDI5LTQxLTQtMy05LTUtMTUtNS0xNCAwLTI1IDExLTI1IDI1IDAgOSA0IDE3IDExIDIxem0zMjQtMTYyYzAgOSA3IDE3IDE2IDE3czE3LTggMTctMTctOC0xNy0xNy0xNy0xNiA4LTE2IDE3ek0xMjcgMjg4YzAgMTggMTQgMzIgMzIgMzJzMzItMTQgMzItMzItMTQtMzEtMzItMzEtMzIgMTMtMzIgMzF6bTk3IDExMmM0OCAwIDc3LTI5IDc4LTMwbC0xMy0xMnMtMjUgMjQtNjUgMjRjLTQxIDAtNjQtMjQtNjQtMjRsLTEzIDEyYzEgMSAyOSAzMCA3NyAzMHptNjctODBjMTggMCAzMi0xNCAzMi0zMnMtMTQtMzEtMzItMzEtMzIgMTMtMzIgMzEgMTQgMzIgMzIgMzJ6bTEyNC00OGM3LTUgMTEtMTMgMTEtMjIgMC0xNC0xMS0yNS0yNS0yNS02IDAtMTEgMi0xNSA1IDE0IDEyIDI0IDI3IDI5IDQyeiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" ></amp-img>';
236
  }
237
  ?>
238
  <li>
@@ -242,7 +242,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
242
  <?php if(ampforwp_get_setting('enable-single-tumblr-share')){
243
  $tumblr_icon ='';
244
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
245
- $tumblr_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNjQgNjQiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMzYuMDAyIDI4djE0LjYzNmMwIDMuNzE0LS4wNDggNS44NTMuMzQ2IDYuOTA2LjM5IDEuMDQ3IDEuMzcgMi4xMzQgMi40MzcgMi43NjMgMS40MTguODUgMy4wMzQgMS4yNzMgNC44NTcgMS4yNzMgMy4yNCAwIDUuMTU1LS40MjggOC4zNi0yLjUzNHY5LjYyYy0yLjczMiAxLjI4Ni01LjExOCAyLjAzOC03LjMzNCAyLjU2LTIuMjIuNTE0LTQuNjE2Ljc3NC03LjE5Ljc3NC0yLjkyOCAwLTQuNjU1LS4zNjgtNi45MDItMS4xMDMtMi4yNDctLjc0Mi00LjE2Ni0xLjgtNS43NS0zLjE2LTEuNTkyLTEuMzctMi42OS0yLjgyNC0zLjMwNC00LjM2M3MtLjkyLTMuNzc2LS45Mi02LjcwM1YyNi4yMjRoLTguNTl2LTkuMDYzYzIuNTE0LS44MTUgNS4zMjQtMS45ODcgNy4xMTItMy41MSAxLjc5Ny0xLjUyNyAzLjIzNS0zLjM1NiA0LjMyLTUuNDk2QzI0LjUzIDYuMDIyIDI1LjI3NiAzLjMgMjUuNjgzIDBoMTAuMzJ2MTZINTJ2MTJIMzYuMDA0eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" ></amp-img>';}?>
246
  <li>
247
  <a title="tumblr share" class="s_tb" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="https://www.tumblr.com/widgets/share/tool?canonicalUrl=<?php echo esc_url($amp_permalink) ?>"><?php echo $tumblr_icon; ?></a>
248
  </li>
@@ -250,7 +250,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
250
  <?php if(ampforwp_get_setting('enable-single-telegram-share')){
251
  $telegram_icon = '';
252
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
253
- $telegram_icon = '<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVk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U4LTIuMzg5LDEuNzg5LTIuODYxLDAuMjcxbC0yMi40MjMtNzIuMjUzYy0xLjAyNy0zLjMwOCwwLjMxMi02Ljg5MiwzLjI1NS04LjcxN2wxNjcuMTYzLTEwMy42NzYgICBDMzIwLjA4OSwxNDcuNTE4LDMyNC4wMjUsMTUyLjgxLDMyMC42MzYsMTU1LjgwNnoiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="16" height="16" ></amp-img>';
254
  }?>
255
  <li>
256
  <a title="telegram share" class="s_tg" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="https://telegram.me/share/url?url=<?php echo esc_url($amp_permalink); ?>&text=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"><?php echo $telegram_icon; ?></a>
@@ -259,7 +259,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
259
  <?php if(ampforwp_get_setting('enable-single-stumbleupon-share')){
260
  $stumbleupon = '';
261
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
262
- $stumbleupon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNjcwLjIyMzMgNjAxLjA4NjkiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMCA0MzcuMjQ3di05Mi42NzJoMTE0LjY4OHY5MS42NjRjMCA5LjU2NyAzLjQwOCAx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TE1LjQ0IDEwLjI1NS0yNS4zNDR2LTk1Ljc0NGgxMTQuNjg4djkyLjY3MmMwIDQxLjI5NS0xNC41OSA3Ni42NC00My43NzYgMTA1Ljk4My0yOS4xODQgMjkuMzYtNjQuNDMyIDQ0LjAzMi0xMDUuNzI4IDQ0LjAzMnMtNzYuNjI1LTE0LjQ5Ny0xMDUuOTg1LTQzLjUyYy0yOS4zNi0yOS4wNC00NC4wNDgtNjQuMDE3LTQ0LjA0OC0xMDQuOTc4eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" ></amp-img>';
263
  }?>
264
  <li>
265
  <a title="stumbleupon share" class="s_su" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="http://www.stumbleupon.com/submit?url=<?php echo esc_url($amp_permalink); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"><?php echo $stumbleupon; ?></a>
@@ -268,7 +268,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
268
  <?php if(ampforwp_get_setting('enable-single-wechat-share')){
269
  $wechat_icon = '';
270
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
271
- $wechat_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjA0OCAxODk2LjA4MzMiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNNTgwIDQ2MXEwLTQxLTI1LTY2dC02Ni0yNXEtNDMgMC03NiAyNS41VDM4MCA0NjFxMCAzOSAzMyA2NC41dDc2IDI1LjVxNDEgMCA2Ni0yNC41dDI1LTY1LjV6bTc0MyA1MDdxMC0yOC0yNS41LTUwdC02NS41LTIycS0yNyAwLTQ5LjUgMjIuNVQxMTYwIDk2OHEwIDI4IDIyLjUgNTAuNXQ0OS41IDIyLjVxNDAgMCA2NS41LTIydDI1LjUtNTF6bS0yMzYtNTA3cTAtNDEtMjQuNS02NlQ5OTcgMzcwcS00MyAwLTc2IDI1LjVUODg4IDQ2MXEwIDM5IDMzIDY0LjV0NzYgMjUuNXE0MSAwIDY1LjUtMjQuNVQxMDg3IDQ2MXptNjM1IDUwN3EwLTI4LTI2LTUwdC02NS0yMnEtMjcgMC00OS41IDIyLjVUMTU1OSA5NjhxMCAyOCAyMi41IDUwLjV0NDkuNSAyMi41cTM5IDAgNjUtMjJ0MjYtNTF6bS0yNjYtMzk3cS0zMS00LTcwLTQtMTY5IDAtMzExIDc3VDg1MS41IDg1Mi41IDc3MCAxMTQwcTAgNzggMjMgMTUyLTM1IDMtNjggMy0yNiAwLTUwLTEuNXQtNTUtNi41LTQ0LjUtNy01NC41LTEwLjUtNTAtMTAuNWwtMjUzIDEyNyA3Mi0yMThRMCA5NjUgMCA2NzhxMC0xNjkgOTcuNS0zMTF0MjY0LTIyMy41VDcyNSA2MnExNzYgMCAzMzIuNSA2NnQyNjIgMTgyLjVUMTQ1NiA1NzF6bTU5MiA1NjFxMCAxMTctNjguNSAyMjMuNVQxNzk0IDE1NDlsNTUgMTgxLTE5OS0xMDlxLTE1MCAzNy0yMTggMzctMTY5IDAtMzExLTcwLjVUODk3LjUgMTM5NiA4MTYgMTEzMnQ4MS41LTI2NFQxMTIxIDY3Ni41dDMxMS03MC41cTE2MSAwIDMwMyA3MC41dDIyNy41IDE5MlQyMDQ4IDExMzJ6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" ></amp-img>';}?>
272
  <li>
273
  <a title="wechat share" class="s_wc" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url=<?php echo esc_url($amp_permalink); ?>"><?php echo $wechat_icon; ?></a>
274
  </li>
@@ -276,7 +276,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
276
  <?php if(ampforwp_get_setting('enable-single-viber-share')){
277
  $viber_icon = '';
278
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
279
- $viber_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAyNiAxMjM0IiBmaWxsPSIjZmZmZmZmIiA+PHBhdGggZD0iTTkwNCA3OTRxLTY5IDYxLTIwMCA4Ny41VDQzNCA4OTdsLTE3NiAxMzJWODY0cS04Ny0yNy0xMzYtNzAtNTgtNTEtOTAtMTQ2LjV0LTMyLTE5NSAzMi0xOTUgOTAuNS0xNDcgMTY3LjUtNzlUNTEzIDR0MjIzIDI3LjUgMTY3LjUgNzkgOTAuNSAxNDcgMzIgMTk1LTMyIDE5NVQ5MDQgNzk0ek02MzkgNTQ5bDY1IDExcS04LTEyMC05Mi41LTIwNVQ0MDcgMjYybDExIDY1cTg2IDExIDE0OCA3M3Q3MyAxNDl6TTQyOSAzOTRsMTIgNzJxNDAgMjAgNTkgNTlsNzIgMTJxLTEyLTUzLTUxLTkxLjVUNDI5IDM5NHptLTEwNyA1OXYtNjRxMC0xNy0xMi41LTM0VDI4MyAzMzAuNXQtMjEtMS41bC00NiA0N3EtMzkgMzktMTEuNSAxMjEuNXQxMDUgMTYwIDE2MCAxMDVUNTkwIDc1MWw0Ny00N3E3LTYtLjUtMjAuNVQ2MTIgNjU3dC0zNC0xMmgtNjRsLTM3IDMycS00NC0xMi0xMDkuNS03Ny41VDI5MCA0ODl6bTY0LTMyMGwxMCA2NXExMDAgMiAxODUgNTIuNXQxMzUgMTM1VDc2OSA1NzBsNjUgMTFxMC05MS0zNS41LTE3NFQ3MDMgMjY0dC0xNDMtOTUuNVQzODYgMTMzeiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" ></amp-img>';
280
  }?>
281
  <li>
282
  <a class="s_vb" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="viber://forward?text=<?php echo esc_url($amp_permalink); ?>"><?php echo $viber_icon; ?></a>
@@ -285,7 +285,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
285
  <?php if ( ampforwp_get_setting('enable-single-yummly-share')){
286
  $yummly_icon = '';
287
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
288
- $yummly_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgODk2IDEwMjYiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMCAxOTN2NjQwaDg5NlYxOTNIMHptNzY4IDY0TDQ0OCA1MjEgMTI4IDI1N2g2NDB6TTY0IDMyMWwyNTIuMDMgMTkxLjYyNUw2NCA3MDVWMzIxem02NCA0NDhsMjU0LTIwNi4yNUw0NDggNjEzbDY1Ljg3NS01MC4xMjVMNzY4IDc2OUgxMjh6bTcwNC02NEw1NzkuNjI1IDUxMi45MzggODMyIDMyMXYzODR6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" ></amp-img>';
289
  }?>
290
  <li>
291
  <a title="yummly share" class="s_ym" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="http://www.yummly.com/urb/verify?url=<?php echo esc_url($amp_permalink); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"><?php echo $yummly_icon; ?></a>
@@ -294,7 +294,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
294
  <?php if ( ampforwp_get_setting('enable-single-hatena-bookmarks')){
295
  $hatena_icon = '';
296
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
297
- $hatena_icon = '<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'512\' height=\'512\' viewBox=\'0 0 512 512\'%3e%3cpath d=\'M 64 96 L 64 416 L 212 416 C 252 416 292 404 308 368 C 328 332 320 276 284 252 C 272 244 260 240 248 236 C 276 232 300 212 300 184 C 304 156 296 120 268 108 C 236 96 192 96 160 96 L 64 96 z M 364 96 L 364 308 L 444 308 L 444 96 L 364 96 z M 144 156 C 144 156 188 156 200 160 C 224 168 224 208 196 212 C 188 216 144 216 144 216 L 144 156 z M 144 280 C 144 280 188 280 208 284 C 232 288 240 312 228 332 C 220 348 204 348 188 348 L 144 348 L 144 280 z M 404 328 A 44 44 0 0 0 360 372 A 44 44 0 0 0 404 416 A 44 44 0 0 0 448 372 A 44 44 0 0 0 404 328 z\' style=\'fill:%23ffffff\'/%3e%3c/svg%3e" width="16" height="16" ></amp-img>';
298
  }?>
299
  <li>
300
  <a title="hatena share" class="s_hb" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="http://b.hatena.ne.jp/entry/<?php echo esc_url($amp_permalink); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"><?php echo $hatena_icon; ?></a>
@@ -303,7 +303,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
303
  <?php if ( ampforwp_get_setting('enable-single-pocket-share')){
304
  $pocket_icon = '';
305
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
306
- $pocket_icon = '<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'2500\' height=\'2251\' viewBox=\'75.247 261.708 445.529 401.074\'%3e%3cpath fill=\'%23EF4056\' d=\'M114.219 261.708c-24.275 1.582-38.972 15.44-38.972 40.088v147.611c0 119.893 119.242 214.114 222.393 213.37 115.986-.837 223.137-98.779 223.137-213.37V301.796c0-24.741-15.626-38.693-40.088-40.088h-366.47zm93.943 120.079L297.64 466.8l89.571-85.013c40.088-16.835 57.574 28.927 41.111 42.321L311.685 535.443c-3.813 3.628-24.183 3.628-27.996 0L167.051 424.107c-15.72-14.789 4.743-61.295 41.111-42.32z\'/%3e%3c/svg%3e" width="16" height="16" style="background: #fff;"></amp-img>';
307
  }?>
308
  <li>
309
  <a title="pocket share" class="s_pk" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="https://getpocket.com/save?url=<?php echo esc_url($amp_permalink); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"><?php echo $pocket_icon; ?></a>
117
  <?php if(ampforwp_get_setting('enable-single-facebook-share')){
118
  $facebook_icon = '';
119
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
120
+ $facebook_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDg2LjAzNyAxMDA3IiBmaWxsPSIjZmZmZmZmIiA+PHBhdGggZD0iTTEyNCAxMDA1VjUzNkgwVjM2N2gxMjRWMjIzQzEyNCAxMTAgMTk3IDUgMzY2IDVjNjggMCAxMTkgNyAxMTkgN2wtNCAxNThzLTUyLTEtMTA4LTFjLTYxIDAtNzEgMjgtNzEgNzV2MTIzaDE4M2wtOCAxNjlIMzAydjQ2OUgxMjMiPjwvcGF0aD48L3N2Zz4=" width="16" height="16" alt="facebook"></amp-img>';
121
  }
122
 
123
  ?>
142
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.'';
143
  $twitter_icon = '';
144
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
145
+ $twitter_icon = '<amp-img src="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MDUtOTIuNjIgMjUuNjgtMjUuNjY2IDU2LjcwNC0zOC41MDUgOTMuMTUzLTM4LjUwNSAzNy43OSAwIDY5LjcwMiAxMy44OCA5NS43MyA0MS42NCAzMC4xNjgtNi4yNTcgNTcuOTI4LTE3LjAxNSA4My4yNTYtMzIuMjYtOS43MTggMzEuNTU4LTI4LjgxNSA1NS44NDUtNTcuMjM4IDcyLjg0NyAyNS4zMjgtMy4xMSA1MC4zMDQtMTAuMDU2IDc0LjkzLTIwLjgxNC0xNi42NTIgMjYuMDE3LTM4LjMzNyA0OC43NDItNjUuMDU3IDY4LjE1MnYxNy4xOTdjMCAzNC45OTItNS4xMjQgNzAuMTI4LTE1LjM0OCAxMDUuMzU1LTEwLjIxMiAzNS4yMTQtMjUuODUgNjguODUzLTQ2LjgzIDEwMC45NzItMjAuOTk2IDMyLjA2NS00Ni4wNSA2MC42Mi03NS4xOSA4NS41Ny0yOS4xMjYgMjQuOTc2LTY0LjA4IDQ0Ljg1My0xMDQuODUgNTkuNTktNDAuNzU0IDE0Ljc1My04NC41NTMgMjIuMDktMTMxLjM5NyAyMi4wOUMxMjguODYyIDU4OC45NCA2MS43NCA1NjkuMzUgMCA1MzAuMTU0eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" alt="twitter"></amp-img>';}
146
  ?>
147
  <li>
148
  <a title="twitter share" class="s_tw" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>"><?php echo $twitter_icon; ?>
152
  <?php if(ampforwp_get_setting('enable-single-email-share')){
153
  $email_icon = '';
154
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
155
+ $email_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgODk2IDEwMjYiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMCAxOTN2NjQwaDg5NlYxOTNIMHptNzY4IDY0TDQ0OCA1MjEgMTI4IDI1N2g2NDB6TTY0IDMyMWwyNTIuMDMgMTkxLjYyNUw2NCA3MDVWMzIxem02NCA0NDhsMjU0LTIwNi4yNUw0NDggNjEzbDY1Ljg3NS01MC4xMjVMNzY4IDc2OUgxMjh6bTcwNC02NEw1NzkuNjI1IDUxMi45MzggODMyIDMyMXYzODR6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" alt="email"></amp-img>';
156
  }
157
 
158
  ?>
164
  $image = '';
165
  $pinterest_icon = '';
166
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
167
+ $pinterest_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNOC42MTcgMTMuMjI3QzguMDkgMTUuOTggNy40NSAxOC42MiA1LjU1IDIwYy0uNTg3LTQuMTYyLjg2LTcuMjg3IDEuNTMzLTEwLjYwNS0xLjE0Ny0xLjkzLjEzOC01LjgxMiAyLjU1NS00Ljg1NSAyLjk3NSAxLjE3Ni0yLjU3NiA3LjE3MiAxLjE1IDcuOTIyIDMuODkuNzggNS40OC02Ljc1IDMuMDY2LTkuMkMxMC4zNy0uMjc0IDMuNzA4IDMuMTggNC41MjggOC4yNDZjLjIgMS4yMzggMS40NzggMS42MTMuNTEgMy4zMjItMi4yMy0uNDk0LTIuODk2LTIuMjU0LTIuODEtNC42LjEzOC0zLjg0IDMuNDUtNi41MjcgNi43Ny02LjkgNC4yMDItLjQ3IDguMTQ1IDEuNTQzIDguNjkgNS40OTQuNjEzIDQuNDYyLTEuODk2IDkuMjk0LTYuMzkgOC45NDYtMS4yMTctLjA5NS0xLjcyNy0uNy0yLjY4LTEuMjh6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" alt="pinterest"></amp-img>';
168
  }
169
  if (ampforwp_has_post_thumbnail( ) ){
170
  $image = ampforwp_get_post_thumbnail( 'url', 'full' );
176
  <?php if(ampforwp_get_setting('enable-single-linkedin-share')){
177
  $linkedin_icon = '';
178
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
179
+ $linkedin_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTA0NiAxMDA3IiBmaWxsPSIjZmZmZmZmIiA+PHBhdGggZD0iTTIzNyAxMDA1VjMzMEgxM3Y2NzVoMjI0ek0xMjUgMjM4Yzc4IDAgMTI3LTUyIDEyNy0xMTdDMjUxIDU1IDIwMyA0IDEyNyA0IDUwIDQgMCA1NCAwIDEyMWMwIDY1IDQ5IDExNyAxMjQgMTE3aDF6bTIzNiA3NjdoMjI0VjYyOGMwLTIwIDEtNDAgNy01NSAxNi00MCA1My04MiAxMTUtODIgODEgMCAxMTQgNjIgMTE0IDE1M3YzNjFoMjI0VjYxOGMwLTIwNy0xMTEtMzA0LTI1OC0zMDQtMTIxIDAtMTc0IDY4LTIwNCAxMTRoMXYtOThIMzYwYzMgNjMgMCA2NzUgMCA2NzV6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" alt="linkedin"></amp-img>';
180
  }
181
  ?>
182
  <li>
186
  <?php if(ampforwp_get_setting('enable-single-whatsapp-share')){
187
  $whatsapp_icon = '';
188
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
189
+ $whatsapp_icon = '<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3NS0yMy41MjIgICBjLTQuMDIzLTYuNjA2LTYuMzQtMTQuMzU0LTYuMzQtMjIuNjM3QzEuNjM1LDE5LjYyOCwyMS40MTYsMCw0NS44MTgsMEM3MC4yMjMsMCw5MCwx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TIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="16" height="16" alt="whatsapp"></amp-img>';
190
  }
191
  ?>
192
  <li>
199
  ?>
200
  <li>
201
  <a title="line share" class="s_li" <?php ampforwp_rel_attributes_social_links(); ?> href="<?php echo esc_url($line_amp_permalink); ?>">
202
+ <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIi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AsMy44NjYtMy4xMzQsNy03LDcgICBjLTMuODY2LDAtNy0zLjEzNC03LTd2LTUyLjE2YzAtMy4wMzMsMS45NTMtNS43MjEsNC44MzgtNi42NThjMi44ODYtMC45MzYsNi4wNDUsMC4wOSw3LjgyNywyLjU0NWwyNS4yMDcsMzQuNzE3Vjk5LjY3NSAgIGMwLTMuODY2LDMuMTM0LTcsNy03YzMuODY2LDAsNywzLjEzNCw3LDdWMTUzLjM3MXogTTIzMy4zMTEsMTU5LjI2OWgtMzQuNjQ1Yy0zLjg2NiwwLTctMy4xMzQtNy03di0yNi44NDdWOTguNTczICAgYzAtMy44NjYsMy4xMzQtNyw3LTdoMzMuNTdjMy44NjYsMCw3LDMuMTM0LDcsN3MtMy4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" alt="line"/>
203
 
204
  L</a>
205
  </li>
207
  <?php if(ampforwp_get_setting('enable-single-vk-share')){
208
  $vk_icon = '';
209
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
210
+ $vk_icon = '<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQ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g1LTcuODcyLDExLjMyOC03Ljc1N2w0OC4yMjksMC4wNDNjMS40MywwLDIuODc3LDAuMDIxLDQuMjYyLDAuMjU4ICAgYzguMTI3LDEuMzg1LDEwLjM1NCw0Ljg4MSw3Ljg0NCwxMi44MTdjLTMuOTU1LDEyLjQ1MS0xMS42NSwyMi44MjctMTkuMTc0LDMzLjI1MWMtOC4wNDMsMTEuMTI5LTE2LjY0NSwyMS44NzctMjQuNjIxLDMzLjA3MiAgIEMyNTIuMjYsMTYxLjU0NCwyNTIuODQyLDE2Ni42OTcsMjYxLjk0NSwxNzUuNTc2TDI2MS45NDUsMTc1LjU3NnogTTI2MS45NDUsMTc1LjU3NiIgZmlsbD0iI0ZGRkZGRiIvPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=" width="16" height="16" alt="vk"></amp-img>';
211
  }
212
  ?>
213
  <li>
217
  <?php if(ampforwp_get_setting('enable-single-odnoklassniki-share')){
218
  $odnoklassniki_icon = '';
219
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
220
+ $odnoklassniki_icon = '<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWR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TEsMjQuMTQzeiIgZmlsbD0iI0ZGRkZGRiIvPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=" width="16" height="16" alt="odnoklassniki"></amp-img>';
221
  }
222
  ?>
223
  <li>
232
  <?php if(ampforwp_get_setting('enable-single-reddit-share')){
233
  $reddit_icon = '';
234
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
235
+ $reddit_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDQ5IDUxMiIgZmlsbD0iI2ZmZmZmZiIgPjxwYXRoIGQ9Ik00NDkgMjUxYzAgMjAtMTEgMzctMjcgNDUgMSA1IDEgOSAxIDE0IDAgNzYtODkgMTM4LTE5OSAxMzhTMjYgMzg3IDI2IDMxMWMwLTUgMC0xMCAxLTE1LTE2LTgtMjctMjUtMjctNDUgMC0yOCAyMy01MCA1MC01MCAxMyAwIDI0IDUgMzMgMTMgMzMtMjMgNzktMzkgMTI5LTQxaDJsMzEtMTAzIDkwIDE4YzgtMTQgMjItMjQgMzktMjRoMWMyNSAwIDQ0IDIwIDQ0IDQ1cy0xOSA0NS00NCA0NWgtMWMtMjMgMC00Mi0xNy00NC00MGwtNjctMTQtMjIgNzRjNDkgMyA5MyAxNyAxMjUgNDAgOS04IDIxLTEzIDM0LTEzIDI3IDAgNDkgMjIgNDkgNTB6TTM0IDI3MWM1LTE1IDE1LTI5IDI5LTQxLTQtMy05LTUtMTUtNS0xNCAwLTI1IDExLTI1IDI1IDAgOSA0IDE3IDExIDIxem0zMjQtMTYyYzAgOSA3IDE3IDE2IDE3czE3LTggMTctMTctOC0xNy0xNy0xNy0xNiA4LTE2IDE3ek0xMjcgMjg4YzAgMTggMTQgMzIgMzIgMzJzMzItMTQgMzItMzItMTQtMzEtMzItMzEtMzIgMTMtMzIgMzF6bTk3IDExMmM0OCAwIDc3LTI5IDc4LTMwbC0xMy0xMnMtMjUgMjQtNjUgMjRjLTQxIDAtNjQtMjQtNjQtMjRsLTEzIDEyYzEgMSAyOSAzMCA3NyAzMHptNjctODBjMTggMCAzMi0xNCAzMi0zMnMtMTQtMzEtMzItMzEtMzIgMTMtMzIgMzEgMTQgMzIgMzIgMzJ6bTEyNC00OGM3LTUgMTEtMTMgMTEtMjIgMC0xNC0xMS0yNS0yNS0yNS02IDAtMTEgMi0xNSA1IDE0IDEyIDI0IDI3IDI5IDQyeiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" alt="reddit"></amp-img>';
236
  }
237
  ?>
238
  <li>
242
  <?php if(ampforwp_get_setting('enable-single-tumblr-share')){
243
  $tumblr_icon ='';
244
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
245
+ $tumblr_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNjQgNjQiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMzYuMDAyIDI4djE0LjYzNmMwIDMuNzE0LS4wNDggNS44NTMuMzQ2IDYuOTA2LjM5IDEuMDQ3IDEuMzcgMi4xMzQgMi40MzcgMi43NjMgMS40MTguODUgMy4wMzQgMS4yNzMgNC44NTcgMS4yNzMgMy4yNCAwIDUuMTU1LS40MjggOC4zNi0yLjUzNHY5LjYyYy0yLjczMiAxLjI4Ni01LjExOCAyLjAzOC03LjMzNCAyLjU2LTIuMjIuNTE0LTQuNjE2Ljc3NC03LjE5Ljc3NC0yLjkyOCAwLTQuNjU1LS4zNjgtNi45MDItMS4xMDMtMi4yNDctLjc0Mi00LjE2Ni0xLjgtNS43NS0zLjE2LTEuNTkyLTEuMzctMi42OS0yLjgyNC0zLjMwNC00LjM2M3MtLjkyLTMuNzc2LS45Mi02LjcwM1YyNi4yMjRoLTguNTl2LTkuMDYzYzIuNTE0LS44MTUgNS4zMjQtMS45ODcgNy4xMTItMy41MSAxLjc5Ny0xLjUyNyAzLjIzNS0zLjM1NiA0LjMyLTUuNDk2QzI0LjUzIDYuMDIyIDI1LjI3NiAzLjMgMjUuNjgzIDBoMTAuMzJ2MTZINTJ2MTJIMzYuMDA0eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" alt="tumblr"></amp-img>';}?>
246
  <li>
247
  <a title="tumblr share" class="s_tb" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="https://www.tumblr.com/widgets/share/tool?canonicalUrl=<?php echo esc_url($amp_permalink) ?>"><?php echo $tumblr_icon; ?></a>
248
  </li>
250
  <?php if(ampforwp_get_setting('enable-single-telegram-share')){
251
  $telegram_icon = '';
252
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
253
+ $telegram_icon = '<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgIm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zg5LTIuODYxLDAuMjcxbC0yMi40MjMtNzIuMjUzYy0xLjAyNy0zLjMwOCwwLjMxMi02Ljg5MiwzLjI1NS04LjcxN2wxNjcuMTYzLTEwMy42NzYgICBDMzIwLjA4OSwxNDcuNTE4LDMyNC4wMjUsMTUyLjgxLDMyMC42MzYsMTU1LjgwNnoiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="16" height="16" alt="telegram"></amp-img>';
254
  }?>
255
  <li>
256
  <a title="telegram share" class="s_tg" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="https://telegram.me/share/url?url=<?php echo esc_url($amp_permalink); ?>&text=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"><?php echo $telegram_icon; ?></a>
259
  <?php if(ampforwp_get_setting('enable-single-stumbleupon-share')){
260
  $stumbleupon = '';
261
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
262
+ $stumbleupon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNjcwLjIyMzMgNjAxLjA4NjkiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMCA0MzcuMjQ3di05Mi42NzJoMTE0LjY4OHY5MS42NjRjMCA5LjU2NyAzLjQwOCAxNy44MjMgMTAuMjQgMjQuODNzMTUuMTg0IDEwLjQ5NyAyNS4wODggMTAuNDk3IDE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IDQxLjI5NS0xNC41OSA3Ni42NC00My43NzYgMTA1Ljk4My0yOS4xODQgMjkuMzYtNjQuNDMyIDQ0LjAzMi0xMDUuNzI4IDQ0LjAzMnMtNzYuNjI1LTE0LjQ5Ny0xMDUuOTg1LTQzLjUyYy0yOS4zNi0yOS4wNC00NC4wNDgtNjQuMDE3LTQ0LjA0OC0xMDQuOTc4eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" alt="stumbleupon"></amp-img>';
263
  }?>
264
  <li>
265
  <a title="stumbleupon share" class="s_su" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="http://www.stumbleupon.com/submit?url=<?php echo esc_url($amp_permalink); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"><?php echo $stumbleupon; ?></a>
268
  <?php if(ampforwp_get_setting('enable-single-wechat-share')){
269
  $wechat_icon = '';
270
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
271
+ $wechat_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjA0OCAxODk2LjA4MzMiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNNTgwIDQ2MXEwLTQxLTI1LTY2dC02Ni0yNXEtNDMgMC03NiAyNS41VDM4MCA0NjFxMCAzOSAzMyA2NC41dDc2IDI1LjVxNDEgMCA2Ni0yNC41dDI1LTY1LjV6bTc0MyA1MDdxMC0yOC0yNS41LTUwdC02NS41LTIycS0yNyAwLTQ5LjUgMjIuNVQxMTYwIDk2OHEwIDI4IDIyLjUgNTAuNXQ0OS41IDIyLjVxNDAgMCA2NS41LTIydDI1LjUtNTF6bS0yMzYtNTA3cTAtNDEtMjQuNS02NlQ5OTcgMzcwcS00MyAwLTc2IDI1LjVUODg4IDQ2MXEwIDM5IDMzIDY0LjV0NzYgMjUuNXE0MSAwIDY1LjUtMjQuNVQxMDg3IDQ2MXptNjM1IDUwN3EwLTI4LTI2LTUwdC02NS0yMnEtMjcgMC00OS41IDIyLjVUMTU1OSA5NjhxMCAyOCAyMi41IDUwLjV0NDkuNSAyMi41cTM5IDAgNjUtMjJ0MjYtNTF6bS0yNjYtMzk3cS0zMS00LTcwLTQtMTY5IDAtMzExIDc3VDg1MS41IDg1Mi41IDc3MCAxMTQwcTAgNzggMjMgMTUyLTM1IDMtNjggMy0yNiAwLTUwLTEuNXQtNTUtNi41LTQ0LjUtNy01NC41LTEwLjUtNTAtMTAuNWwtMjUzIDEyNyA3Mi0yMThRMCA5NjUgMCA2NzhxMC0xNjkgOTcuNS0zMTF0MjY0LTIyMy41VDcyNSA2MnExNzYgMCAzMzIuNSA2NnQyNjIgMTgyLjVUMTQ1NiA1NzF6bTU5MiA1NjFxMCAxMTctNjguNSAyMjMuNVQxNzk0IDE1NDlsNTUgMTgxLTE5OS0xMDlxLTE1MCAzNy0yMTggMzctMTY5IDAtMzExLTcwLjVUODk3LjUgMTM5NiA4MTYgMTEzMnQ4MS41LTI2NFQxMTIxIDY3Ni41dDMxMS03MC41cTE2MSAwIDMwMyA3MC41dDIyNy41IDE5MlQyMDQ4IDExMzJ6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" alt="wechat"></amp-img>';}?>
272
  <li>
273
  <a title="wechat share" class="s_wc" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url=<?php echo esc_url($amp_permalink); ?>"><?php echo $wechat_icon; ?></a>
274
  </li>
276
  <?php if(ampforwp_get_setting('enable-single-viber-share')){
277
  $viber_icon = '';
278
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
279
+ $viber_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAyNiAxMjM0IiBmaWxsPSIjZmZmZmZmIiA+PHBhdGggZD0iTTkwNCA3OTRxLTY5IDYxLTIwMCA4Ny41VDQzNCA4OTdsLTE3NiAxMzJWODY0cS04Ny0yNy0xMzYtNzAtNTgtNTEtOTAtMTQ2LjV0LTMyLTE5NSAzMi0xOTUgOTAuNS0xNDcgMTY3LjUtNzlUNTEzIDR0MjIzIDI3LjUgMTY3LjUgNzkgOTAuNSAxNDcgMzIgMTk1LTMyIDE5NVQ5MDQgNzk0ek02MzkgNTQ5bDY1IDExcS04LTEyMC05Mi41LTIwNVQ0MDcgMjYybDExIDY1cTg2IDExIDE0OCA3M3Q3MyAxNDl6TTQyOSAzOTRsMTIgNzJxNDAgMjAgNTkgNTlsNzIgMTJxLTEyLTUzLTUxLTkxLjVUNDI5IDM5NHptLTEwNyA1OXYtNjRxMC0xNy0xMi41LTM0VDI4MyAzMzAuNXQtMjEtMS41bC00NiA0N3EtMzkgMzktMTEuNSAxMjEuNXQxMDUgMTYwIDE2MCAxMDVUNTkwIDc1MWw0Ny00N3E3LTYtLjUtMjAuNVQ2MTIgNjU3dC0zNC0xMmgtNjRsLTM3IDMycS00NC0xMi0xMDkuNS03Ny41VDI5MCA0ODl6bTY0LTMyMGwxMCA2NXExMDAgMiAxODUgNTIuNXQxMzUgMTM1VDc2OSA1NzBsNjUgMTFxMC05MS0zNS41LTE3NFQ3MDMgMjY0dC0xNDMtOTUuNVQzODYgMTMzeiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" alt="viber"></amp-img>';
280
  }?>
281
  <li>
282
  <a class="s_vb" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="viber://forward?text=<?php echo esc_url($amp_permalink); ?>"><?php echo $viber_icon; ?></a>
285
  <?php if ( ampforwp_get_setting('enable-single-yummly-share')){
286
  $yummly_icon = '';
287
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
288
+ $yummly_icon = '<amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgODk2IDEwMjYiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMCAxOTN2NjQwaDg5NlYxOTNIMHptNzY4IDY0TDQ0OCA1MjEgMTI4IDI1N2g2NDB6TTY0IDMyMWwyNTIuMDMgMTkxLjYyNUw2NCA3MDVWMzIxem02NCA0NDhsMjU0LTIwNi4yNUw0NDggNjEzbDY1Ljg3NS01MC4xMjVMNzY4IDc2OUgxMjh6bTcwNC02NEw1NzkuNjI1IDUxMi45MzggODMyIDMyMXYzODR6Ij48L3BhdGg+PC9zdmc+" width="16" height="16" alt="yummly"></amp-img>';
289
  }?>
290
  <li>
291
  <a title="yummly share" class="s_ym" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="http://www.yummly.com/urb/verify?url=<?php echo esc_url($amp_permalink); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"><?php echo $yummly_icon; ?></a>
294
  <?php if ( ampforwp_get_setting('enable-single-hatena-bookmarks')){
295
  $hatena_icon = '';
296
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
297
+ $hatena_icon = '<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'512\' height=\'512\' viewBox=\'0 0 512 512\'%3e%3cpath d=\'M 64 96 L 64 416 L 212 416 C 252 416 292 404 308 368 C 328 332 320 276 284 252 C 272 244 260 240 248 236 C 276 232 300 212 300 184 C 304 156 296 120 268 108 C 236 96 192 96 160 96 L 64 96 z M 364 96 L 364 308 L 444 308 L 444 96 L 364 96 z M 144 156 C 144 156 188 156 200 160 C 224 168 224 208 196 212 C 188 216 144 216 144 216 L 144 156 z M 144 280 C 144 280 188 280 208 284 C 232 288 240 312 228 332 C 220 348 204 348 188 348 L 144 348 L 144 280 z M 404 328 A 44 44 0 0 0 360 372 A 44 44 0 0 0 404 416 A 44 44 0 0 0 448 372 A 44 44 0 0 0 404 328 z\' style=\'fill:%23ffffff\'/%3e%3c/svg%3e" width="16" height="16" alt="hatena"></amp-img>';
298
  }?>
299
  <li>
300
  <a title="hatena share" class="s_hb" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="http://b.hatena.ne.jp/entry/<?php echo esc_url($amp_permalink); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"><?php echo $hatena_icon; ?></a>
303
  <?php if ( ampforwp_get_setting('enable-single-pocket-share')){
304
  $pocket_icon = '';
305
  if('css-icons' == ampforwp_get_setting('ampforwp_font_icon')){
306
+ $pocket_icon = '<amp-img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'2500\' height=\'2251\' viewBox=\'75.247 261.708 445.529 401.074\'%3e%3cpath fill=\'%23EF4056\' d=\'M114.219 261.708c-24.275 1.582-38.972 15.44-38.972 40.088v147.611c0 119.893 119.242 214.114 222.393 213.37 115.986-.837 223.137-98.779 223.137-213.37V301.796c0-24.741-15.626-38.693-40.088-40.088h-366.47zm93.943 120.079L297.64 466.8l89.571-85.013c40.088-16.835 57.574 28.927 41.111 42.321L311.685 535.443c-3.813 3.628-24.183 3.628-27.996 0L167.051 424.107c-15.72-14.789 4.743-61.295 41.111-42.32z\'/%3e%3c/svg%3e" width="16" height="16" style="background: #fff;" alt="pocket"></amp-img>';
307
  }?>
308
  <li>
309
  <a title="pocket share" class="s_pk" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="https://getpocket.com/save?url=<?php echo esc_url($amp_permalink); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"><?php echo $pocket_icon; ?></a>
templates/design-manager/swift/header.php CHANGED
@@ -26,7 +26,11 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
26
  <div class="menu-heading clearfix">
27
  <label for="offcanvas-menu" class="c-btn"></label>
28
  </div><!--end menu-heading-->
29
-
 
 
 
 
30
  <?php if ( amp_menu(false) ) : ?>
31
  <nav class="m-menu">
32
  <?php amp_menu();?>
@@ -34,7 +38,7 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
34
  <?php endif; ?>
35
  <?php do_action('ampforwp_after_amp_menu');?>
36
 
37
- <?php if ($redux_builder_amp['menu-search'] ) { ?>
38
  <div class="m-srch">
39
  <?php amp_search();?>
40
  </div>
@@ -162,6 +166,11 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
162
  <div class="menu-heading clearfix">
163
  <label for="offcanvas-menu" class="c-btn"></label>
164
  </div><!--end menu-heading-->
 
 
 
 
 
165
  <?php if ( amp_menu(false) ) : ?>
166
  <nav class="m-menu">
167
  <?php amp_menu();?>
@@ -173,7 +182,7 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
173
  <a target="_blank" <?php ampforwp_nofollow_cta_header_link(); ?> href="<?php echo esc_url(ampforwp_get_setting('signin-button-link'))?>"><?php echo esc_html__(ampforwp_get_setting('signin-button-text'), 'accelerated-mobile-pages'); ?></a>
174
  </div>
175
  <?php } ?>
176
- <?php if ( $redux_builder_amp['menu-search'] ) { ?>
177
  <div class="m-srch">
178
  <?php amp_search();?>
179
  </div>
@@ -259,9 +268,13 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
259
  <?php amp_logo(); ?>
260
  </div>
261
  <div class="h-2">
262
- <?php if( ampforwp_get_setting('signin-button-text') && ampforwp_get_setting('signin-button-link') ){?>
 
 
 
 
263
  <div class="h-sing">
264
- <a target="_blank" <?php ampforwp_nofollow_cta_header_link(); ?> href="<?php echo esc_url(ampforwp_get_setting('signin-button-link'))?>"><?php echo esc_html__(ampforwp_get_setting('signin-button-text'), 'accelerated-mobile-pages'); ?></a>
265
  </div>
266
  <?php } ?>
267
  <?php if( isset( $redux_builder_amp['amp-swift-cart-btn'] ) && true == $redux_builder_amp['amp-swift-cart-btn'] ) { ?>
@@ -293,13 +306,18 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
293
  <div class="menu-heading clearfix">
294
  <label for="offcanvas-menu" class="c-btn"></label>
295
  </div><!--end menu-heading-->
 
 
 
 
 
296
  <?php if ( amp_menu(false) ) : ?>
297
  <nav class="m-menu">
298
  <?php amp_menu();?>
299
  </nav><!--end slide-menu -->
300
  <?php endif; ?>
301
  <?php do_action('ampforwp_after_amp_menu');?>
302
- <?php if ( $redux_builder_amp['menu-search'] ) { ?>
303
  <div class="m-srch">
304
  <?php amp_search();?>
305
  </div>
26
  <div class="menu-heading clearfix">
27
  <label for="offcanvas-menu" class="c-btn"></label>
28
  </div><!--end menu-heading-->
29
+ <?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-before-menu') ){ ?>
30
+ <div class="m-srch">
31
+ <?php amp_search();?>
32
+ </div>
33
+ <?php } ?>
34
  <?php if ( amp_menu(false) ) : ?>
35
  <nav class="m-menu">
36
  <?php amp_menu();?>
38
  <?php endif; ?>
39
  <?php do_action('ampforwp_after_amp_menu');?>
40
 
41
+ <?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-after-menu') ){ ?>
42
  <div class="m-srch">
43
  <?php amp_search();?>
44
  </div>
166
  <div class="menu-heading clearfix">
167
  <label for="offcanvas-menu" class="c-btn"></label>
168
  </div><!--end menu-heading-->
169
+ <?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-before-menu') ){ ?>
170
+ <div class="m-srch">
171
+ <?php amp_search();?>
172
+ </div>
173
+ <?php } ?>
174
  <?php if ( amp_menu(false) ) : ?>
175
  <nav class="m-menu">
176
  <?php amp_menu();?>
182
  <a target="_blank" <?php ampforwp_nofollow_cta_header_link(); ?> href="<?php echo esc_url(ampforwp_get_setting('signin-button-link'))?>"><?php echo esc_html__(ampforwp_get_setting('signin-button-text'), 'accelerated-mobile-pages'); ?></a>
183
  </div>
184
  <?php } ?>
185
+ <?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-after-menu') ){ ?>
186
  <div class="m-srch">
187
  <?php amp_search();?>
188
  </div>
268
  <?php amp_logo(); ?>
269
  </div>
270
  <div class="h-2">
271
+ <?php if( ampforwp_get_setting('signin-button-text') && ampforwp_get_setting('signin-button-link') ){
272
+ $new_tab = '';
273
+ if (ampforwp_get_setting('signin-button-new-tab')) {
274
+ $new_tab = 'target=_blank';
275
+ }?>
276
  <div class="h-sing">
277
+ <a <?php echo esc_html($new_tab); ?> <?php ampforwp_nofollow_cta_header_link(); ?> href="<?php echo esc_url(ampforwp_get_setting('signin-button-link'))?>"><?php echo esc_html__(ampforwp_get_setting('signin-button-text'), 'accelerated-mobile-pages'); ?></a>
278
  </div>
279
  <?php } ?>
280
  <?php if( isset( $redux_builder_amp['amp-swift-cart-btn'] ) && true == $redux_builder_amp['amp-swift-cart-btn'] ) { ?>
306
  <div class="menu-heading clearfix">
307
  <label for="offcanvas-menu" class="c-btn"></label>
308
  </div><!--end menu-heading-->
309
+ <?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-before-menu') ){ ?>
310
+ <div class="m-srch">
311
+ <?php amp_search();?>
312
+ </div>
313
+ <?php } ?>
314
  <?php if ( amp_menu(false) ) : ?>
315
  <nav class="m-menu">
316
  <?php amp_menu();?>
317
  </nav><!--end slide-menu -->
318
  <?php endif; ?>
319
  <?php do_action('ampforwp_after_amp_menu');?>
320
+ <?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-after-menu') ){ ?>
321
  <div class="m-srch">
322
  <?php amp_search();?>
323
  </div>
templates/design-manager/swift/page.php CHANGED
@@ -11,7 +11,9 @@ amp_header(); ?>
11
  <?php if ( is_page() && true == ampforwp_get_setting('ampforwp_pages_breadcrumbs') ) {
12
  amp_breadcrumb();
13
  }?>
14
- <?php amp_title(); ?>
 
 
15
  <?php } ?>
16
  <?php } // Level up Condition ends here?>
17
  </div>
@@ -41,6 +43,11 @@ amp_header(); ?>
41
  }
42
  if(ampforwp_is_front_page() && false == ampforwp_get_setting('gbl-sidebar') ){
43
  amp_content();
 
 
 
 
 
44
  }
45
  if(!ampforwp_is_front_page()){
46
  amp_content();
11
  <?php if ( is_page() && true == ampforwp_get_setting('ampforwp_pages_breadcrumbs') ) {
12
  amp_breadcrumb();
13
  }?>
14
+ <?php if ( (is_page() && true == ampforwp_get_setting('ampforwp_pages_title')) || (ampforwp_is_front_page() && ampforwp_get_setting('ampforwp-title-on-front-page'))) {
15
+ amp_title();
16
+ }?>
17
  <?php } ?>
18
  <?php } // Level up Condition ends here?>
19
  </div>
43
  }
44
  if(ampforwp_is_front_page() && false == ampforwp_get_setting('gbl-sidebar') ){
45
  amp_content();
46
+ if(ampforwp_get_comments_status()){ ?>
47
+ <div class="cmts">
48
+ <?php amp_comments();?>
49
+ </div>
50
+ <?php }
51
  }
52
  if(!ampforwp_is_front_page()){
53
  amp_content();
templates/design-manager/swift/single.php CHANGED
@@ -20,6 +20,21 @@ $page = get_query_var( 'page' ); ?>
20
  <?php amp_excerpt(); ?>
21
  </div>
22
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  </div>
24
  <?php
25
  if($paged==0 && $page==0){
@@ -53,7 +68,10 @@ $page = get_query_var( 'page' ); ?>
53
  <?php } // Swift Featured Image Type 2
54
  } // Swift Featured Image
55
  }?>
56
- <?php amp_content(); ?>
 
 
 
57
  </div>
58
  <?php do_action( 'ampforwp_after_the_post_content_wrp' ); ?>
59
  <?php if (isset($redux_builder_amp['swift-social-position']) && 'below-content' == $redux_builder_amp['swift-social-position']){
@@ -94,7 +112,7 @@ $page = get_query_var( 'page' ); ?>
94
  echo ampforwp_addThis_support();
95
  } ?>
96
  <?php if( true == ampforwp_get_setting('amp-author-name') ) { ?>
97
- <div class="sp-athr">
98
  <span class="athr-tx"><?php echo ampforwp_translation($redux_builder_amp['amp-translator-published-by'], 'Published by' ); ?></span>
99
  <?php amp_author_box(
100
  array('author_pub_name'=>true,'author_info'=>true)
@@ -107,7 +125,7 @@ $page = get_query_var( 'page' ); ?>
107
  </div>
108
  <?php }
109
  if( true == ampforwp_get_setting('swift-date') ) { ?>
110
- <div class="post-date">
111
  <?php amp_date(); ?><?php edit_post_link(); ?>
112
  </div>
113
  <?php do_action('ampforwp_post_views_ctr'); ?>
@@ -119,10 +137,12 @@ $page = get_query_var( 'page' ); ?>
119
  <ul class="clearfix">
120
  <?php ampforwp_related_post(); ?>
121
  <?php
122
-
123
  while( $my_query->have_posts() ) {
124
  $my_query->the_post();
125
-
 
 
126
  ?>
127
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
128
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
@@ -174,10 +194,12 @@ do_action("ampforwp_single_design_type_handle_d1");
174
  <?php ampforwp_related_post(); ?>
175
  <ul class="clearfix">
176
  <?php
177
-
178
  while( $my_query->have_posts() ) {
179
  $my_query->the_post();
180
-
 
 
181
  ?>
182
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
183
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
@@ -220,10 +242,12 @@ do_action("ampforwp_single_design_type_handle_d1");
220
  <?php ampforwp_related_post(); ?>
221
  <amp-carousel height="310" layout="fixed-height" type="carousel">
222
  <?php
223
-
224
  while( $my_query->have_posts() ) {
225
  $my_query->the_post();
226
-
 
 
227
  ?>
228
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
229
  <div class="rp-slide">
@@ -406,10 +430,12 @@ do_action("ampforwp_single_design_type_handle_d1");
406
  <?php ampforwp_related_post(); ?>
407
  <ul class="clearfix">
408
  <?php
409
-
410
  while( $my_query->have_posts() ) {
411
  $my_query->the_post();
412
-
 
 
413
  ?>
414
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
415
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { ?>
20
  <?php amp_excerpt(); ?>
21
  </div>
22
  <?php } ?>
23
+ <?php
24
+ if( true == ampforwp_get_setting('amp-author-name') && true == ampforwp_get_setting('amp-author-name-display') ) {?>
25
+ <div class="sp-athr mob-athr">
26
+ <span class="athr-tx"><?php echo ampforwp_translation(ampforwp_get_setting('amp-translator-published-by'), 'Published by' ); ?></span>
27
+ <?php amp_author_box(
28
+ array('author_pub_name'=>true,'author_info'=>true)
29
+ ); ?>
30
+ </div>
31
+ <?php }
32
+ if( true == ampforwp_get_setting('swift-date') && true == ampforwp_get_setting('amp-published-date-display')) { ?>
33
+ <div class="post-date mob-date">
34
+ <?php amp_date(); ?><?php edit_post_link(); ?>
35
+ </div>
36
+ <?php do_action('ampforwp_post_views_ctr'); ?>
37
+ <?php } ?>
38
  </div>
39
  <?php
40
  if($paged==0 && $page==0){
68
  <?php } // Swift Featured Image Type 2
69
  } // Swift Featured Image
70
  }?>
71
+ <?php
72
+ // if you want to add anything before or after the content then you can use 'ampforwp_before_post_content' or 'ampforwp_after_post_content' hooks and here is the list of all our hooks - https://ampforwp.com/tutorials/article/hooks-in-ampforwp/
73
+ amp_content();
74
+ ?>
75
  </div>
76
  <?php do_action( 'ampforwp_after_the_post_content_wrp' ); ?>
77
  <?php if (isset($redux_builder_amp['swift-social-position']) && 'below-content' == $redux_builder_amp['swift-social-position']){
112
  echo ampforwp_addThis_support();
113
  } ?>
114
  <?php if( true == ampforwp_get_setting('amp-author-name') ) { ?>
115
+ <div class="sp-athr desk-athr">
116
  <span class="athr-tx"><?php echo ampforwp_translation($redux_builder_amp['amp-translator-published-by'], 'Published by' ); ?></span>
117
  <?php amp_author_box(
118
  array('author_pub_name'=>true,'author_info'=>true)
125
  </div>
126
  <?php }
127
  if( true == ampforwp_get_setting('swift-date') ) { ?>
128
+ <div class="post-date desk-date">
129
  <?php amp_date(); ?><?php edit_post_link(); ?>
130
  </div>
131
  <?php do_action('ampforwp_post_views_ctr'); ?>
137
  <ul class="clearfix">
138
  <?php ampforwp_related_post(); ?>
139
  <?php
140
+ $current_id = ampforwp_get_the_ID();
141
  while( $my_query->have_posts() ) {
142
  $my_query->the_post();
143
+ if(ampforwp_get_the_ID()==$current_id){
144
+ continue;
145
+ }
146
  ?>
147
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
148
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
194
  <?php ampforwp_related_post(); ?>
195
  <ul class="clearfix">
196
  <?php
197
+ $current_id = ampforwp_get_the_ID();
198
  while( $my_query->have_posts() ) {
199
  $my_query->the_post();
200
+ if(ampforwp_get_the_ID()==$current_id){
201
+ continue;
202
+ }
203
  ?>
204
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
205
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
242
  <?php ampforwp_related_post(); ?>
243
  <amp-carousel height="310" layout="fixed-height" type="carousel">
244
  <?php
245
+ $current_id = ampforwp_get_the_ID();
246
  while( $my_query->have_posts() ) {
247
  $my_query->the_post();
248
+ if(ampforwp_get_the_ID()==$current_id){
249
+ continue;
250
+ }
251
  ?>
252
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
253
  <div class="rp-slide">
430
  <?php ampforwp_related_post(); ?>
431
  <ul class="clearfix">
432
  <?php
433
+ $current_id = ampforwp_get_the_ID();
434
  while( $my_query->have_posts() ) {
435
  $my_query->the_post();
436
+ if(ampforwp_get_the_ID()==$current_id){
437
+ continue;
438
+ }
439
  ?>
440
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
441
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { ?>
templates/design-manager/swift/style.php CHANGED
@@ -225,6 +225,7 @@ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
225
  .lb-t:target {opacity: 1;top: 0;bottom: 0;left:0;z-index:2;}
226
  .lb-t:target img {max-height: 100%;max-width: 100%;}
227
  .lb-t:target a.lb-x {top: 25px;}
 
228
  .lb img{cursor:pointer;}
229
  .lb-btn form{position: absolute;top: 200px;left: 0;right: 0;margin: 0 auto;text-align: center;}
230
  .lb-btn .s{padding:10px;}
@@ -287,6 +288,7 @@ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
287
  <?php } ?>
288
  <?php if(isset($redux_builder_amp['swift-element-overlay-color-control'] ['rgba']) && $redux_builder_amp['swift-element-overlay-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;<?php } ?>line-height: 0;display: block;text-indent: 1px;}
289
  .c-btn{float: right;padding: 15px 5px;}
 
290
  .m-ctr{transition: margin 0.3s ease-in-out;}
291
  .m-ctr{<?php if(ampforwp_get_setting('header-overlay-width')){?>width:<?php echo esc_html(ampforwp_get_setting('header-overlay-width'))?>;<?php } ?>height:100%;position: absolute;z-index:99;padding: 2% 0% 100vh 0%;}
292
  .m-menu{display: inline-block;width: 100%;padding: 2px 20px 10px 20px;}
@@ -709,12 +711,28 @@ if ( ampforwp_get_setting('swift-featued-image-type') == 2) { ?>
709
  .post-date .post-edit-link{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;float: right;}
710
  .post-date .post-edit-link:hover{color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
711
  .sp-athr, .amp-tags, .post-date{margin-top:20px;}
 
 
 
 
 
 
 
 
712
  .sp-athr .author-details a, .sp-athr .author-details, .amp-tags span a, .amp-tag {font-size: 15px;color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;font-weight: 400;line-height: 1.5;}
713
  .amp-tags .amp-tag:after{content: "/";display: inline-block;padding: 0px 10px;position: relative;top: -1px;color: #ccc;font-size: 12px;}
714
  .amp-tags .amp-tag:last-child:after{display:none;}
715
  .ss-ic li:before{border-radius: 2px;text-align:center;padding: 4px 6px;}
716
  .sgl table {width: 100%;margin-bottom:25px;}
717
  .sgl th , .sgl td {padding: 0.5em 1em;border: 1px solid #ddd;}
 
 
 
 
 
 
 
 
718
  <?php // Social Sharing Conditional CSS
719
  if($redux_builder_amp['swift-social-position'] == 'above-content'){?>
720
  .shr-txt{display:none;}
225
  .lb-t:target {opacity: 1;top: 0;bottom: 0;left:0;z-index:2;}
226
  .lb-t:target img {max-height: 100%;max-width: 100%;}
227
  .lb-t:target a.lb-x {top: 25px;}
228
+ <?php if ( is_admin_bar_showing() ) {?>.lb-t:target a.lb-x {top: 70px;}<?php } ?>
229
  .lb img{cursor:pointer;}
230
  .lb-btn form{position: absolute;top: 200px;left: 0;right: 0;margin: 0 auto;text-align: center;}
231
  .lb-btn .s{padding:10px;}
288
  <?php } ?>
289
  <?php if(isset($redux_builder_amp['swift-element-overlay-color-control'] ['rgba']) && $redux_builder_amp['swift-element-overlay-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;<?php } ?>line-height: 0;display: block;text-indent: 1px;}
290
  .c-btn{float: right;padding: 15px 5px;}
291
+ header[style] label.c-btn , header[style] .lb-t:target a.lb-x {margin-top: 30px;}
292
  .m-ctr{transition: margin 0.3s ease-in-out;}
293
  .m-ctr{<?php if(ampforwp_get_setting('header-overlay-width')){?>width:<?php echo esc_html(ampforwp_get_setting('header-overlay-width'))?>;<?php } ?>height:100%;position: absolute;z-index:99;padding: 2% 0% 100vh 0%;}
294
  .m-menu{display: inline-block;width: 100%;padding: 2px 20px 10px 20px;}
711
  .post-date .post-edit-link{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;float: right;}
712
  .post-date .post-edit-link:hover{color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
713
  .sp-athr, .amp-tags, .post-date{margin-top:20px;}
714
+ <?php if( true == ampforwp_get_setting('swift-date') && true == ampforwp_get_setting('amp-published-date-display')) { ?>
715
+ @media(min-width:768px){
716
+ .post-date.mob-date {display: none;}
717
+ }
718
+ @media(max-width:768px){
719
+ .post-date.desk-date {display: none;}
720
+ }
721
+ <?php } ?>
722
  .sp-athr .author-details a, .sp-athr .author-details, .amp-tags span a, .amp-tag {font-size: 15px;color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;font-weight: 400;line-height: 1.5;}
723
  .amp-tags .amp-tag:after{content: "/";display: inline-block;padding: 0px 10px;position: relative;top: -1px;color: #ccc;font-size: 12px;}
724
  .amp-tags .amp-tag:last-child:after{display:none;}
725
  .ss-ic li:before{border-radius: 2px;text-align:center;padding: 4px 6px;}
726
  .sgl table {width: 100%;margin-bottom:25px;}
727
  .sgl th , .sgl td {padding: 0.5em 1em;border: 1px solid #ddd;}
728
+ <?php if( true == ampforwp_get_setting('amp-author-name') && true == ampforwp_get_setting('amp-author-name-display') ) {?>
729
+ @media(min-width:768px){
730
+ .sp-athr.mob-athr {display: none;}
731
+ }
732
+ @media(max-width:768px){
733
+ .sp-athr.desk-athr {display: none;}
734
+ }
735
+ <?php } ?>
736
  <?php // Social Sharing Conditional CSS
737
  if($redux_builder_amp['swift-social-position'] == 'above-content'){?>
738
  .shr-txt{display:none;}
templates/features.php CHANGED
@@ -512,7 +512,11 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
512
  $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/index.php';
513
  }
514
 
515
- if ( ampforwp_is_front_page() || ( true == $redux_builder_amp['ampforwp-amp-takeover'] && is_front_page() && $redux_builder_amp['amp-frontpage-select-option']) ) {
 
 
 
 
516
  $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
517
  }
518
 
@@ -1128,6 +1132,9 @@ function ampforwp_remove_schema_data() {
1128
  if(defined('EZOIC__PLUGIN_NAME')){
1129
  ampforwp_remove_filters_for_class( 'shutdown', 'Ezoic_Namespace\Ezoic_Integration_Public', 'ez_buffer_end', 0 );
1130
  }
 
 
 
1131
  // Yoast Schema Compatibility #3332
1132
  if( ampforwp_get_setting('ampforwp-seo-selection') != "yoast"){
1133
  ampforwp_remove_filters_for_class( 'amp_post_template_head', 'WPSEO_Schema', 'json_ld', 9 );
@@ -1136,6 +1143,10 @@ function ampforwp_remove_schema_data() {
1136
  if ( ampforwp_is_front_page() ) {
1137
  ampforwp_remove_filters_for_class( 'the_content', 'SiteOrigin_Panels', 'generate_post_content', 10 );
1138
  }
 
 
 
 
1139
  //SiteOrigin Page builder compatibilty
1140
  //Neglect SOPB If Custom AMP Editor is checked
1141
  if ( $amp_custom_content_enable === 'yes') {
@@ -1471,7 +1482,7 @@ function ampforwp_yoast_the_excerpt(){
1471
  }
1472
  }
1473
  function ampforwp_yoast_excerpt($desc){
1474
- if(ampforwp_is_front_page()){
1475
  $get_meta_excerpt = get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_metadesc', true);
1476
  if(isset($get_meta_excerpt)){
1477
  $desc = $get_meta_excerpt;
@@ -2383,6 +2394,83 @@ function ampforwp_footer_html_output() {
2383
  if( ampforwp_get_setting('amp-footer-text-area-for-html') ) {
2384
  echo ampforwp_get_setting('amp-footer-text-area-for-html') ;
2385
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2386
  }
2387
 
2388
  add_filter( 'amp_post_template_data', 'ampforwp_global_head_scripts');
@@ -2418,8 +2506,12 @@ function ampforwp_header_html_output() {
2418
  $allhtml = preg_replace('/<script(.*?)custom-element=\"(.*?)\"(.*?)src=\"(.*?)\"(.*?)><\/script>/','', $allhtml);
2419
  echo $allhtml;
2420
  }
 
 
 
 
2421
  // amphtml tag when AMP Takeover is enabled #2550
2422
- if(ampforwp_get_setting('ampforwp-amp-takeover') == true){
2423
  $amp_url = "";
2424
  $amp_url = ampforwp_amphtml_generator();
2425
  $canonical_url = "";
@@ -2844,6 +2936,14 @@ function ampforwp_sidebar_content_sanitizer($sidebar){
2844
 
2845
  function ampforwp_modified_search_sidebar( $content ) {
2846
  global $redux_builder_amp;
 
 
 
 
 
 
 
 
2847
  $dom = '';
2848
  $dom = AMP_DOM_Utils::get_dom_from_content($content);
2849
  $nodes = $dom->getElementsByTagName( 'form' );
@@ -2851,7 +2951,7 @@ function ampforwp_modified_search_sidebar( $content ) {
2851
  if ( 0 !== $num_nodes ) {
2852
  for ( $i = 0; $i < $nodes->length; ++$i ) {
2853
  $element = $nodes->item( $i );
2854
- if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && !$redux_builder_amp['ampforwp-amp-takeover'] ) {
2855
  $amp_query_variable = 'amp';
2856
  $amp_query_variable_val = '1';
2857
  }
@@ -3323,8 +3423,9 @@ function ampforwp_meta_description() {
3323
  }
3324
  }
3325
  // All in One Seo Compatibility #1557
3326
- add_filter('aioseop_amp_description', '__return_false');
3327
-
 
3328
  // 55. Call Now Button Feature added
3329
  add_action('ampforwp_call_button','ampforwp_call_button_html_output');
3330
  function ampforwp_call_button_html_output(){
@@ -3872,7 +3973,11 @@ function ampforwp_view_nonamp(){
3872
  $amp_url = ampforwp_amphtml_generator();
3873
  $amp_url = explode('/', $amp_url);
3874
  $amp_url = array_flip($amp_url);
3875
- unset($amp_url['amp']);
 
 
 
 
3876
  $non_amp_url = array_flip($amp_url);
3877
  $non_amp_url = implode('/', $non_amp_url);
3878
  $query_arg_array = $wp->query_vars;
@@ -3884,17 +3989,21 @@ function ampforwp_view_nonamp(){
3884
  $non_amp_url = trailingslashit( $non_amp_url . '?page=' . $page);
3885
  }
3886
 
3887
- if ( ampforwp_get_setting('amp-mobile-redirection') ) {
3888
  $non_amp_url = user_trailingslashit($non_amp_url);
3889
  $non_amp_url = add_query_arg('nonamp','1',$non_amp_url);
3890
  }
3891
  else
 
 
 
 
3892
  $non_amp_url = user_trailingslashit($non_amp_url);
3893
- if ( true == ampforwp_get_setting('ampforwp-amp-takeover') ) {
3894
  $non_amp_url = '';
3895
  }
3896
 
3897
- if ( $non_amp_url ) { ?><a class="view-non-amp" href="<?php echo esc_url(apply_filters('ampforwp_view_nonamp_url', $non_amp_url) ) ?>" <?php echo esc_attr($nofollow); ?> title="<?php echo ampforwp_get_setting('amp-translator-non-amp-page-text') ?>"><?php if(function_exists('pll__')){echo pll__(esc_html__( ampforwp_get_setting('amp-translator-non-amp-page-text'), 'accelerated-mobile-pages'));}else{echo esc_html__( ampforwp_get_setting('amp-translator-non-amp-page-text'), 'accelerated-mobile-pages');?></a> <?php }}
3898
  }
3899
 
3900
  //68. Facebook Instant Articles
@@ -4144,7 +4253,11 @@ function ampforwp_post_paginated_link_generator( $i ) {
4144
  $url = get_preview_post_link( $post, $query_args, $url );
4145
 
4146
  }
4147
- if ( false == ampforwp_get_setting('ampforwp-amp-takeover') ) {
 
 
 
 
4148
  if(ampforwp_get_setting('ampforwp-pagination-link-type')==true && is_singular() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){
4149
  $url = ampforwp_url_controller($url);
4150
  }else{
@@ -4164,8 +4277,10 @@ function ampforwp_post_paginated_content($content){
4164
  global $redux_builder_amp, $page, $multipage;
4165
  $ampforwp_new_content = $ampforwp_the_content = $checker = '';
4166
  if(ampforwp_get_setting('ampforwp-pagination-link-type')==true && is_singular() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){
4167
- $id = ampforwp_get_the_ID();
4168
- $content = get_post_field( 'post_content', $id);
 
 
4169
  if ($content) {
4170
  $sanitizer_obj = new AMPFORWP_Content( $content,
4171
  apply_filters( 'amp_content_embed_handlers', array(
@@ -5004,13 +5119,14 @@ function ampforwp_inline_related_posts(){
5004
  $inline_related_posts_img = '';
5005
  $inline_related_posts = '<div class="amp-wp-content relatedpost">
5006
  <div class="rp">
5007
- <span class="related-title">'.esc_html(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )).'</span>
5008
  <ol class="clearfix">';
5009
  while( $my_query->have_posts() ) {
5010
  $my_query->the_post();
5011
  $related_post_permalink = get_permalink();
5012
  $related_post_permalink = trailingslashit($related_post_permalink);
5013
  $related_post_permalink = ampforwp_url_controller( $related_post_permalink );
 
5014
  if ( ampforwp_has_post_thumbnail() ) {
5015
  $title_class = 'has_related_thumbnail';
5016
  } else {
@@ -5033,7 +5149,7 @@ function ampforwp_inline_related_posts(){
5033
  }
5034
  $thumb_url_2 = ampforwp_aq_resize( $thumb_url_2, $r_width , $r_height , true, false, true );
5035
  $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url_2[0] ).'" width="' . esc_attr($thumb_url_2[1]) . '" height="' . esc_attr($thumb_url_2[2]) . '" layout="responsive"></amp-img>';
5036
- if(!isset($thumb_url_2[0]) && is_null($thumb_url_2[0])){
5037
  $thumb_url = ampforwp_get_post_thumbnail('url');
5038
  $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url ).'" width="' . esc_attr(220) . '" height="' . esc_attr(134) . '" layout="responsive"></amp-img>';
5039
  }
@@ -5051,6 +5167,10 @@ function ampforwp_inline_related_posts(){
5051
  $thumb_width = $thumb_url_2[1];
5052
  $thumb_height = $thumb_url_2[2];
5053
  $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url ).'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" layout="responsive" ></amp-img>';
 
 
 
 
5054
  }
5055
  $inline_related_posts_img = apply_filters("ampforwp_modify_inline_rp_loop_image",$inline_related_posts_img);
5056
  $inline_related_posts .= $inline_related_posts_img;
@@ -5418,8 +5538,8 @@ if( ! function_exists( 'ampforwp_view_amp_admin_bar' ) ) {
5418
  }
5419
  // Check for Screen base, user ability to read and visibility
5420
  if ($current_access && (isset($post->ID) && current_user_can('read_post', $post->ID ))
5421
- && ( $wp_post_types[$post->post_type]->public )
5422
- && ( $wp_post_types[$post->post_type]->show_in_admin_bar ) ) {
5423
  // Check if current post type is AMPed or not
5424
  if( $supported_amp_post_types && in_array($post->post_type, $supported_amp_post_types) ){
5425
  // If AMP on Posts or Pages is off then do nothing
@@ -5784,6 +5904,16 @@ if ( ! function_exists('ampforwp_allowed_tags') ) {
5784
  add_action('ampforwp_after_post_content', 'ampforwp_list_subpages');
5785
  if ( ! function_exists('ampforwp_list_subpages') ) {
5786
  function ampforwp_list_subpages() {
 
 
 
 
 
 
 
 
 
 
5787
  global $post, $redux_builder_amp;
5788
  if ( is_page() && true == $redux_builder_amp['ampforwp_subpages_list'] ) {
5789
  $pages = '';
@@ -6070,7 +6200,8 @@ function ampforwp_is_non_amp( $type="" ) {
6070
  if ( false !== get_query_var( 'amp', false ) ) {
6071
  return false;
6072
  }
6073
- if (""===$type && isset( $redux_builder_amp['ampforwp-amp-takeover']) && true == $redux_builder_amp['ampforwp-amp-takeover'] ) {
 
6074
  $non_amp = true;
6075
 
6076
 
@@ -6174,7 +6305,22 @@ function ampforwp_is_non_amp( $type="" ) {
6174
  }
6175
  return $non_amp;
6176
  }
6177
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6178
  // Remove wpautop from specific posts which contain amp-components
6179
  add_action('pre_amp_render_post','ampforwp_custom_wpautop');
6180
  function ampforwp_custom_wpautop(){
@@ -6846,10 +6992,10 @@ function ampforwp_thrive_content($content){
6846
  add_action( 'add_meta_boxes', 'ampforwp_ia_meta_box' );
6847
  if ( ! function_exists('ampforwp_ia_meta_box') ) {
6848
  function ampforwp_ia_meta_box() {
6849
- global $redux_builder_amp, $post;
6850
 
6851
  if ( ampforwp_role_based_access_options() == true ) {
6852
- if( true == $redux_builder_amp['fb-instant-article-switch'] && $post->post_type == 'post' ) {
6853
  add_meta_box( 'ampforwp_ia_meta', esc_html__( 'Show Instant Article for Current Post?','accelerated-mobile-pages' ), 'ampforwp_ia_meta_callback', 'post','side' );
6854
  }
6855
  }
@@ -7221,7 +7367,11 @@ function ampforwp_embedly_sanitizer( $sanitizer_classes ) {
7221
  add_filter('ampforwp_is_amp_endpoint_takeover', "ampforwp_bulktool_takeover");
7222
  if (! function_exists('ampforwp_bulktool_takeover') ) {
7223
  function ampforwp_bulktool_takeover($data){
7224
- if ( true == ampforwp_get_setting('ampforwp-amp-takeover') || true == ampforwp_get_setting('ampforwp-amp-convert-to-wp')) {
 
 
 
 
7225
  $bulk_option = ampforwp_get_setting('amp-pages-meta-default');
7226
  $ampforwp_stored_meta = get_post_meta( ampforwp_get_the_ID(),'ampforwp-amp-on-off',true);
7227
  if(is_page() && $bulk_option == "hide" && !isset($ampforwp_stored_meta)){
@@ -8008,12 +8158,16 @@ function ampforwp_head_css(){
8008
  if ( $page >= '2') {
8009
  $non_amp_url = trailingslashit( $non_amp_url . '?page=' . $page);
8010
  }
8011
- if ( ampforwp_get_setting('amp-mobile-redirection') ) {
8012
  $non_amp_url = add_query_arg('nonamp','1',$non_amp_url);
8013
  }
8014
  else
8015
  $non_amp_url = user_trailingslashit($non_amp_url);
8016
- if ( true == ampforwp_get_setting('ampforwp-amp-takeover') ) {
 
 
 
 
8017
  $non_amp_url = '';
8018
  }
8019
  if ( $non_amp_url ) {
@@ -8329,7 +8483,7 @@ function ampforwp_remove_unwanted_code($content){
8329
  }
8330
  add_filter('ampforwp_the_content_last_filter','ampforwp_include_required_scripts',12);
8331
  function ampforwp_include_required_scripts($content){
8332
- $allscripts = '';
8333
  $comp_to_remove_arr = array();
8334
  preg_match_all('/<\/amp-(.*?)>/', $content, $matches);
8335
  if(isset($matches[1][0])){
@@ -8782,20 +8936,18 @@ function ampforwp_rank_math_external_link_newtab($content){
8782
  }
8783
  return $content;
8784
  }
8785
- /* add_action( 'wp_ajax_ampforwp_referesh_related_post', 'ampforwp_referesh_related_post' );
8786
  function ampforwp_referesh_related_post(){
8787
  if(!wp_verify_nonce($_POST['verify_nonce'],'ampforwp_refresh_related_poost') ){
8788
  echo json_encode(array('status'=>403,'message'=>'user request is not allowed')) ;
8789
  die;
8790
  }
8791
  $orderby = 'ID';
8792
- if( true == ampforwp_get_setting('ampforwp-single-order-of-related-posts')){
8793
- $orderby = 'rand';
8794
- }
8795
  $args=array(
8796
  'fields' => 'ids',
8797
  'post_type' => 'post',
8798
- 'posts_per_page'=> '50',
8799
  'orderby' => $orderby,
8800
  'ignore_sticky_posts'=>1,
8801
  'has_password' => false ,
@@ -8813,7 +8965,7 @@ function ampforwp_referesh_related_post(){
8813
  $my_query->the_post();
8814
  update_post_meta(get_the_ID(),'ampforwp-amp-on-off','default');
8815
  }
8816
- $args=array(
8817
  'fields' => 'ids',
8818
  'post_status' => 'publish',
8819
  'ignore_sticky_posts' => true,
@@ -8830,18 +8982,10 @@ function ampforwp_referesh_related_post(){
8830
  while( $my_query->have_posts() ) {
8831
  $my_query->the_post();
8832
  update_post_meta(get_the_ID(),'ampforwp-ia-on-off','default');
8833
- }
8834
- delete_transient('ampforwp_get_not_meta_post_count');
8835
  $data['response'] = ampforwp_get_post_percent();
8836
  echo json_encode($data);
8837
  }
8838
- add_action( 'save_post', 'ampforwp_delete_refresh_related_post_trans');
8839
- function ampforwp_delete_refresh_related_post_trans(){
8840
- delete_transient('ampforwp_get_not_meta_post_count');
8841
- delete_transient('ampforwp_get_total_post_count');
8842
- }
8843
- */
8844
-
8845
 
8846
  // HIDE/SHOW TAG AND CATEGORY #4326
8847
  function ampforwp_save_taxonomy_meta($term_id){
@@ -8914,7 +9058,7 @@ function ampforwp_extra_category_fields( $tag ) {
8914
  $term_data = ampforwp_get_taxonomy_meta($tag->term_id);
8915
  $visible = '';
8916
  $visible_status = '';
8917
- if(isset($term_data['visible'])){
8918
  $visible = $term_data['visible'][0];
8919
  $visible_status = $term_data['visible_status'][0];
8920
  }
@@ -9226,4 +9370,173 @@ function ampforwp_i2prosandcons(){
9226
  .i2-pros-cons-wrapper .i2-cons-title, .i2-pros-cons-wrapper .i2-pros-title {
9227
  color: <?php echo ampforwp_sanitize_color($headingColor); ?>;
9228
  }
9229
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
512
  $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/index.php';
513
  }
514
 
515
+ $mob_pres_link = false;
516
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
517
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
518
+ }
519
+ if ( ampforwp_is_front_page() || ( (true == ampforwp_get_setting('ampforwp-amp-takeover') || $mob_pres_link == true) && is_front_page() && ampforwp_get_setting('amp-frontpage-select-option')) ) {
520
  $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
521
  }
522
 
1132
  if(defined('EZOIC__PLUGIN_NAME')){
1133
  ampforwp_remove_filters_for_class( 'shutdown', 'Ezoic_Namespace\Ezoic_Integration_Public', 'ez_buffer_end', 0 );
1134
  }
1135
+ if (class_exists('AddWidgetAfterContent')) {
1136
+ ampforwp_remove_filters_for_class( 'the_content', 'AddWidgetAfterContent', 'insert_after_content', 10 );
1137
+ }
1138
  // Yoast Schema Compatibility #3332
1139
  if( ampforwp_get_setting('ampforwp-seo-selection') != "yoast"){
1140
  ampforwp_remove_filters_for_class( 'amp_post_template_head', 'WPSEO_Schema', 'json_ld', 9 );
1143
  if ( ampforwp_is_front_page() ) {
1144
  ampforwp_remove_filters_for_class( 'the_content', 'SiteOrigin_Panels', 'generate_post_content', 10 );
1145
  }
1146
+ //Addition HTTP added in canonical from Yoast SEO Multilingual #4970
1147
+ if (class_exists('WPML_WPSEO_Filters')) {
1148
+ ampforwp_remove_filters_for_class( 'wpseo_canonical', 'WPML_WPSEO_Filters', 'canonical_filter', 10 );
1149
+ }
1150
  //SiteOrigin Page builder compatibilty
1151
  //Neglect SOPB If Custom AMP Editor is checked
1152
  if ( $amp_custom_content_enable === 'yes') {
1482
  }
1483
  }
1484
  function ampforwp_yoast_excerpt($desc){
1485
+ if(ampforwp_is_front_page() && empty($desc)){
1486
  $get_meta_excerpt = get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_metadesc', true);
1487
  if(isset($get_meta_excerpt)){
1488
  $desc = $get_meta_excerpt;
2394
  if( ampforwp_get_setting('amp-footer-text-area-for-html') ) {
2395
  echo ampforwp_get_setting('amp-footer-text-area-for-html') ;
2396
  }
2397
+ //Quantcast Support #4951
2398
+ if (ampforwp_get_setting('amp-quantcast-notice-switch')) {
2399
+ $id = $hashcode = $country = $name = '';
2400
+ $id = ampforwp_get_setting('amp-quantcast-id');
2401
+ $hashcode = ampforwp_get_setting('amp-quantcast-hashcode');
2402
+ $country = ampforwp_get_setting('amp-quantcast-publishercountrycode');
2403
+ $name = ampforwp_get_setting('amp-quantcast-publishername');
2404
+ if (!empty($id) && !empty($hashcode) && !empty($country) && !empty($name) ) {?>
2405
+ <amp-consent id="quantcast" layout="nodisplay">
2406
+ <script type="application/json">
2407
+ {
2408
+ "consentInstanceId": "quantcast",
2409
+ "checkConsentHref": "https://apis.quantcast.mgr.consensu.org/amp/check-consent",
2410
+ "consentRequired": "remote",
2411
+ "promptUISrc": "https://quantcast.mgr.consensu.org/tcfv2/amp.html",
2412
+ "clientConfig": {
2413
+ "coreConfig": {
2414
+ "quantcastAccountId": "<?php echo esc_html($id); ?>",
2415
+ "privacyMode": ["GDPR"],
2416
+ "hashCode": "<?php echo esc_html($hashcode); ?>",
2417
+ "publisherCountryCode": "<?php echo esc_html($country); ?>",
2418
+ "publisherName": "<?php echo esc_html($name); ?>",
2419
+ "vendorPurposeIds": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
2420
+ "vendorFeaturesIds": [1, 2, 3],
2421
+ "vendorPurposeLegitimateInterestIds": [2, 3, 4, 5, 6, 7, 8, 9, 10],
2422
+ "vendorSpecialFeaturesIds": [1, 2],
2423
+ "vendorSpecialPurposesIds": [1, 2],
2424
+ "googleEnabled": false,
2425
+ "lang_": "en",
2426
+ "displayUi": "always",
2427
+ "publisherConsentRestrictionIds": [],
2428
+ "publisherLIRestrictionIds": [],
2429
+ "publisherPurposeIds": [],
2430
+ "publisherPurposeLegitimateInterestIds": [],
2431
+ "publisherSpecialPurposesIds": [],
2432
+ "publisherFeaturesIds": [],
2433
+ "publisherSpecialFeaturesIds": [],
2434
+ "stacks": [1, 42],
2435
+ "vendorListUpdateFreq": 30
2436
+ }
2437
+ }
2438
+ }
2439
+ </script>
2440
+ <!-- PRIVACY BUTTON LOWER RIGHT -->
2441
+ <div id="postPromptUI">
2442
+ <button role="button" on="tap:quantcast.prompt()">
2443
+ <svg style="height:20px">
2444
+ <g fill="none">
2445
+ <g fill="#FFF">
2446
+ <path
2447
+ d="M16 10L15 9C15 9 15 8 15 8L16 7C16 7 16 6 16 6 16
2448
+ 5 15 4 14 3 14 2 13 2 13 3L12 3C12 3 11 3 11 2L11 1C11 1 10 0 10 0 9 0 7 0 6 0 6 0
2449
+ 5 1 5 1L5 2C5 3 4 3 4 3L3 3C3 2 2 2 2 3 1 4 0 5 0 6 0 6 0 7 0 7L1 8C1 8 1 9 1 9L0
2450
+ 10C0 10 0 11 0 11 0 12 1 13 2 14 2 15 3 15 3 14L4 14C4 14 5 14 5 15L5 16C5 16 6 17
2451
+ 6 17 7 17 9 17 10 17 10 17 11 16 11 16L11 15C11 14 12 14 12 14L13 14C13 15 14 15 14
2452
+ 14 15 13 16 12 16 11 16 11 16 10 16 10ZM13 13L12 13C11 13 11 13 9 14L9 16C9 16 7 16 7
2453
+ 16L7 14C5 14 5 13 4 13L3 13C2 13 1 12 1 11L3 10C2 9 2 8 3 7L1 6C1 5 2 4 3 4L4 4C5 4 5
2454
+ 3 7 3L7 1C7 1 9 1 9 1L9 3C11 3 11 4 12 4L13 4C14 4 15 5 15 6L13 7C14 8 14 9 13 10L15
2455
+ 11C15 12 14 13 13 13ZM8 5C6 5 5 7 5 9 5 10 6 12 8 12 10 12 11 10 11 9 11 7 10 5 8 5ZM8
2456
+ 11C7 11 6 10 6 9 6 7 7 6 8 6 9 6 10 7 10 9 10 10 9 11 8 11Z" />
2457
+ </g>
2458
+ </g>
2459
+ </svg>
2460
+ PRIVACY
2461
+ </button>
2462
+ </div>
2463
+ </amp-consent>
2464
+ <amp-geo layout="nodisplay">
2465
+ <script type="application/json">
2466
+ {
2467
+ "ISOCountryGroups": {
2468
+ "<?php echo esc_html($country); ?>": ["<?php echo esc_html($country); ?>"]
2469
+ }
2470
+ }
2471
+ </script>
2472
+ </amp-geo>
2473
+ <?php } }
2474
  }
2475
 
2476
  add_filter( 'amp_post_template_data', 'ampforwp_global_head_scripts');
2506
  $allhtml = preg_replace('/<script(.*?)custom-element=\"(.*?)\"(.*?)src=\"(.*?)\"(.*?)><\/script>/','', $allhtml);
2507
  echo $allhtml;
2508
  }
2509
+ $mob_pres_link = false;
2510
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
2511
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
2512
+ }
2513
  // amphtml tag when AMP Takeover is enabled #2550
2514
+ if(ampforwp_get_setting('ampforwp-amp-takeover') == true || $mob_pres_link == true){
2515
  $amp_url = "";
2516
  $amp_url = ampforwp_amphtml_generator();
2517
  $canonical_url = "";
2936
 
2937
  function ampforwp_modified_search_sidebar( $content ) {
2938
  global $redux_builder_amp;
2939
+ $mob_pres_link = false;
2940
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
2941
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
2942
+ }
2943
+ $mob_pres_link = false;
2944
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
2945
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
2946
+ }
2947
  $dom = '';
2948
  $dom = AMP_DOM_Utils::get_dom_from_content($content);
2949
  $nodes = $dom->getElementsByTagName( 'form' );
2951
  if ( 0 !== $num_nodes ) {
2952
  for ( $i = 0; $i < $nodes->length; ++$i ) {
2953
  $element = $nodes->item( $i );
2954
+ if (ampforwp_get_setting('ampforwp-amp-takeover') == false && $mob_pres_link == false ) {
2955
  $amp_query_variable = 'amp';
2956
  $amp_query_variable_val = '1';
2957
  }
3423
  }
3424
  }
3425
  // All in One Seo Compatibility #1557
3426
+ if(defined( 'AIOSEO_VERSION' ) && version_compare(AIOSEO_VERSION,'4.0.0', '<')){
3427
+ add_filter('aioseop_amp_description', '__return_false');
3428
+ }
3429
  // 55. Call Now Button Feature added
3430
  add_action('ampforwp_call_button','ampforwp_call_button_html_output');
3431
  function ampforwp_call_button_html_output(){
3973
  $amp_url = ampforwp_amphtml_generator();
3974
  $amp_url = explode('/', $amp_url);
3975
  $amp_url = array_flip($amp_url);
3976
+ $endpoint = AMPFORWP_AMP_QUERY_VAR;
3977
+ if (ampforwp_get_setting('amp-core-end-point')) {
3978
+ $endpoint = '?'. $endpoint;
3979
+ }
3980
+ unset($amp_url[$endpoint]);
3981
  $non_amp_url = array_flip($amp_url);
3982
  $non_amp_url = implode('/', $non_amp_url);
3983
  $query_arg_array = $wp->query_vars;
3989
  $non_amp_url = trailingslashit( $non_amp_url . '?page=' . $page);
3990
  }
3991
 
3992
+ if ( ampforwp_get_setting('amp-mobile-redirection')==true && ampforwp_get_setting('amp-mob-redirection-pres-link')==false) {
3993
  $non_amp_url = user_trailingslashit($non_amp_url);
3994
  $non_amp_url = add_query_arg('nonamp','1',$non_amp_url);
3995
  }
3996
  else
3997
+ $mob_pres_link = false;
3998
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
3999
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
4000
+ }
4001
  $non_amp_url = user_trailingslashit($non_amp_url);
4002
+ if ( true == ampforwp_get_setting('ampforwp-amp-takeover') || $mob_pres_link == true) {
4003
  $non_amp_url = '';
4004
  }
4005
 
4006
+ if ( $non_amp_url ) { ?><a class="view-non-amp" href="<?php echo esc_url(apply_filters('ampforwp_view_nonamp_url', $non_amp_url) ) ?>" <?php echo esc_attr($nofollow); ?> title="<?php echo ampforwp_get_setting('amp-translator-non-amp-page-text') ?>"><?php if(function_exists('pll__')){echo pll__(esc_html__( ampforwp_get_setting('amp-translator-non-amp-page-text'), 'accelerated-mobile-pages'));}else{echo esc_html__( ampforwp_get_setting('amp-translator-non-amp-page-text'), 'accelerated-mobile-pages');}?></a> <?php }
4007
  }
4008
 
4009
  //68. Facebook Instant Articles
4253
  $url = get_preview_post_link( $post, $query_args, $url );
4254
 
4255
  }
4256
+ $mob_pres_link = false;
4257
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
4258
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
4259
+ }
4260
+ if ( false == ampforwp_get_setting('ampforwp-amp-takeover') && $mob_pres_link == false) {
4261
  if(ampforwp_get_setting('ampforwp-pagination-link-type')==true && is_singular() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){
4262
  $url = ampforwp_url_controller($url);
4263
  }else{
4277
  global $redux_builder_amp, $page, $multipage;
4278
  $ampforwp_new_content = $ampforwp_the_content = $checker = '';
4279
  if(ampforwp_get_setting('ampforwp-pagination-link-type')==true && is_singular() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){
4280
+ if (get_query_var('paged') > 1) {
4281
+ $id = ampforwp_get_the_ID();
4282
+ $content = get_post_field( 'post_content', $id);
4283
+ }
4284
  if ($content) {
4285
  $sanitizer_obj = new AMPFORWP_Content( $content,
4286
  apply_filters( 'amp_content_embed_handlers', array(
5119
  $inline_related_posts_img = '';
5120
  $inline_related_posts = '<div class="amp-wp-content relatedpost">
5121
  <div class="rp">
5122
+ <span class="related-title">'.esc_html(ampforwp_translation( ampforwp_get_setting('amp-translator-incontent-related-text'), 'Related Post' )).'</span>
5123
  <ol class="clearfix">';
5124
  while( $my_query->have_posts() ) {
5125
  $my_query->the_post();
5126
  $related_post_permalink = get_permalink();
5127
  $related_post_permalink = trailingslashit($related_post_permalink);
5128
  $related_post_permalink = ampforwp_url_controller( $related_post_permalink );
5129
+ $related_post_permalink = ampforwp_modify_url_utm_params($related_post_permalink);
5130
  if ( ampforwp_has_post_thumbnail() ) {
5131
  $title_class = 'has_related_thumbnail';
5132
  } else {
5149
  }
5150
  $thumb_url_2 = ampforwp_aq_resize( $thumb_url_2, $r_width , $r_height , true, false, true );
5151
  $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url_2[0] ).'" width="' . esc_attr($thumb_url_2[1]) . '" height="' . esc_attr($thumb_url_2[2]) . '" layout="responsive"></amp-img>';
5152
+ if(!isset($thumb_url_2[0]) && is_null($thumb_url_2[0]) || wp_check_filetype(ampforwp_get_post_thumbnail('url') == 'svg')){
5153
  $thumb_url = ampforwp_get_post_thumbnail('url');
5154
  $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url ).'" width="' . esc_attr(220) . '" height="' . esc_attr(134) . '" layout="responsive"></amp-img>';
5155
  }
5167
  $thumb_width = $thumb_url_2[1];
5168
  $thumb_height = $thumb_url_2[2];
5169
  $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url ).'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" layout="responsive" ></amp-img>';
5170
+ if(!isset($thumb_url_2[0]) && is_null($thumb_url_2[0]) || wp_check_filetype(ampforwp_get_post_thumbnail('url') == 'svg')){
5171
+ $thumb_url = ampforwp_get_post_thumbnail('url');
5172
+ $inline_related_posts_img = '<amp-img src="'.esc_url( $thumb_url ).'" width="' . esc_attr(150) . '" height="' . esc_attr(150) . '" layout="responsive"></amp-img>';
5173
+ }
5174
  }
5175
  $inline_related_posts_img = apply_filters("ampforwp_modify_inline_rp_loop_image",$inline_related_posts_img);
5176
  $inline_related_posts .= $inline_related_posts_img;
5538
  }
5539
  // Check for Screen base, user ability to read and visibility
5540
  if ($current_access && (isset($post->ID) && current_user_can('read_post', $post->ID ))
5541
+ && ( isset ( $wp_post_types[ $post->post_type ]->public ) && $wp_post_types[$post->post_type]->public )
5542
+ && ( isset ( $wp_post_types[ $post->post_type ]->show_in_admin_bar ) && $wp_post_types[$post->post_type]->show_in_admin_bar ) ) {
5543
  // Check if current post type is AMPed or not
5544
  if( $supported_amp_post_types && in_array($post->post_type, $supported_amp_post_types) ){
5545
  // If AMP on Posts or Pages is off then do nothing
5904
  add_action('ampforwp_after_post_content', 'ampforwp_list_subpages');
5905
  if ( ! function_exists('ampforwp_list_subpages') ) {
5906
  function ampforwp_list_subpages() {
5907
+ if (class_exists('AddWidgetAfterContent')) {
5908
+ $sanitized_output = '';
5909
+ $sanitized_output = ampforwp_sidebar_content_sanitizer('add-widget-after-content');
5910
+ if ( $sanitized_output) {
5911
+ $sanitized_output = $sanitized_output->get_amp_content();?>
5912
+ <div class="amp-add-widget-after-content">
5913
+ <?php echo do_shortcode($sanitized_output); ?>
5914
+ </div>
5915
+ <?php }
5916
+ }
5917
  global $post, $redux_builder_amp;
5918
  if ( is_page() && true == $redux_builder_amp['ampforwp_subpages_list'] ) {
5919
  $pages = '';
6200
  if ( false !== get_query_var( 'amp', false ) ) {
6201
  return false;
6202
  }
6203
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
6204
+ if (""===$type && (ampforwp_get_setting('ampforwp-amp-takeover') || $mob_pres_link == true) ) {
6205
  $non_amp = true;
6206
 
6207
 
6305
  }
6306
  return $non_amp;
6307
  }
6308
+ function ampforwp_mobile_redirect_preseve_link(){
6309
+ $redirectToAMP = false;
6310
+ if(ampforwp_get_setting('amp-mobile-redirection') == true && ampforwp_get_setting('amp-mob-redirection-pres-link') == true){
6311
+ require_once AMPFORWP_PLUGIN_DIR.'/includes/vendor/Mobile_Detect.php';
6312
+ $mobile_detect = new AMPforWP_Mobile_Detect;
6313
+ $isMobile = $mobile_detect->isMobile();
6314
+ $isTablet = $mobile_detect->isTablet();
6315
+ $isTabletUserAction = ampforwp_get_setting('amp-tablet-redirection');
6316
+ if( $isMobile && $isTabletUserAction && $isTablet ){ //Only For tablet
6317
+ $redirectToAMP = true;
6318
+ }else if($isMobile && !$isTablet){ // Only for mobile
6319
+ $redirectToAMP = true;
6320
+ }
6321
+ }
6322
+ return $redirectToAMP;
6323
+ }
6324
  // Remove wpautop from specific posts which contain amp-components
6325
  add_action('pre_amp_render_post','ampforwp_custom_wpautop');
6326
  function ampforwp_custom_wpautop(){
6992
  add_action( 'add_meta_boxes', 'ampforwp_ia_meta_box' );
6993
  if ( ! function_exists('ampforwp_ia_meta_box') ) {
6994
  function ampforwp_ia_meta_box() {
6995
+ global $post;
6996
 
6997
  if ( ampforwp_role_based_access_options() == true ) {
6998
+ if( ampforwp_get_setting('fb-instant-article-switch') && $post->post_type == 'post' ) {
6999
  add_meta_box( 'ampforwp_ia_meta', esc_html__( 'Show Instant Article for Current Post?','accelerated-mobile-pages' ), 'ampforwp_ia_meta_callback', 'post','side' );
7000
  }
7001
  }
7367
  add_filter('ampforwp_is_amp_endpoint_takeover', "ampforwp_bulktool_takeover");
7368
  if (! function_exists('ampforwp_bulktool_takeover') ) {
7369
  function ampforwp_bulktool_takeover($data){
7370
+ $mob_pres_link = false;
7371
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
7372
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
7373
+ }
7374
+ if ( true == ampforwp_get_setting('ampforwp-amp-takeover') || true == ampforwp_get_setting('ampforwp-amp-convert-to-wp') || $mob_pres_link == true) {
7375
  $bulk_option = ampforwp_get_setting('amp-pages-meta-default');
7376
  $ampforwp_stored_meta = get_post_meta( ampforwp_get_the_ID(),'ampforwp-amp-on-off',true);
7377
  if(is_page() && $bulk_option == "hide" && !isset($ampforwp_stored_meta)){
8158
  if ( $page >= '2') {
8159
  $non_amp_url = trailingslashit( $non_amp_url . '?page=' . $page);
8160
  }
8161
+ if ( ampforwp_get_setting('amp-mobile-redirection') == true && ampforwp_get_setting('amp-mob-redirection-pres-link') == false) {
8162
  $non_amp_url = add_query_arg('nonamp','1',$non_amp_url);
8163
  }
8164
  else
8165
  $non_amp_url = user_trailingslashit($non_amp_url);
8166
+ $mob_pres_link = false;
8167
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
8168
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
8169
+ }
8170
+ if ( true == ampforwp_get_setting('ampforwp-amp-takeover') || $mob_pres_link == true) {
8171
  $non_amp_url = '';
8172
  }
8173
  if ( $non_amp_url ) {
8483
  }
8484
  add_filter('ampforwp_the_content_last_filter','ampforwp_include_required_scripts',12);
8485
  function ampforwp_include_required_scripts($content){
8486
+ $allscripts = $is_script = '';
8487
  $comp_to_remove_arr = array();
8488
  preg_match_all('/<\/amp-(.*?)>/', $content, $matches);
8489
  if(isset($matches[1][0])){
8936
  }
8937
  return $content;
8938
  }
8939
+ add_action( 'wp_ajax_ampforwp_referesh_related_post', 'ampforwp_referesh_related_post' );
8940
  function ampforwp_referesh_related_post(){
8941
  if(!wp_verify_nonce($_POST['verify_nonce'],'ampforwp_refresh_related_poost') ){
8942
  echo json_encode(array('status'=>403,'message'=>'user request is not allowed')) ;
8943
  die;
8944
  }
8945
  $orderby = 'ID';
8946
+
 
 
8947
  $args=array(
8948
  'fields' => 'ids',
8949
  'post_type' => 'post',
8950
+ 'posts_per_page'=> 30,
8951
  'orderby' => $orderby,
8952
  'ignore_sticky_posts'=>1,
8953
  'has_password' => false ,
8965
  $my_query->the_post();
8966
  update_post_meta(get_the_ID(),'ampforwp-amp-on-off','default');
8967
  }
8968
+ /*$args=array(
8969
  'fields' => 'ids',
8970
  'post_status' => 'publish',
8971
  'ignore_sticky_posts' => true,
8982
  while( $my_query->have_posts() ) {
8983
  $my_query->the_post();
8984
  update_post_meta(get_the_ID(),'ampforwp-ia-on-off','default');
8985
+ }*/
 
8986
  $data['response'] = ampforwp_get_post_percent();
8987
  echo json_encode($data);
8988
  }
 
 
 
 
 
 
 
8989
 
8990
  // HIDE/SHOW TAG AND CATEGORY #4326
8991
  function ampforwp_save_taxonomy_meta($term_id){
9058
  $term_data = ampforwp_get_taxonomy_meta($tag->term_id);
9059
  $visible = '';
9060
  $visible_status = '';
9061
+ if(isset($term_data['visible']) && !empty($term_data['visible'])){
9062
  $visible = $term_data['visible'][0];
9063
  $visible_status = $term_data['visible_status'][0];
9064
  }
9370
  .i2-pros-cons-wrapper .i2-cons-title, .i2-pros-cons-wrapper .i2-pros-title {
9371
  color: <?php echo ampforwp_sanitize_color($headingColor); ?>;
9372
  }
9373
+ <?php }
9374
+ function ampforwp_modify_url_utm_params($url){
9375
+ if(true == ampforwp_get_setting('ampforwp-related-post-utm-tracking-switch') && !empty(ampforwp_get_setting('ampforwp-related-posts-utm-tracking'))){
9376
+ $modify_url = ampforwp_get_setting('ampforwp-related-posts-utm-tracking');
9377
+ $modify_url = apply_filters('ampforwp_modify_related_post_url', $modify_url);
9378
+ $url = add_query_arg($modify_url, '' , $url);
9379
+ return esc_url_raw($url);
9380
+ }
9381
+ return esc_url_raw($url);
9382
+ }
9383
+ if(true == ampforwp_get_setting('ampforwp-recent-post-utm-tracking-switch') && !empty(ampforwp_get_setting('ampforwp-recent-posts-utm-tracking'))){
9384
+ add_filter('ampforwp_loop_permalink_update','ampforwp_recent_posts_utm_tracking');
9385
+ }
9386
+ function ampforwp_recent_posts_utm_tracking($recent_post_permalink){
9387
+ if(is_single()){
9388
+ $modify_url = ampforwp_get_setting('ampforwp-recent-posts-utm-tracking');
9389
+ $modify_url = apply_filters('ampforwp_modify_recent_post_url', $modify_url);
9390
+ $recent_post_permalink = add_query_arg($modify_url, '' , $recent_post_permalink);
9391
+ return esc_url_raw($recent_post_permalink);
9392
+ }
9393
+ return esc_url_raw($recent_post_permalink);
9394
+ }
9395
+ if(ampforwp_get_setting('ampforwp-facebook-comments-support')){
9396
+ add_action('amp_post_template_head','ampforwp_facebook_moderation_tool');
9397
+ }
9398
+ function ampforwp_facebook_moderation_tool(){
9399
+ $facebook_app_id = ampforwp_get_setting('ampforwp-fb-moderation-app-id');
9400
+ if($facebook_app_id!=''){
9401
+ ?>
9402
+ <meta property="fb:app_id" content="<?php echo esc_attr($facebook_app_id);?>" />
9403
+ <?php
9404
+ }
9405
+ $facebook_admin_id = ampforwp_get_setting('ampforwp-fb-moderation-admin-id');
9406
+ if($facebook_admin_id!=''){
9407
+ $ids = explode(",", $facebook_admin_id);
9408
+ for($i=0;$i<count($ids);$i++){
9409
+ $id = $ids[$i];
9410
+ if($id!=''){
9411
+ ?>
9412
+ <meta property="fb:admins" content="<?php echo esc_attr($id);?>"/>
9413
+ <?php
9414
+ }
9415
+ }
9416
+ }
9417
+ }
9418
+
9419
+ //Schema Pro FAQ block compatibility #4956
9420
+ add_filter('ampforwp_modify_the_content','ampforwp_schema_pro_faq_block');
9421
+ function ampforwp_schema_pro_faq_block($content_buffer){
9422
+ if (!function_exists('on_bsf_aiosrs_pro_activate')) {
9423
+ return $content_buffer;
9424
+ }
9425
+ preg_match_all('/<div class="wp-block-wpsp-faq(.*?)class="wpsp-question">(.*?)<\/(.*?)>(.*?)class="wpsp-faq-content"><span><p>(.*?)<\/p>/', $content_buffer, $matches);
9426
+ if(is_array($matches)){
9427
+ $schema = array();
9428
+ $schema['@context'] = 'https://schema.org';
9429
+ $schema['type'] = 'FAQPage';
9430
+ for($i=0;$i<count($matches[2]);$i++){
9431
+ $questions = $matches[2];
9432
+ $answers = $matches[5];
9433
+ foreach ( $questions as $key => $question ) {
9434
+ $schema['mainEntity'][ $key ]['@type'] = 'Question';
9435
+ $schema['mainEntity'][ $key ]['name'] = $question;
9436
+ }
9437
+ foreach ( $answers as $key => $answer ) {
9438
+ $schema['mainEntity'][ $key ]['acceptedAnswer']['@type'] = 'Answer';
9439
+ $schema['mainEntity'][ $key ]['acceptedAnswer']['text'] = $answer;
9440
+ }
9441
+ }
9442
+ $schema = '<script type="application/ld+json">'.wp_json_encode( $schema, JSON_UNESCAPED_UNICODE ).'</script>';
9443
+ $content_buffer = preg_replace('/(<div class="wp-block-wpsp-faq\s(.*?)<\/div>)/s', ''.$schema.'$1', $content_buffer);
9444
+ }
9445
+ return $content_buffer;
9446
+ }
9447
+
9448
+ function ampforwp_get_gitty_image_embed( $html, $url, $attr, $post_ID ) {
9449
+ global $getty_img_content;
9450
+ $getty_img_content[] = $html;
9451
+ return $html;
9452
+ }
9453
+
9454
+ function ampforwp_getty_image_compatibility($content){
9455
+ global $getty_img_content;
9456
+ if(is_array($getty_img_content)){
9457
+ if(preg_match_all('/<a id="(.*?)"\sclass="gie-single(.*?)">Embed from Getty Images<\/a>/', $content, $matches)){
9458
+ if(isset($matches[0])){
9459
+ for($i=0;$i<count($matches[0]);$i++){
9460
+ $full_content = $matches[0][$i];
9461
+ $img_id = $matches[1][$i];
9462
+ if(isset($getty_img_content[$i])){
9463
+ if(preg_match('/gie\.widgets\.load\({id:\'(.*?)\',sig:\'(.*?)\',w:\'(.*?)\',h:\'(.*?)\',items:\'(.*?)\'/',$getty_img_content[$i],$match)){
9464
+ if(isset($match[1]) && isset($match[2]) && isset($match[3]) && isset($match[4]) && isset($match[5])){
9465
+ $image_id = $match[1];
9466
+ $image_key = $match[2];
9467
+ $width = $match[3];
9468
+ $height = $match[4];
9469
+ $img_emb_id = $match[5];
9470
+ $iframe = '<iframe src="//embed.gettyimages.com/embed/'.esc_attr($img_emb_id).'?et='.esc_attr($image_id).'&amp;tld=com&sig='.esc_attr($image_key).'&caption=false&ver=2" scrolling="no" frameborder="0" width="'.esc_attr($width).'" height="'.esc_attr($height).'"></iframe>';
9471
+ $description = get_the_archive_description();
9472
+ $sanitizer = new AMPFORWP_Content( $iframe, array(),
9473
+ apply_filters( 'ampforwp_content_sanitizers',
9474
+ array(
9475
+ 'AMP_Style_Sanitizer' => array(),
9476
+ 'AMP_Blacklist_Sanitizer' => array(),
9477
+ 'AMP_Img_Sanitizer' => array(),
9478
+ 'AMP_Video_Sanitizer' => array(),
9479
+ 'AMP_Audio_Sanitizer' => array(),
9480
+ 'AMP_Iframe_Sanitizer' => array(
9481
+ 'add_placeholder' => true,
9482
+ )
9483
+ ) ) );
9484
+ $iframe_content = $sanitizer->get_amp_content();
9485
+ $content = str_replace($full_content, $iframe_content, $content );
9486
+ }
9487
+ }
9488
+ }
9489
+ }
9490
+ }
9491
+ }
9492
+ }
9493
+ return $content;
9494
+ }
9495
+
9496
+ if(function_exists('vp_pfui_admin_init') && function_exists('penci_setup')){
9497
+ add_action('ampforwp_before_post_content','ampforwp_pennews_audio_embed');
9498
+ }
9499
+ function ampforwp_pennews_audio_embed(){
9500
+ $audio = get_post_meta(ampforwp_get_the_ID(), '_format_audio_embed', true);
9501
+ if(empty($audio)){
9502
+ return;
9503
+ }
9504
+ $audio = preg_replace('/<iframe(.*?)width="(.*?)%"(.*?)<\/iframe>/', '<iframe$1width="1000"$3</iframe>', $audio);
9505
+ $audio_str = substr( $audio, -4 );
9506
+ $html ='<div class="audio-iframe">';
9507
+ if ( wp_oembed_get( $audio ) ) {
9508
+ $html .= wp_oembed_get( $audio );
9509
+ }elseif( $audio_str == '.mp3' ) {
9510
+ $html .= do_shortcode('[audio src="'. esc_url( $audio ) .'"]');
9511
+ }else{
9512
+ $html .= do_shortcode( $audio );
9513
+ }
9514
+ $html .= '</div>';
9515
+ $sanitizer = new AMPFORWP_Content( $html, array(),
9516
+ apply_filters( 'ampforwp_content_sanitizers',
9517
+ array(
9518
+ 'AMP_Audio_Sanitizer' => array(),
9519
+ 'AMP_Iframe_Sanitizer' => array(
9520
+ 'add_placeholder' => true,
9521
+ )
9522
+ ) ) );
9523
+ $sanitized_html = $sanitizer->get_amp_content();
9524
+ echo $sanitized_html;
9525
+ }
9526
+
9527
+ //Alignment issue with Gutenberg image block #4997
9528
+ add_filter('ampforwp_modify_the_content','ampforwp_wp_block_cover_image');
9529
+ function ampforwp_wp_block_cover_image($content_buffer){
9530
+ if(ampforwp_get_setting('ampforwp_css_tree_shaking') && ampforwp_is_gutenberg_active()){
9531
+ preg_match_all('/<amp-img(.*?)class="wp-block-cover__image-background(.*?)"(.*?)src="(.*?)"(.*?)<\/amp-img>/', $content_buffer, $matches);
9532
+ if(is_array($matches) && isset($matches[4][0])){
9533
+ $img_url = $matches[4][0];
9534
+ if (!empty($img_url)) {
9535
+ $content_buffer = preg_replace('/<div(.*?)class="wp-block-cover(.*?)"><amp-img(.*?)<\/amp-img>/', '<div$1style="background-image:url('.$img_url.');" class="wp-block-cover$2"><amp-img$3</amp-img>', $content_buffer);
9536
+ $content_buffer = preg_replace('/<amp-img(.*?)class="wp-block-cover__image-background(.*?)"(.*?)src="(.*?)"(.*?)<\/amp-img>/', '', $content_buffer);
9537
+ return $content_buffer;
9538
+ }
9539
+ }
9540
+ }
9541
+ return $content_buffer;
9542
+ }
templates/search-functions.php CHANGED
@@ -80,7 +80,11 @@ function ampforwp_get_search_form() {
80
  $action_url = esc_url( get_bloginfo('url') );
81
  $action_url = preg_replace('#^http?:#', '', $action_url);
82
  $placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
83
- if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && !$redux_builder_amp['ampforwp-amp-takeover'] ) {
 
 
 
 
84
  $amp_query_variable = 'amp';
85
  $amp_query_variable_val = '1';
86
  }
80
  $action_url = esc_url( get_bloginfo('url') );
81
  $action_url = preg_replace('#^http?:#', '', $action_url);
82
  $placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
83
+ $mob_pres_link = false;
84
+ if(function_exists('ampforwp_mobile_redirect_preseve_link')){
85
+ $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
86
+ }
87
+ if ( ampforwp_get_setting('ampforwp-amp-takeover') == false && $mob_pres_link == false) {
88
  $amp_query_variable = 'amp';
89
  $amp_query_variable_val = '1';
90
  }