AMP for WP – Accelerated Mobile Pages - Version 0.9.98.3

Version Description

(2nd AUGUST 2019) = * Improvements: OpenGraph Support in AMP #3261 * Improvements: Compatibility integrated with Cloudflare stream. #3230 * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507 * Improvements: Some changes in AMP panel setting's defaults #3065 * Fixed: Search bar is messed up after 3425 and 3000 #3491 * Fixed: Lightbox effect not working with "Tablepress" when "Link To" option is selected in Attachment display settings #3451 * Fixed: Fatal error Uncaught Error: Call to undefined function ampforwp_is_non_amp() #3464 * Fixed: Ol and li design issue in swift theme on RTL mode #3457 * Fixed: When AMP Page builder is checked with Empty Content, Container is missing on AMP view #3488 * Fixed: rel=nofollow is getting replaced by rel=noreferrer in links #3483 * Fixed: In Archives Category & Tags option is disabled, the link should go to non-amp #3486 * Fixed: Multiple H1 Tag Issues in AMP Version on Home and Category Pages in Design 3 #3466 * Fixed: Allow href attribute value with associated apps property #3475 * Fixed: Validation errors in amp category page when HotWP PRO theme is active #3455 * Fixed: Compatibility issue with WP Offload Media Lite. #3460 * Fixed: Fatal error Uncaught Error: Call to undefined method RevSliderFunctionsWP::check_for_shortcodes() #3465 * Fixed: If a title is loading then only its markup should load otherwise not #3495 * Fixed: In Template mode feature, some fixes #3478 * Fixed: Meta description option should be enabled by default SEO #3505 * Fixed: Fatal error Uncaught Error Class 'AMPforWP\AMPVendor\WP_Error' not found #3514 * Fixed: After the upgrade, AMP Page Builder is not working! #3506 * Fixed: Page builder content getting blank when we hit save. #3513 * Fixed: Wp editor not loading when Using Page builder (with Gutenberg) #3517 * Fixed: Single design 2 in Swift broken in one specific use case #3532

Download this release

Release Info

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

Code changes from version 0.9.98.2 to 0.9.98.3

Files changed (44) hide show
  1. README.md +29 -4
  2. accelerated-moblie-pages.php +2 -2
  3. changelog.txt +26 -0
  4. classes/class-ampforwp-rev-slider.php +117 -57
  5. components/breadcrumb/breadcrumb.php +9 -3
  6. components/categories-tags/categories-tags.php +27 -16
  7. components/components-core.php +7 -5
  8. components/loop/loop.php +7 -3
  9. images/SD-default-image.png +0 -0
  10. includes/features/functions.php +1 -1
  11. includes/features/opengraph.php +309 -0
  12. includes/features/performance/performance-options.php +3 -3
  13. includes/features/structure-data/structured-data-functions.php +19 -18
  14. includes/features/structure-data/structured-data-options.php +3 -0
  15. includes/options/admin-config.php +32 -26
  16. includes/thirdparty-compatibility.php +5 -0
  17. includes/vendor/amp/includes/class-amp-post-template.php +1 -1
  18. includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php +12 -6
  19. includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php +1 -1
  20. includes/vendor/amp/includes/sanitizers/class-amp-video-sanitizer.php +0 -1
  21. includes/vendor/aq_resizer.php +9 -4
  22. includes/vendor/vendor-changelog.txt +2 -1
  23. pagebuilder/functions.php +1 -1
  24. pagebuilder/inc/admin-amp-page-builder.js +16 -7
  25. pagebuilder/inc/amppb_save_data.php +5 -1
  26. readme.txt +29 -7
  27. templates/design-manager/design-1/elements/bread-crumbs.php +8 -2
  28. templates/design-manager/design-1/elements/meta-taxonomy.php +18 -14
  29. templates/design-manager/design-1/elements/title.php +9 -4
  30. templates/design-manager/design-2/elements/bread-crumbs.php +8 -2
  31. templates/design-manager/design-2/elements/meta-info.php +13 -14
  32. templates/design-manager/design-2/elements/meta-taxonomy.php +9 -6
  33. templates/design-manager/design-2/elements/title.php +9 -4
  34. templates/design-manager/design-3/elements/bread-crumbs.php +8 -2
  35. templates/design-manager/design-3/elements/meta-info.php +8 -11
  36. templates/design-manager/design-3/elements/meta-taxonomy.php +13 -8
  37. templates/design-manager/design-3/elements/title.php +9 -4
  38. templates/design-manager/design-3/index.php +1 -1
  39. templates/design-manager/design-3/style.php +4 -4
  40. templates/design-manager/swift/single.php +3 -2
  41. templates/design-manager/swift/style.php +21 -3
  42. templates/features.php +88 -6
  43. templates/template-mode/admin-bar.css +3 -0
  44. templates/template-mode/template-mode.php +12 -6
README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
- Stable tag: 0.9.98.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -189,11 +189,36 @@ You can contact us from [here](https://ampforwp.com/contact/)
189
 
190
  == Changelog ==
191
 
192
- = 0.9.98.2 (25nd July 2019) =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  * Fixed: Menu design issue in Design 3 #3489
194
  * Fixed: Fatal error when latest version of Smush pro plugin activated #3487
195
- * Fixed: After Version 0.9.98 update, Background Type gradient options are not showing in Row module of AMP pagebuilder #3490
196
- * Fixed: Undefined index ampforwp-amp-on-off #3474
197
  * Fixed: Search bar is not showing in design three after enabling the search option in header option panel #3484
198
  * Fixed: Content blank if Color Attribute is in Span tag #3497
199
  * Fixed: Sticky Header has no background color when scrolling. #3498
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
+ Stable tag: 0.9.98.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
189
 
190
  == Changelog ==
191
 
192
+ = 0.9.98.3 (2nd AUGUST 2019) =
193
+ * Improvements: OpenGraph Support in AMP #3261
194
+ * Improvements: Compatibility integrated with Cloudflare stream. #3230
195
+ * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
196
+ * Improvements: Some changes in AMP panel setting's defaults #3065
197
+ * Fixed: Search bar is messed up after 3425 and 3000 #3491
198
+ * Fixed: Lightbox effect not working with "Tablepress" when "Link To" option is selected in Attachment display settings #3451
199
+ * Fixed: Fatal error Uncaught Error: Call to undefined function ampforwp_is_non_amp() #3464
200
+ * Fixed: Ol and li design issue in swift theme on RTL mode #3457
201
+ * Fixed: When AMP Page builder is checked with Empty Content, Container is missing on AMP view #3488
202
+ * Fixed: rel=”nofollow” is getting replaced by rel=”noreferrer in links #3483
203
+ * Fixed: In Archives Category & Tags option is disabled, the link should go to non-amp #3486
204
+ * Fixed: Multiple H1 Tag Issues in AMP Version on Home and Category Pages in Design 3 #3466
205
+ * Fixed: Allow href attribute value with associated apps property #3475
206
+ * Fixed: Validation errors in amp category page when HotWP PRO theme is active #3455
207
+ * Fixed: Compatibility issue with WP Offload Media Lite. #3460
208
+ * Fixed: Fatal error Uncaught Error: Call to undefined method RevSliderFunctionsWP::check_for_shortcodes() #3465
209
+ * Fixed: If a title is loading then only its markup should load otherwise not #3495
210
+ * Fixed: In Template mode feature, some fixes #3478
211
+ * Fixed: Meta description option should be enabled by default SEO #3505
212
+ * Fixed: Fatal error Uncaught Error Class 'AMPforWP\AMPVendor\WP_Error' not found #3514
213
+ * Fixed: After the upgrade, AMP Page Builder is not working! #3506
214
+ * Fixed: Page builder content getting blank when we hit save. #3513
215
+ * Fixed: Wp editor not loading when Using Page builder (with Gutenberg) #3517
216
+ * Fixed: Single design 2 in Swift broken in one specific use case #3532
217
+
218
+ = 0.9.98.2 (25ND JULY 2019) =
219
  * Fixed: Menu design issue in Design 3 #3489
220
  * Fixed: Fatal error when latest version of Smush pro plugin activated #3487
221
+ * Fixed: After Version 0.9.98 update, Background Type gradient options are not showing in Row module of AMP pagebuilder #3490* Fixed: Undefined index ampforwp-amp-on-off #3474
 
222
  * Fixed: Search bar is not showing in design three after enabling the search option in header option panel #3484
223
  * Fixed: Content blank if Color Attribute is in Span tag #3497
224
  * Fixed: Sticky Header has no background color when scrolling. #3498
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 0.9.98.2
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','0.9.98.2');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  // any changes to AMP_QUERY_VAR should be refelected here
26
  function ampforwp_generate_endpoint(){
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.98.3
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','0.9.98.3');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  // any changes to AMP_QUERY_VAR should be refelected here
26
  function ampforwp_generate_endpoint(){
changelog.txt CHANGED
@@ -1,5 +1,31 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 0.9.98.2 (25nd July 2019) =
4
  * Fixed: Menu design issue in Design 3 #3489
5
  * Fixed: Fatal error when latest version of Smush pro plugin activated #3487
1
  == Changelog ==
2
 
3
+ = 0.9.98.3 (2nd AUGUST 2019) =
4
+ * Improvements: OpenGraph Support in AMP #3261
5
+ * Improvements: Compatibility integrated with Cloudflare stream. #3230
6
+ * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
7
+ * Improvements: Some changes in AMP panel setting's defaults #3065
8
+ * Fixed: Search bar is messed up after 3425 and 3000 #3491
9
+ * Fixed: Lightbox effect not working with "Tablepress" when "Link To" option is selected in Attachment display settings #3451
10
+ * Fixed: Fatal error Uncaught Error: Call to undefined function ampforwp_is_non_amp() #3464
11
+ * Fixed: Ol and li design issue in swift theme on RTL mode #3457
12
+ * Fixed: When AMP Page builder is checked with Empty Content, Container is missing on AMP view #3488
13
+ * Fixed: rel=”nofollow” is getting replaced by rel=”noreferrer in links #3483
14
+ * Fixed: In Archives Category & Tags option is disabled, the link should go to non-amp #3486
15
+ * Fixed: Multiple H1 Tag Issues in AMP Version on Home and Category Pages in Design 3 #3466
16
+ * Fixed: Allow href attribute value with associated apps property #3475
17
+ * Fixed: Validation errors in amp category page when HotWP PRO theme is active #3455
18
+ * Fixed: Compatibility issue with WP Offload Media Lite. #3460
19
+ * Fixed: Fatal error Uncaught Error: Call to undefined method RevSliderFunctionsWP::check_for_shortcodes() #3465
20
+ * Fixed: If a title is loading then only its markup should load otherwise not #3495
21
+ * Fixed: In Template mode feature, some fixes #3478
22
+ * Fixed: Meta description option should be enabled by default SEO #3505
23
+ * Fixed: Fatal error Uncaught Error Class 'AMPforWP\AMPVendor\WP_Error' not found #3514
24
+ * Fixed: After the upgrade, AMP Page Builder is not working! #3506
25
+ * Fixed: Page builder content getting blank when we hit save. #3513
26
+ * Fixed: Wp editor not loading when Using Page builder (with Gutenberg) #3517
27
+ * Fixed: Single design 2 in Swift broken in one specific use case #3532
28
+
29
  = 0.9.98.2 (25nd July 2019) =
30
  * Fixed: Menu design issue in Design 3 #3489
31
  * Fixed: Fatal error when latest version of Smush pro plugin activated #3487
classes/class-ampforwp-rev-slider.php CHANGED
@@ -26,66 +26,126 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
26
  }
27
 
28
  public function shortcode( $args, $mid_content = null ) {
29
- global $post;
30
- extract(shortcode_atts(array('alias' => ''), $args, 'rev_slider'));
31
  extract(shortcode_atts(array('settings' => ''), $args, 'rev_slider'));
32
- extract(shortcode_atts(array('order' => ''), $args, 'rev_slider'));
33
-
34
- if($settings !== '') $settings = json_decode(str_replace(array('({', '})', "'"), array('[', ']', '"'), $settings) ,true);
35
- if($order !== '') $order = explode(',', $order);
36
-
37
- $sliderAlias = ($alias != '') ? $alias : RevSliderFunctions::getVal($args,0);
38
- if( ! method_exists('RevSliderFunctionsWP', 'check_for_shortcodes') ) {
39
- return;
40
- }
41
- $gal_ids = RevSliderFunctionsWP::check_for_shortcodes($mid_content);
42
- ob_start();
43
- if(!empty($gal_ids)){ //add a gallery based slider
44
- $slider = RevSliderOutput::putSlider($sliderAlias, '', $gal_ids);
45
- }else{
46
- $slider = RevSliderOutput::putSlider($sliderAlias, '', array(), $settings, $order);
47
- }
48
- $content = ob_get_contents();
49
- ob_clean();
50
- ob_end_clean();
51
- $ids = array();
52
- $slides = $slider->getSlidesForOutput(true,'',$gal_ids);
53
- foreach ($slides as $slide) {
54
- $bgtype = $slide->getParam('background_type', 'image');
55
- $img_data = wp_get_attachment_metadata( $slide->getImageID() );
56
 
57
- if($bgtype == 'external'){
58
- $url = esc_url($slide->getParam('slide_bg_external', ''));
59
- $imgalt = esc_attr($slide->getParam('alt_attr', ''));
60
- $img_title = esc_attr($slide->getParam('title_attr', ''));
61
- $img_w = $slide->getParam('ext_width', '1920');
62
- $img_h = $slide->getParam('ext_height', '1080');
63
- $urls[] = apply_filters('amp_gallery_image_params', array(
64
- 'url' => $url,
65
- 'width' => $img_w,
66
- 'height' => $img_h,
67
- 'bgtype' => $bgtype
68
- ),$attachment_id);
69
- }elseif( $bgtype == 'image'){
 
 
70
  $img_data = wp_get_attachment_metadata( $slide->getImageID() );
71
- $url = $slide->getImageUrl();
72
- $attachment_id = $slide->getImageID();
73
- $urls[] = apply_filters('amp_gallery_image_params', array(
74
- 'url' => $url,
75
- 'width' => $img_data['width'],
76
- 'height' => $img_data['height'],
77
- 'bgtype' => $bgtype
78
- ),$attachment_id);
79
- }elseif( $bgtype == 'youtube' ){
80
- $youtube_id = $slide->getParam('slide_bg_youtube', '');
81
- $cover_img = $slide->getImageUrl();
82
- $urls[] = apply_filters('amp_gallery_image_params', array(
83
- 'url' => $youtube_id,
84
- 'width' => '480',
85
- 'height' => '270',
86
- 'bgtype' => $bgtype,
87
- 'cover_img' => $cover_img
88
- ),$attachment_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  }
90
  }
91
 
26
  }
27
 
28
  public function shortcode( $args, $mid_content = null ) {
29
+ global $post,$revSliderVersion;
30
+ extract(shortcode_atts(array('alias' => ''), $args, 'rev_slider'));
31
  extract(shortcode_atts(array('settings' => ''), $args, 'rev_slider'));
32
+ extract(shortcode_atts(array('order' => ''), $args, 'rev_slider'));
33
+ // Below version 6.0
34
+ if( !empty($revSliderVersion) && 6 > $revSliderVersion ){
35
+ if($settings !== '') $settings = json_decode(str_replace(array('({', '})', "'"), array('[', ']', '"'), $settings) ,true);
36
+ if($order !== '') $order = explode(',', $order);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
+ $sliderAlias = ($alias != '') ? $alias : RevSliderFunctions::getVal($args,0);
39
+ $gal_ids = RevSliderFunctionsWP::check_for_shortcodes($mid_content);
40
+ ob_start();
41
+ if(!empty($gal_ids)){ //add a gallery based slider
42
+ $slider = RevSliderOutput::putSlider($sliderAlias, '', $gal_ids);
43
+ }else{
44
+ $slider = RevSliderOutput::putSlider($sliderAlias, '', array(), $settings, $order);
45
+ }
46
+ $content = ob_get_contents();
47
+ ob_clean();
48
+ ob_end_clean();
49
+ $ids = array();
50
+ $slides = $slider->getSlidesForOutput(true,'',$gal_ids);
51
+ foreach ($slides as $slide) {
52
+ $bgtype = $slide->getParam('background_type', 'image');
53
  $img_data = wp_get_attachment_metadata( $slide->getImageID() );
54
+
55
+ if($bgtype == 'external'){
56
+ $url = esc_url($slide->getParam('slide_bg_external', ''));
57
+ $imgalt = esc_attr($slide->getParam('alt_attr', ''));
58
+ $img_title = esc_attr($slide->getParam('title_attr', ''));
59
+ $img_w = $slide->getParam('ext_width', '1920');
60
+ $img_h = $slide->getParam('ext_height', '1080');
61
+ $urls[] = apply_filters('amp_gallery_image_params', array(
62
+ 'url' => $url,
63
+ 'width' => $img_w,
64
+ 'height' => $img_h,
65
+ 'bgtype' => $bgtype
66
+ ),$attachment_id);
67
+ }elseif( $bgtype == 'image'){
68
+ $img_data = wp_get_attachment_metadata( $slide->getImageID() );
69
+ $url = $slide->getImageUrl();
70
+ $attachment_id = $slide->getImageID();
71
+ $urls[] = apply_filters('amp_gallery_image_params', array(
72
+ 'url' => $url,
73
+ 'width' => $img_data['width'],
74
+ 'height' => $img_data['height'],
75
+ 'bgtype' => $bgtype
76
+ ),$attachment_id);
77
+ }elseif( $bgtype == 'youtube' ){
78
+ $youtube_id = $slide->getParam('slide_bg_youtube', '');
79
+ $cover_img = $slide->getImageUrl();
80
+ $urls[] = apply_filters('amp_gallery_image_params', array(
81
+ 'url' => $youtube_id,
82
+ 'width' => '480',
83
+ 'height' => '270',
84
+ 'bgtype' => $bgtype,
85
+ 'cover_img' => $cover_img
86
+ ),$attachment_id);
87
+ }
88
+ }
89
+ }
90
+ // Version 6.0+
91
+ elseif ( defined('RS_REVISION') && 6.0 <= RS_REVISION ) {
92
+ extract(shortcode_atts(array('alias' => ''), $args, 'rev_slider'));
93
+ extract(shortcode_atts(array('settings' => ''), $args, 'rev_slider'));
94
+ extract(shortcode_atts(array('order' => ''), $args, 'rev_slider'));
95
+ extract(shortcode_atts(array('usage' => ''), $args, 'rev_slider'));
96
+ $output = new RevSliderOutput();
97
+ $slider_alias = ($alias != '') ? $alias : $output->get_val($args, 0); //backwards compatibility
98
+
99
+ $output->set_custom_order($order);
100
+ $output->set_custom_settings($settings);
101
+
102
+ $gallery_ids = $output->check_for_shortcodes($mid_content); //check for example on gallery shortcode and do stuff
103
+ if($gallery_ids !== false) $output->set_gallery_ids($gallery_ids);
104
+
105
+ ob_start();
106
+ $slider = $output->add_slider_to_stage($slider_alias, $usage);
107
+ $content = ob_get_contents();
108
+ ob_clean();
109
+ ob_end_clean();
110
+ $slides = $slider->get_slides_for_output(true,'',$gallery_ids);
111
+ foreach ($slides as $slide) {
112
+ $bgtype = $slide->get_param(array('bg', 'type'),'');
113
+ $image_id = $slide->image_id;
114
+ $url = $slide->image_url;
115
+ if ( '' == $image_id ) {
116
+ $image_id = attachment_url_to_postid($url);
117
+ }
118
+ $img_data = wp_get_attachment_metadata( $image_id );
119
+ if($bgtype == 'external'){
120
+ $url = esc_url($slide->get_param(array('bg','externalSrc'), ''));
121
+ $imgalt = esc_attr($slide->get_param('alt_attr', ''));
122
+ $img_title = esc_attr($slide->get_param('title_attr', ''));
123
+ $img_w = $slide->get_param('ext_width', '1920');
124
+ $img_h = $slide->get_param('ext_height', '1080');
125
+ $urls[] = apply_filters('amp_gallery_image_params', array(
126
+ 'url' => $url,
127
+ 'width' => $img_w,
128
+ 'height' => $img_h,
129
+ 'bgtype' => $bgtype
130
+ ),$image_id);
131
+ }elseif( $bgtype == 'image'){
132
+ $urls[] = apply_filters('amp_gallery_image_params', array(
133
+ 'url' => $url,
134
+ 'width' => $img_data['width'],
135
+ 'height' => $img_data['height'],
136
+ 'bgtype' => $bgtype
137
+ ),$image_id);
138
+ }elseif( $bgtype == 'youtube' ){
139
+ $youtube_id = $slide->get_param(array('bg','youtube'), '');
140
+ $cover_img = $slide->get_param(array('bg','image'), '');
141
+ $urls[] = apply_filters('amp_gallery_image_params', array(
142
+ 'url' => $youtube_id,
143
+ 'width' => '480',
144
+ 'height' => '270',
145
+ 'bgtype' => $bgtype,
146
+ 'cover_img' => $cover_img
147
+ ),$image_id);
148
+ }
149
  }
150
  }
151
 
components/breadcrumb/breadcrumb.php CHANGED
@@ -91,7 +91,10 @@
91
  $tag_id = $post_obj->term_id;
92
  $tag_name = $post_obj->name;
93
  $tag_link = get_tag_link($tag_id);
94
- $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . ampforwp_url_controller( $tag_link, $archive_non_amp ) . '" title="' . esc_attr($tag_name) . '">' . esc_html($tag_name) . '</a></li>';
 
 
 
95
  }
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
@@ -117,7 +120,10 @@
117
  foreach($cat_parents as $parents) {
118
  $cat_id = get_cat_ID( $parents);
119
  $cat_link = get_category_link($cat_id);
120
- $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="'. ampforwp_url_controller( $cat_link, $archive_non_amp ).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
 
 
 
121
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
122
  $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>';
123
  }
@@ -142,7 +148,7 @@
142
 
143
  // Check if the post is in a category
144
  if(!empty($last_category)) {
145
- echo $cat_display;
146
 
147
  // Else if post is in a custom taxonomy
148
  } else if(!empty($cat_id)) {
91
  $tag_id = $post_obj->term_id;
92
  $tag_name = $post_obj->name;
93
  $tag_link = get_tag_link($tag_id);
94
+ if(ampforwp_get_setting('ampforwp-archive-support-tag') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
95
+ $tag_link = ampforwp_url_controller( $tag_link );
96
+ }
97
+ $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . esc_url($tag_link) . '" title="' . esc_attr($tag_name) . '">' . esc_html($tag_name) . '</a></li>';
98
  }
99
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
100
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
120
  foreach($cat_parents as $parents) {
121
  $cat_id = get_cat_ID( $parents);
122
  $cat_link = get_category_link($cat_id);
123
+ if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
124
+ $cat_link = ampforwp_url_controller( $cat_link );
125
+ }
126
+ $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>';
127
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
128
  $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>';
129
  }
148
 
149
  // Check if the post is in a category
150
  if(!empty($last_category)) {
151
+ echo $cat_display; // Escaped above
152
 
153
  // Else if post is in a custom taxonomy
154
  } else if(!empty($cat_id)) {
components/categories-tags/categories-tags.php CHANGED
@@ -11,19 +11,22 @@ function ampforwp_framework_get_categories_list( $separator = '' ){
11
  if ( $ampforwp_categories ) : ?>
12
  <div class="amp-category">
13
  <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-categories-text'], 'Categories' )); ?></span>
14
- <?php foreach ($ampforwp_categories as $key=>$cat ) {
 
 
15
  $term_id = $cat->term_id;
16
  $term_name = $cat->name;
17
- $term_url = get_category_link( $cat->term_id );
18
- if(false == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
19
- $term_url = false;
20
- }
21
- elseif( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-cats-tags-links-single')) {
22
- // #934
23
- $term_url = ampforwp_url_controller( $term_url );
24
- }
25
- echo ('<span class="amp-cat amp-cat-'. esc_attr($term_id) . '" >
26
- '. (!empty($term_url)? ' <a href="'. esc_url( $term_url) . '" title="'. esc_html($term_name) . '" > ':''). esc_html($term_name). (!empty($term_url)? '</a> ':'').' </span>');
 
27
 
28
  if(!empty($separator) && count($ampforwp_categories)-1 > $key){
29
  echo esc_html($separator);
@@ -39,11 +42,19 @@ function ampforwp_framework_get_tags_list($separator=''){
39
  if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
40
  <div class="amp-tags">
41
  <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags' )); ?></span>
42
- <?php foreach ( $ampforwp_tags as $key=>$tag ) {
43
- if( true == $redux_builder_amp['ampforwp-archive-support'] && true == $redux_builder_amp['ampforwp-cats-tags-links-single'] ) {
44
- echo ('<span class="amp-tag amp-tag-'.esc_attr($tag->term_id).'"><a href="'. ampforwp_url_controller( get_tag_link( $tag->term_id ) ).'" title="'.esc_html($tag->name).'" > '.esc_html($tag->name) .'</a></span>');//#934
45
- } else {
46
- echo ('<span class="amp-tag"> '.esc_html($tag->name).'</span>');
 
 
 
 
 
 
 
 
47
  }
48
  if(!empty($separator) && count($ampforwp_tags)-1 > $key){
49
  echo $separator;
11
  if ( $ampforwp_categories ) : ?>
12
  <div class="amp-category">
13
  <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-categories-text'], 'Categories' )); ?></span>
14
+ <?php
15
+ $anchorTag = $anchorClose = '';
16
+ foreach ($ampforwp_categories as $key=>$cat ) {
17
  $term_id = $cat->term_id;
18
  $term_name = $cat->name;
19
+ if( true == ampforwp_get_setting('ampforwp-cats-tags-links-single') ){
20
+ $url = get_category_link( $cat->term_id );
21
+ if( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-archive-support-cat')){
22
+ $url = ampforwp_url_controller($url);
23
+ }
24
+ $anchorTag = '<a href="'.esc_url($url).'" title="'.esc_html($term_name).'">';
25
+ $anchorClose = "</a>";
26
+ echo ('<span class="amp-cat amp-cat-'.esc_attr($term_id).'">'.$anchorTag.esc_html($term_name).$anchorClose.'</span>');
27
+ }else{
28
+ echo ('<span class="amp-cat"> '.esc_html($term_name).'</span>');
29
+ }
30
 
31
  if(!empty($separator) && count($ampforwp_categories)-1 > $key){
32
  echo esc_html($separator);
42
  if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
43
  <div class="amp-tags">
44
  <span><?php echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags' )); ?></span>
45
+ <?php
46
+ $anchorTag = $anchorClose = '';
47
+ foreach ( $ampforwp_tags as $key=>$tag ) {
48
+ if( true == ampforwp_get_setting('ampforwp-cats-tags-links-single') ){
49
+ $url = get_tag_link( $tag->term_id );
50
+ if( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-archive-support-tag')){
51
+ $url = ampforwp_url_controller($url);
52
+ }
53
+ $anchorTag = '<a href="'.esc_url($url).'" title="'.esc_html($tag->name).'">';
54
+ $anchorClose = "</a>";
55
+ echo ('<span class="amp-tag amp-tag-'.esc_attr($tag->term_id).'">'.$anchorTag.esc_html($tag->name).$anchorClose.'</span>');
56
+ }else{
57
+ echo ('<span class="amp-tag"> '.esc_html($tag->name).'</span>');
58
  }
59
  if(!empty($separator) && count($ampforwp_tags)-1 > $key){
60
  echo $separator;
components/components-core.php CHANGED
@@ -116,11 +116,13 @@ function amp_title(){
116
  $ID = $post->ID;
117
  if( $ID!=null ){
118
  do_action('ampforwp_above_the_title');
119
- ?><h1 class="amp-post-title"><?php
120
- $ampforwp_title = get_the_title($ID);
121
- $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
122
- echo wp_kses_data( $ampforwp_title );
123
- ?></h1><?php
 
 
124
  do_action('ampforwp_below_the_title');
125
  }
126
  }
116
  $ID = $post->ID;
117
  if( $ID!=null ){
118
  do_action('ampforwp_above_the_title');
119
+ $ampforwp_title = get_the_title($ID);
120
+ $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
121
+ if(!empty($ampforwp_title)){
122
+ ?>
123
+ <h1 class="amp-post-title"><?php echo wp_kses_data( $ampforwp_title ); ?></h1>
124
+ <?php
125
+ }
126
  do_action('ampforwp_below_the_title');
127
  }
128
  }
components/loop/loop.php CHANGED
@@ -506,10 +506,14 @@ function amp_loop_category(){
506
  if(count(get_the_category()) > 0){
507
  echo ' <ul class="loop-category">';
508
  foreach((get_the_category()) as $category) {
509
- if ( false == $redux_builder_amp['ampforwp-archive-support'] ) {
510
- echo '<li class="amp-cat-'. esc_attr($category->term_id).'">'. esc_attr($category->cat_name).'</li>';
 
 
 
 
511
  }else{
512
- echo '<li class="amp-cat-'. esc_attr($category->term_id).'"><a href="'.ampforwp_url_controller( get_category_link( $category->term_id ) ).'">'. esc_attr($category->cat_name).'</a></li>';
513
  }
514
  }
515
  echo '</ul>';
506
  if(count(get_the_category()) > 0){
507
  echo ' <ul class="loop-category">';
508
  foreach((get_the_category()) as $category) {
509
+ if(ampforwp_get_setting('ampforwp-cats-tags-links-single') == true){
510
+ $cat_link = get_category_link( $category->term_id );
511
+ if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
512
+ $cat_link = ampforwp_url_controller( $cat_link );
513
+ }
514
+ echo '<li class="amp-cat-'. $category->term_id.'"><a href="'.esc_url($cat_link).'">'. esc_html($category->cat_name).'</a></li>';
515
  }else{
516
+ echo '<li class="amp-cat-'. $category->term_id.'">'. esc_html($category->cat_name).'</li>';
517
  }
518
  }
519
  echo '</ul>';
images/SD-default-image.png ADDED
Binary file
includes/features/functions.php CHANGED
@@ -189,7 +189,7 @@ function ampforwp_generate_meta_desc($json=""){
189
  global $post, $redux_builder_amp;
190
  $desc = $post_id = '';
191
  $post_id = ampforwp_get_the_ID();
192
- if ( true == ampforwp_get_setting('ampforwp-seo-meta-description') || !empty($json) ) {
193
  if ( ampforwp_is_home() || ampforwp_is_blog() ) {
194
  $desc = addslashes( strip_tags( get_bloginfo( 'description' ) ) );
195
  }
189
  global $post, $redux_builder_amp;
190
  $desc = $post_id = '';
191
  $post_id = ampforwp_get_the_ID();
192
+ if ( true == ampforwp_get_setting('ampforwp-seo-meta-desc') || !empty($json) ) {
193
  if ( ampforwp_is_home() || ampforwp_is_blog() ) {
194
  $desc = addslashes( strip_tags( get_bloginfo( 'description' ) ) );
195
  }
includes/features/opengraph.php ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly.
3
+ if ( ! defined( 'ABSPATH' ) ) exit;
4
+ add_action('amp_post_template_head', 'ampforwp_default_og_tags', 50);
5
+ if ( ! function_exists('ampforwp_default_og_tags') ) {
6
+ function ampforwp_default_og_tags(){
7
+ global $wp;
8
+ if ( true == ampforwp_get_setting('ampforwp-seo-og-meta-tags') && '' == ampforwp_get_setting('ampforwp-seo-selection') ) {
9
+ $og_tags = array();
10
+ $post_id = $post = $locale = $type = $title = $site_title = $desc = $url = $pub_date = $mod_date = $image = $image_width = $image_height = '';
11
+ $post_id = ampforwp_get_the_ID();
12
+ $post = get_post($post_id);
13
+ // og:locale
14
+ $locale = get_locale();
15
+ // Catch some weird locales served out by WP that are not easily doubled up.
16
+ $fix_locales = array(
17
+ 'ca' => 'ca_ES',
18
+ 'en' => 'en_US',
19
+ 'el' => 'el_GR',
20
+ 'et' => 'et_EE',
21
+ 'ja' => 'ja_JP',
22
+ 'sq' => 'sq_AL',
23
+ 'uk' => 'uk_UA',
24
+ 'vi' => 'vi_VN',
25
+ 'zh' => 'zh_CN',
26
+ );
27
+
28
+ if ( isset( $fix_locales[ $locale ] ) ) {
29
+ $locale = $fix_locales[ $locale ];
30
+ }
31
+
32
+ // Convert locales like "es" to "es_ES", in case that works for the given locale (sometimes it does).
33
+ if ( strlen( $locale ) === 2 ) {
34
+ $locale = strtolower( $locale ) . '_' . strtoupper( $locale );
35
+ }
36
+
37
+ // These are the locales FB supports.
38
+ $valid_fb_locales = array(
39
+ 'af_ZA', // Afrikaans.
40
+ 'ak_GH', // Akan.
41
+ 'am_ET', // Amharic.
42
+ 'ar_AR', // Arabic.
43
+ 'as_IN', // Assamese.
44
+ 'ay_BO', // Aymara.
45
+ 'az_AZ', // Azerbaijani.
46
+ 'be_BY', // Belarusian.
47
+ 'bg_BG', // Bulgarian.
48
+ 'bp_IN', // Bhojpuri.
49
+ 'bn_IN', // Bengali.
50
+ 'br_FR', // Breton.
51
+ 'bs_BA', // Bosnian.
52
+ 'ca_ES', // Catalan.
53
+ 'cb_IQ', // Sorani Kurdish.
54
+ 'ck_US', // Cherokee.
55
+ 'co_FR', // Corsican.
56
+ 'cs_CZ', // Czech.
57
+ 'cx_PH', // Cebuano.
58
+ 'cy_GB', // Welsh.
59
+ 'da_DK', // Danish.
60
+ 'de_DE', // German.
61
+ 'el_GR', // Greek.
62
+ 'en_GB', // English (UK).
63
+ 'en_PI', // English (Pirate).
64
+ 'en_UD', // English (Upside Down).
65
+ 'en_US', // English (US).
66
+ 'em_ZM',
67
+ 'eo_EO', // Esperanto.
68
+ 'es_ES', // Spanish (Spain).
69
+ 'es_LA', // Spanish.
70
+ 'es_MX', // Spanish (Mexico).
71
+ 'et_EE', // Estonian.
72
+ 'eu_ES', // Basque.
73
+ 'fa_IR', // Persian.
74
+ 'fb_LT', // Leet Speak.
75
+ 'ff_NG', // Fulah.
76
+ 'fi_FI', // Finnish.
77
+ 'fo_FO', // Faroese.
78
+ 'fr_CA', // French (Canada).
79
+ 'fr_FR', // French (France).
80
+ 'fy_NL', // Frisian.
81
+ 'ga_IE', // Irish.
82
+ 'gl_ES', // Galician.
83
+ 'gn_PY', // Guarani.
84
+ 'gu_IN', // Gujarati.
85
+ 'gx_GR', // Classical Greek.
86
+ 'ha_NG', // Hausa.
87
+ 'he_IL', // Hebrew.
88
+ 'hi_IN', // Hindi.
89
+ 'hr_HR', // Croatian.
90
+ 'hu_HU', // Hungarian.
91
+ 'ht_HT', // Haitian Creole.
92
+ 'hy_AM', // Armenian.
93
+ 'id_ID', // Indonesian.
94
+ 'ig_NG', // Igbo.
95
+ 'is_IS', // Icelandic.
96
+ 'it_IT', // Italian.
97
+ 'ik_US',
98
+ 'iu_CA',
99
+ 'ja_JP', // Japanese.
100
+ 'ja_KS', // Japanese (Kansai).
101
+ 'jv_ID', // Javanese.
102
+ 'ka_GE', // Georgian.
103
+ 'kk_KZ', // Kazakh.
104
+ 'km_KH', // Khmer.
105
+ 'kn_IN', // Kannada.
106
+ 'ko_KR', // Korean.
107
+ 'ks_IN', // Kashmiri.
108
+ 'ku_TR', // Kurdish (Kurmanji).
109
+ 'ky_KG', // Kyrgyz.
110
+ 'la_VA', // Latin.
111
+ 'lg_UG', // Ganda.
112
+ 'li_NL', // Limburgish.
113
+ 'ln_CD', // Lingala.
114
+ 'lo_LA', // Lao.
115
+ 'lt_LT', // Lithuanian.
116
+ 'lv_LV', // Latvian.
117
+ 'mg_MG', // Malagasy.
118
+ 'mi_NZ', // Maori.
119
+ 'mk_MK', // Macedonian.
120
+ 'ml_IN', // Malayalam.
121
+ 'mn_MN', // Mongolian.
122
+ 'mr_IN', // Marathi.
123
+ 'ms_MY', // Malay.
124
+ 'mt_MT', // Maltese.
125
+ 'my_MM', // Burmese.
126
+ 'nb_NO', // Norwegian (bokmal).
127
+ 'nd_ZW', // Ndebele.
128
+ 'ne_NP', // Nepali.
129
+ 'nl_BE', // Dutch (Belgie).
130
+ 'nl_NL', // Dutch.
131
+ 'nn_NO', // Norwegian (nynorsk).
132
+ 'nr_ZA', // Southern Ndebele.
133
+ 'ns_ZA', // Northern Sotho.
134
+ 'ny_MW', // Chewa.
135
+ 'om_ET', // Oromo.
136
+ 'or_IN', // Oriya.
137
+ 'pa_IN', // Punjabi.
138
+ 'pl_PL', // Polish.
139
+ 'ps_AF', // Pashto.
140
+ 'pt_BR', // Portuguese (Brazil).
141
+ 'pt_PT', // Portuguese (Portugal).
142
+ 'qc_GT', // Quiché.
143
+ 'qu_PE', // Quechua.
144
+ 'qr_GR',
145
+ 'qz_MM', // Burmese (Zawgyi).
146
+ 'rm_CH', // Romansh.
147
+ 'ro_RO', // Romanian.
148
+ 'ru_RU', // Russian.
149
+ 'rw_RW', // Kinyarwanda.
150
+ 'sa_IN', // Sanskrit.
151
+ 'sc_IT', // Sardinian.
152
+ 'se_NO', // Northern Sami.
153
+ 'si_LK', // Sinhala.
154
+ 'su_ID', // Sundanese.
155
+ 'sk_SK', // Slovak.
156
+ 'sl_SI', // Slovenian.
157
+ 'sn_ZW', // Shona.
158
+ 'so_SO', // Somali.
159
+ 'sq_AL', // Albanian.
160
+ 'sr_RS', // Serbian.
161
+ 'ss_SZ', // Swazi.
162
+ 'st_ZA', // Southern Sotho.
163
+ 'sv_SE', // Swedish.
164
+ 'sw_KE', // Swahili.
165
+ 'sy_SY', // Syriac.
166
+ 'sz_PL', // Silesian.
167
+ 'ta_IN', // Tamil.
168
+ 'te_IN', // Telugu.
169
+ 'tg_TJ', // Tajik.
170
+ 'th_TH', // Thai.
171
+ 'tk_TM', // Turkmen.
172
+ 'tl_PH', // Filipino.
173
+ 'tl_ST', // Klingon.
174
+ 'tn_BW', // Tswana.
175
+ 'tr_TR', // Turkish.
176
+ 'ts_ZA', // Tsonga.
177
+ 'tt_RU', // Tatar.
178
+ 'tz_MA', // Tamazight.
179
+ 'uk_UA', // Ukrainian.
180
+ 'ur_PK', // Urdu.
181
+ 'uz_UZ', // Uzbek.
182
+ 've_ZA', // Venda.
183
+ 'vi_VN', // Vietnamese.
184
+ 'wo_SN', // Wolof.
185
+ 'xh_ZA', // Xhosa.
186
+ 'yi_DE', // Yiddish.
187
+ 'yo_NG', // Yoruba.
188
+ 'zh_CN', // Simplified Chinese (China).
189
+ 'zh_HK', // Traditional Chinese (Hong Kong).
190
+ 'zh_TW', // Traditional Chinese (Taiwan).
191
+ 'zu_ZA', // Zulu.
192
+ 'zz_TR', // Zazaki.
193
+ );
194
+
195
+ // Check to see if the locale is a valid FB one, if not, use en_US as a fallback.
196
+ if ( ! in_array( $locale, $valid_fb_locales, true ) ) {
197
+ $locale = strtolower( substr( $locale, 0, 2 ) ) . '_' . strtoupper( substr( $locale, 0, 2 ) );
198
+ if ( ! in_array( $locale, $valid_fb_locales, true ) ) {
199
+ $locale = 'en_US';
200
+ }
201
+ }
202
+ $og_tags['og:locale'] = $locale;
203
+
204
+ // og:type
205
+ if ( is_home() ) {
206
+ $type = 'website';
207
+ }
208
+ elseif ( is_singular() ) {
209
+ $type = 'article';
210
+ }
211
+ else {
212
+ // We use "object" for archives
213
+ $type = 'object';
214
+ }
215
+ $og_tags['og:type'] = $type;
216
+
217
+ // og:title
218
+ $sep = apply_filters( 'document_title_separator', '-' );
219
+ if ( ampforwp_is_home() ) {
220
+ $site_title = get_bloginfo( 'name' ) . $sep . get_option( 'blogdescription' );
221
+ }
222
+ if ( is_singular() || ampforwp_is_front_page() || ampforwp_is_blog() ) {
223
+ $title = ! empty( $post->post_title ) ? $post->post_title : $title;
224
+ $site_title = $title . $sep . get_option( 'blogname' );
225
+ }
226
+ if ( is_archive() ) {
227
+ $site_title = strip_tags( get_the_archive_title('') . $sep . get_bloginfo( 'name' ) );
228
+ }
229
+ if ( is_search() ) {
230
+ $site_title = $redux_builder_amp['amp-translator-search-text'] . ' ' . get_search_query();
231
+ }
232
+
233
+ $og_tags['og:title'] = $site_title;
234
+
235
+ // og:description
236
+ if ( ampforwp_is_home() || ampforwp_is_blog() ) {
237
+ $desc = addslashes( strip_tags( get_bloginfo( 'description' ) ) );
238
+ }
239
+ if ( is_archive() ) {
240
+ $desc = addslashes( strip_tags( get_the_archive_description() ) );
241
+ }
242
+ if ( is_single() || is_page() ) {
243
+ if ( has_excerpt() ) {
244
+ $desc = get_the_excerpt();
245
+ } else {
246
+ $desc = $post->post_content;
247
+ }
248
+ $desc = preg_replace('/\[(.*?)\]/',' ', $desc);
249
+ $desc = addslashes( wp_trim_words( strip_tags( $desc ) , 15 ) );
250
+ }
251
+ if ( is_search() ) {
252
+ $desc = addslashes( ampforwp_translation($redux_builder_amp['amp-translator-search-text'], 'You searched for:') . ' ' . get_search_query() );
253
+ }
254
+ if ( ampforwp_is_front_page() ) {
255
+ $desc = addslashes( wp_trim_words( strip_tags( get_post_field('post_content', $post_id) ) , 15 ) );
256
+ }
257
+
258
+ $og_tags['og:description'] = $desc;
259
+
260
+ // og:url
261
+ $url = get_permalink( $post_id );
262
+ if ( ampforwp_is_home() || ampforwp_is_front_page() || is_archive() ) {
263
+ $current_archive_url = home_url( $wp->request );
264
+ $url = trailingslashit($current_archive_url);
265
+ $remove = '/'. AMPFORWP_AMP_QUERY_VAR;
266
+ $url = str_replace($remove, '', $url);
267
+ $query_arg_array = $wp->query_vars;
268
+ if( array_key_exists( "page" , $query_arg_array ) ) {
269
+ $page = $wp->query_vars['page'];
270
+ if ( $page >= '2') {
271
+ $url = trailingslashit( $url . '?page=' . $page);
272
+ }
273
+ }
274
+ }
275
+ $og_tags['og:url'] = $url;
276
+
277
+ // og:site_name
278
+ $og_tags['og:site_name'] = get_bloginfo( 'name' );
279
+
280
+ if ( is_singular() ) {
281
+ // article:published_time
282
+ $pub_date = mysql2date( DATE_W3C, $post->post_date_gmt, false );
283
+ $og_tags['article:published_time'] = $pub_date;
284
+ // article:modified_time
285
+ $mod_date = mysql2date( DATE_W3C, $post->post_modified_gmt, false );
286
+ if ( $mod_date !== $pub_date ) {
287
+ $og_tags['article:modified_time'] = $mod_date;
288
+ $og_tags['og:updated_time'] = $mod_date;
289
+ }
290
+ }
291
+
292
+ // og:image
293
+ $image = ampforwp_get_post_thumbnail('url', 'full');
294
+ if ( $image ) {
295
+ $image_width = ampforwp_get_post_thumbnail('width', 'full');
296
+ $image_height = ampforwp_get_post_thumbnail('height', 'full');
297
+ $og_tags['og:image'] = $image;
298
+ $og_tags['og:image:width'] = $image_width;
299
+ $og_tags['og:image:height'] = $image_height;
300
+ }
301
+
302
+ foreach ( $og_tags as $property => $content ) {
303
+ if ( $content ) {
304
+ echo '<meta property="', esc_attr( $property ), '" content="', esc_attr( $content ), '" />', "\n";
305
+ }
306
+ }
307
+ }
308
+ }
309
+ }
includes/features/performance/performance-options.php CHANGED
@@ -60,9 +60,9 @@ use ReduxCore\ReduxFramework\Redux;
60
  array(
61
  'id' => 'ampforwp_cache_minimize_mode',
62
  'type' => 'switch',
63
- 'title' => __('Minify', 'accelerated-mobile-pages'),
64
- 'tooltip-subtitle' => __('Improve the Page Speed and Loading time with Minification option', 'accelerated-mobile-pages'),
65
- 'default' => 0
66
  ),
67
  array(
68
  'id' => 'ampforwp_leverage_browser_caching_mode',
60
  array(
61
  'id' => 'ampforwp_cache_minimize_mode',
62
  'type' => 'switch',
63
+ 'title' => esc_html__('Minify', 'accelerated-mobile-pages'),
64
+ 'tooltip-subtitle' => esc_html__('Improve the Page Speed and Loading time with Minification option', 'accelerated-mobile-pages'),
65
+ 'default' => 1
66
  ),
67
  array(
68
  'id' => 'ampforwp_leverage_browser_caching_mode',
includes/features/structure-data/structured-data-functions.php CHANGED
@@ -112,25 +112,26 @@
112
  );
113
  $metadata['headline'] = $structured_data_archive_title;
114
  }
 
 
 
 
 
 
 
 
 
 
115
 
116
- // Get Image metadata from the Custom Field
117
- if(ampforwp_is_custom_field_featured_image() && ampforwp_cf_featured_image_src()){
118
- $metadata['image'] = array(
119
- '@type' => 'ImageObject',
120
- 'url' => ampforwp_cf_featured_image_src('url') ,
121
- 'width' => ampforwp_cf_featured_image_src('width'),
122
- 'height' => ampforwp_cf_featured_image_src('height'),
123
- );
124
- }
125
-
126
- // Get image metadata from The Content
127
- if( true == $redux_builder_amp['ampforwp-featured-image-from-content'] && ampforwp_get_featured_image_from_content() ){
128
- $metadata['image'] = array(
129
- '@type' => 'ImageObject',
130
- 'url' => ampforwp_get_featured_image_from_content('url') ,
131
- 'width' => ampforwp_get_featured_image_from_content('width'),
132
- 'height' => ampforwp_get_featured_image_from_content('height'),
133
- );
134
  }
135
 
136
  if( in_array( "image" , $metadata ) ) {
112
  );
113
  $metadata['headline'] = $structured_data_archive_title;
114
  }
115
+ if ( ! function_exists('amp_activate') ) {
116
+ // Get Image metadata from the Custom Field
117
+ if(ampforwp_is_custom_field_featured_image() && ampforwp_cf_featured_image_src()){
118
+ $metadata['image'] = array(
119
+ '@type' => 'ImageObject',
120
+ 'url' => ampforwp_cf_featured_image_src('url') ,
121
+ 'width' => ampforwp_cf_featured_image_src('width'),
122
+ 'height' => ampforwp_cf_featured_image_src('height'),
123
+ );
124
+ }
125
 
126
+ // Get image metadata from The Content
127
+ if( true == $redux_builder_amp['ampforwp-featured-image-from-content'] && ampforwp_get_featured_image_from_content() ){
128
+ $metadata['image'] = array(
129
+ '@type' => 'ImageObject',
130
+ 'url' => ampforwp_get_featured_image_from_content('url') ,
131
+ 'width' => ampforwp_get_featured_image_from_content('width'),
132
+ 'height' => ampforwp_get_featured_image_from_content('height'),
133
+ );
134
+ }
 
 
 
 
 
 
 
 
 
135
  }
136
 
137
  if( in_array( "image" , $metadata ) ) {
includes/features/structure-data/structured-data-options.php CHANGED
@@ -108,6 +108,7 @@ function ampforwp_add_sd_fields($fields){
108
  'url' => true,
109
  'title' => esc_html__('Default Structured Data Logo', 'accelerated-mobile-pages'),
110
  'tooltip-subtitle' => esc_html__('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
 
111
  );
112
  $fields[] = array(
113
  'id' => 'ampforwp-sd-logo-dimensions',
@@ -140,6 +141,7 @@ function ampforwp_add_sd_fields($fields){
140
  'title' => esc_html__('Default Post Image', 'accelerated-mobile-pages'),
141
  'tooltip-subtitle' => esc_html__('Upload the Image you want to show as Placeholder Image.', 'accelerated-mobile-pages'),
142
  'placeholder' => esc_html__('when there is no featured image set in the post','accelerated-mobile-pages'),
 
143
  );
144
  $fields[] = array(
145
  'id' => 'amp-structured-data-placeholder-image-width',
@@ -164,6 +166,7 @@ function ampforwp_add_sd_fields($fields){
164
  'title' => esc_html__('Default Thumbnail for VideoObject', 'accelerated-mobile-pages'),
165
  'tooltip-subtitle' => esc_html__('Upload the Thumbnail you want to show as Video Thumbnail.', 'accelerated-mobile-pages'),
166
  'placeholder' => esc_html__('When there is no thumbnail set for the video','accelerated-mobile-pages'),
 
167
  );
168
  $fields[] = array(
169
  'id' => 'ampforwp-sd-multiple-images',
108
  'url' => true,
109
  'title' => esc_html__('Default Structured Data Logo', 'accelerated-mobile-pages'),
110
  'tooltip-subtitle' => esc_html__('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
111
+ 'default' => array('url' => ampforwp_default_logo_settings() ),
112
  );
113
  $fields[] = array(
114
  'id' => 'ampforwp-sd-logo-dimensions',
141
  'title' => esc_html__('Default Post Image', 'accelerated-mobile-pages'),
142
  'tooltip-subtitle' => esc_html__('Upload the Image you want to show as Placeholder Image.', 'accelerated-mobile-pages'),
143
  'placeholder' => esc_html__('when there is no featured image set in the post','accelerated-mobile-pages'),
144
+ 'default' => array('url' => AMPFORWP_IMAGE_DIR . '/SD-default-image.png' ),
145
  );
146
  $fields[] = array(
147
  'id' => 'amp-structured-data-placeholder-image-width',
166
  'title' => esc_html__('Default Thumbnail for VideoObject', 'accelerated-mobile-pages'),
167
  'tooltip-subtitle' => esc_html__('Upload the Thumbnail you want to show as Video Thumbnail.', 'accelerated-mobile-pages'),
168
  'placeholder' => esc_html__('When there is no thumbnail set for the video','accelerated-mobile-pages'),
169
+ 'default' => array('url' => AMPFORWP_IMAGE_DIR . '/SD-default-image.png' ),
170
  );
171
  $fields[] = array(
172
  'id' => 'ampforwp-sd-multiple-images',
includes/options/admin-config.php CHANGED
@@ -1523,7 +1523,7 @@ Redux::setArgs( "redux_builder_amp", $args );
1523
  'type' => 'switch',
1524
  'title' => esc_html__('Archives [Category & Tags]', 'accelerated-mobile-pages'),
1525
  'tooltip-subtitle' => esc_html__('Enable AMP Support on Archives.', 'accelerated-mobile-pages'),
1526
- 'default' => '0'
1527
  ),
1528
  array(
1529
  'id' => 'ampforwp-archive-support-cat',
@@ -1545,14 +1545,6 @@ Redux::setArgs( "redux_builder_amp", $args );
1545
  ),
1546
  $amp_cpt_option,
1547
  $amp_custom_tax_option,
1548
- array(
1549
- 'id' => 'ampforwp-amp-convert-to-wp',
1550
- 'type' => 'switch',
1551
- 'title' => esc_html__('Convert AMP to WP theme (Beta)', 'accelerated-mobile-pages'),
1552
- 'tooltip-subtitle' => esc_html__('It makes your AMP & Non-AMP Same! (AMP will output AMP Compatible code, while WordPress will have the WP code but with the same design)', 'accelerated-mobile-pages'),
1553
- 'default' => ampforwp_amp2wp_default(),
1554
- 'required' => array('amp-design-selector', '=' , '4'),
1555
- ),
1556
  array(
1557
  'id' => 'ampforwp-amp-takeover',
1558
  'type' => 'switch',
@@ -1633,13 +1625,19 @@ Redux::setArgs( "redux_builder_amp", $args );
1633
  'accordion-open'=> 1,
1634
  ),
1635
  array(
1636
- 'id' => 'ampforwp-seo-meta-description',
1637
  'type' => 'switch',
1638
  'title' => esc_html__('Meta Description', 'accelerated-mobile-pages'),
1639
  'tooltip-subtitle' => esc_html__('The meta tag that displays in head', 'accelerated-mobile-pages'),
1640
- 'default' => 0
 
 
 
 
 
 
 
1641
  ),
1642
-
1643
  array(
1644
  'id' => 'ampforwp-seo-custom-additional-meta',
1645
  'type' => 'textarea',
@@ -1898,7 +1896,7 @@ Redux::setArgs( "redux_builder_amp", $args );
1898
  'class' => 'child_opt child_opt_arrow',
1899
  'id' => 'ampforwp-display-avatar',
1900
  'type' => 'switch',
1901
- 'title' => esc_html__('Display on User Avatar', 'accelerated-mobile-pages'),
1902
  'tooltip-subtitle' => esc_html__('Enable/Disable user Avatar.', 'accelerated-mobile-pages'),
1903
  'default' => 1,
1904
  'required' => array('wordpress-comments-support' , '=' , 1
@@ -2348,6 +2346,14 @@ Redux::setSection( $opt_name, array(
2348
  'tooltip-subtitle' => 'Enable this option when /amp/ is giving 404 after resaving the permalink settings.',
2349
  'desc' => esc_html__( 'Making endpoints to ?amp will help you get the amp in tricky setups with taxonomies & post typs. Question mark in the url will not make any difference in the SEO.' ),
2350
  ),
 
 
 
 
 
 
 
 
2351
  array(
2352
  'id' => 'amp-header-text-area-for-html',
2353
  'type' => 'textarea',
@@ -5006,6 +5012,16 @@ $single_page_options = array(
5006
  array('swift-featued-image', '=' , '1'),
5007
  ),
5008
  ),
 
 
 
 
 
 
 
 
 
 
5009
  array(
5010
  'id' => 'swift-date',
5011
  'type' => 'switch',
@@ -5026,7 +5042,7 @@ $single_page_options = array(
5026
  'id' => 'ampforwp-bread-crumb-type',
5027
  'type' => 'select',
5028
  'tooltip-subtitle' => esc_html__('Select option to enable breadcrumb with tags or category','accelerated-mobile-pages'),
5029
- 'title' => esc_html__('Select Breadcrumb Type', 'accelerated-mobile-pages'),
5030
  'options' => array(
5031
  'tags' => 'Tags',
5032
  'category' => 'Category',
@@ -5081,17 +5097,7 @@ $single_page_options = array(
5081
  'type' => 'switch',
5082
  'title' => esc_html__('Next-Previous Links', 'accelerated-mobile-pages'),
5083
  'default' => 1,
5084
- ),
5085
- // Author name
5086
- array(
5087
- 'id' => 'amp-author-name',
5088
- 'type' => 'switch',
5089
- 'title' => esc_html__( 'Author Name', 'accelerated-mobile-pages' ),
5090
- 'default' => '1',
5091
- 'required' => array(
5092
- array('amp-design-selector' , '=' , '4'),
5093
- )
5094
- ),
5095
  // Author Bio
5096
  array(
5097
  'id' => 'amp-author-description',
@@ -5104,7 +5110,7 @@ $single_page_options = array(
5104
  'id' => 'amp-author-bio-name',
5105
  'class' => 'child_opt child_opt_arrow',
5106
  'type' => 'switch',
5107
- 'title' => esc_html__( 'Author Bio Name', 'accelerated-mobile-pages' ),
5108
  'default' => '1',
5109
  'required' => array(
5110
  array('amp-design-selector' , '=' , '4'),
1523
  'type' => 'switch',
1524
  'title' => esc_html__('Archives [Category & Tags]', 'accelerated-mobile-pages'),
1525
  'tooltip-subtitle' => esc_html__('Enable AMP Support on Archives.', 'accelerated-mobile-pages'),
1526
+ 'default' => '1'
1527
  ),
1528
  array(
1529
  'id' => 'ampforwp-archive-support-cat',
1545
  ),
1546
  $amp_cpt_option,
1547
  $amp_custom_tax_option,
 
 
 
 
 
 
 
 
1548
  array(
1549
  'id' => 'ampforwp-amp-takeover',
1550
  'type' => 'switch',
1625
  'accordion-open'=> 1,
1626
  ),
1627
  array(
1628
+ 'id' => 'ampforwp-seo-meta-desc',
1629
  'type' => 'switch',
1630
  'title' => esc_html__('Meta Description', 'accelerated-mobile-pages'),
1631
  'tooltip-subtitle' => esc_html__('The meta tag that displays in head', 'accelerated-mobile-pages'),
1632
+ 'default' => 1
1633
+ ),
1634
+ array(
1635
+ 'id' => 'ampforwp-seo-og-meta-tags',
1636
+ 'type' => 'switch',
1637
+ 'title' => esc_html__('OpenGraph Meta Tags', 'accelerated-mobile-pages'),
1638
+ 'tooltip-subtitle' => esc_html__('Enable/Disable Default OpenGraph Meta Tags', 'accelerated-mobile-pages'),
1639
+ 'default' => 0,
1640
  ),
 
1641
  array(
1642
  'id' => 'ampforwp-seo-custom-additional-meta',
1643
  'type' => 'textarea',
1896
  'class' => 'child_opt child_opt_arrow',
1897
  'id' => 'ampforwp-display-avatar',
1898
  'type' => 'switch',
1899
+ 'title' => esc_html__('User Avatar', 'accelerated-mobile-pages'),
1900
  'tooltip-subtitle' => esc_html__('Enable/Disable user Avatar.', 'accelerated-mobile-pages'),
1901
  'default' => 1,
1902
  'required' => array('wordpress-comments-support' , '=' , 1
2346
  'tooltip-subtitle' => 'Enable this option when /amp/ is giving 404 after resaving the permalink settings.',
2347
  'desc' => esc_html__( 'Making endpoints to ?amp will help you get the amp in tricky setups with taxonomies & post typs. Question mark in the url will not make any difference in the SEO.' ),
2348
  ),
2349
+ array(
2350
+ 'id' => 'ampforwp-amp-convert-to-wp',
2351
+ 'type' => 'switch',
2352
+ 'title' => esc_html__('Convert AMP to WP theme (Beta)', 'accelerated-mobile-pages'),
2353
+ 'tooltip-subtitle' => esc_html__('It makes your AMP & Non-AMP Same! (AMP will output AMP Compatible code, while WordPress will have the WP code but with the same design)', 'accelerated-mobile-pages'),
2354
+ 'default' => ampforwp_amp2wp_default(),
2355
+ 'required' => array('amp-design-selector', '=' , '4'),
2356
+ ),
2357
  array(
2358
  'id' => 'amp-header-text-area-for-html',
2359
  'type' => 'textarea',
5012
  array('swift-featued-image', '=' , '1'),
5013
  ),
5014
  ),
5015
+ // Author name
5016
+ array(
5017
+ 'id' => 'amp-author-name',
5018
+ 'type' => 'switch',
5019
+ 'title' => esc_html__( 'Author Name', 'accelerated-mobile-pages' ),
5020
+ 'default' => '1',
5021
+ 'required' => array(
5022
+ array('amp-design-selector' , '=' , '4'),
5023
+ )
5024
+ ),
5025
  array(
5026
  'id' => 'swift-date',
5027
  'type' => 'switch',
5042
  'id' => 'ampforwp-bread-crumb-type',
5043
  'type' => 'select',
5044
  'tooltip-subtitle' => esc_html__('Select option to enable breadcrumb with tags or category','accelerated-mobile-pages'),
5045
+ 'title' => esc_html__('Breadcrumb Type', 'accelerated-mobile-pages'),
5046
  'options' => array(
5047
  'tags' => 'Tags',
5048
  'category' => 'Category',
5097
  'type' => 'switch',
5098
  'title' => esc_html__('Next-Previous Links', 'accelerated-mobile-pages'),
5099
  'default' => 1,
5100
+ ),
 
 
 
 
 
 
 
 
 
 
5101
  // Author Bio
5102
  array(
5103
  'id' => 'amp-author-description',
5110
  'id' => 'amp-author-bio-name',
5111
  'class' => 'child_opt child_opt_arrow',
5112
  'type' => 'switch',
5113
+ 'title' => esc_html__( 'Author Name', 'accelerated-mobile-pages' ),
5114
  'default' => '1',
5115
  'required' => array(
5116
  array('amp-design-selector' , '=' , '4'),
includes/thirdparty-compatibility.php CHANGED
@@ -44,6 +44,11 @@ function ampforwp_thirdparty_compatibility(){
44
  remove_filter( 'the_content', 'shortPixelConvertImgToPictureAddWebp', 10000 );
45
  remove_filter( 'the_excerpt', 'shortPixelConvertImgToPictureAddWebp', 10000 );
46
  remove_filter( 'post_thumbnail_html', 'shortPixelConvertImgToPictureAddWebp');
 
 
 
 
 
47
  }
48
 
49
  //Updater to check license
44
  remove_filter( 'the_content', 'shortPixelConvertImgToPictureAddWebp', 10000 );
45
  remove_filter( 'the_excerpt', 'shortPixelConvertImgToPictureAddWebp', 10000 );
46
  remove_filter( 'post_thumbnail_html', 'shortPixelConvertImgToPictureAddWebp');
47
+
48
+ //Validation errors in amp category page due to HotWP PRO #3455
49
+ if(function_exists('hotwp_get_option') && is_category()){
50
+ remove_all_filters('get_the_archive_title');
51
+ }
52
  }
53
 
54
  //Updater to check license
includes/vendor/amp/includes/class-amp-post-template.php CHANGED
@@ -351,7 +351,7 @@ class AMP_Post_Template {
351
 
352
  $this->add_data_by_key( 'featured_image', array(
353
  'amp_html' => $sanitized_html,
354
- 'caption' => $featured_image->post_excerpt,
355
  ) );
356
 
357
  if ( $featured_scripts ) {
351
 
352
  $this->add_data_by_key( 'featured_image', array(
353
  'amp_html' => $sanitized_html,
354
+ 'caption' => isset($featured_image)? $featured_image->post_excerpt : '',
355
  ) );
356
 
357
  if ( $featured_scripts ) {
includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php CHANGED
@@ -40,12 +40,18 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
40
 
41
  if($node->nodeName=='a' && $node->hasAttribute('href')){
42
  $href = $node->getAttribute('href');
43
- if ( $href ){
44
- $node->setAttribute('href',\ampforwp_findInternalUrl($href));
45
- }
46
  // Adding rel="noreferrer" to external links to prevent security vulnerabilities #3276
47
  if ( \ampforwp_isexternal($href) ) {
48
- $node->setAttribute('rel', 'noreferrer');
 
 
 
 
 
 
 
 
49
  }
50
  }
51
 
@@ -176,8 +182,8 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
176
  $href = untrailingslashit( get_home_url() ) . $href;
177
  }
178
 
179
- $valid_protocols = array( 'http', 'https', 'mailto', 'sms', 'tel', 'viber', 'whatsapp' , 'ftp');
180
- $special_protocols = array( 'tel', 'sms' ); // these ones don't valid with `filter_var+FILTER_VALIDATE_URL`
181
  $protocol = strtok( $href, ':' );
182
 
183
  /* Convert space into %20 and esc url so it can work with the correct
40
 
41
  if($node->nodeName=='a' && $node->hasAttribute('href')){
42
  $href = $node->getAttribute('href');
43
+ $node->setAttribute('href', \ampforwp_findInternalUrl($href));
 
 
44
  // Adding rel="noreferrer" to external links to prevent security vulnerabilities #3276
45
  if ( \ampforwp_isexternal($href) ) {
46
+ if ($node->hasAttribute('rel') ){
47
+ $rel = $node->getAttribute('rel');
48
+ if(strpos($rel, 'nofollow') !== false){
49
+ $node->setAttribute('rel', 'nofollow noreferrer');
50
+ }else{
51
+ $node->setAttribute('rel', 'noreferrer');
52
+ }
53
+ }
54
+
55
  }
56
  }
57
 
182
  $href = untrailingslashit( get_home_url() ) . $href;
183
  }
184
 
185
+ $valid_protocols = array( 'http', 'https', 'mailto', 'sms', 'tel', 'viber', 'whatsapp' , 'ftp','skype');
186
+ $special_protocols = array( 'tel', 'sms','skype' ); // these ones don't valid with `filter_var+FILTER_VALIDATE_URL`
187
  $protocol = strtok( $href, ':' );
188
 
189
  /* Convert space into %20 and esc url so it can work with the correct
includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php CHANGED
@@ -542,7 +542,7 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
542
  private function validate_cdata_for_node( $element, $cdata_spec ) {
543
  if ( isset( $cdata_spec['blacklisted_cdata_regex'] ) ) {
544
  if ( preg_match( '@' . $cdata_spec['blacklisted_cdata_regex']['regex'] . '@u', $element->textContent ) ) {
545
- return new WP_Error( $cdata_spec['blacklisted_cdata_regex']['error_message'] );
546
  }
547
  }
548
  return true;
542
  private function validate_cdata_for_node( $element, $cdata_spec ) {
543
  if ( isset( $cdata_spec['blacklisted_cdata_regex'] ) ) {
544
  if ( preg_match( '@' . $cdata_spec['blacklisted_cdata_regex']['regex'] . '@u', $element->textContent ) ) {
545
+ return new \WP_Error( $cdata_spec['blacklisted_cdata_regex']['error_message'] );
546
  }
547
  }
548
  return true;
includes/vendor/amp/includes/sanitizers/class-amp-video-sanitizer.php CHANGED
@@ -36,7 +36,6 @@ class AMP_Video_Sanitizer extends AMP_Base_Sanitizer {
36
 
37
  $new_attributes = $this->enforce_fixed_height( $new_attributes );
38
  $new_attributes = $this->enforce_sizes_attribute( $new_attributes );
39
- $new_attributes["dock"] = "#dock-slot";
40
  $new_node = AMP_DOM_Utils::create_node( $this->dom, 'amp-video', $new_attributes );
41
 
42
  // TODO: `source` does not have closing tag, and DOMDocument doesn't handle it well.
36
 
37
  $new_attributes = $this->enforce_fixed_height( $new_attributes );
38
  $new_attributes = $this->enforce_sizes_attribute( $new_attributes );
 
39
  $new_node = AMP_DOM_Utils::create_node( $this->dom, 'amp-video', $new_attributes );
40
 
41
  // TODO: `source` does not have closing tag, and DOMDocument doesn't handle it well.
includes/vendor/aq_resizer.php CHANGED
@@ -110,7 +110,7 @@ if(!class_exists('Aq_Resize')) {
110
  $cdn_url = '';
111
 
112
 
113
- // Check if $img_url is local.
114
  if ( false === strpos( $url, $upload_url ) ) {
115
  $is_cdn = true;
116
  $cdn_url_main = $cdn_url = $url;
@@ -136,9 +136,14 @@ if(!class_exists('Aq_Resize')) {
136
  }
137
 
138
  // Check if img path exists, and is an image indeed.
139
- if ( ! file_exists( $img_path ) or ! getimagesize( $img_path ) )
140
- throw new Aq_Exception('Image file does not exist (or is not an image): ' . $img_path);
141
-
 
 
 
 
 
142
  // Get image info.
143
  $info = pathinfo( $img_path );
144
  $ext = $info['extension'];
110
  $cdn_url = '';
111
 
112
 
113
+ // Check if $img_url is not local.
114
  if ( false === strpos( $url, $upload_url ) ) {
115
  $is_cdn = true;
116
  $cdn_url_main = $cdn_url = $url;
136
  }
137
 
138
  // Check if img path exists, and is an image indeed.
139
+ if ( ! file_exists( $img_path ) or ! getimagesize( $img_path ) ){
140
+ // Return the Original CDN array
141
+ return array (
142
+ 0 => $cdn_url_main,
143
+ 1 => $width,
144
+ 2 => $height
145
+ );
146
+ }
147
  // Get image info.
148
  $info = pathinfo( $img_path );
149
  $ext = $info['extension'];
includes/vendor/vendor-changelog.txt CHANGED
@@ -82,4 +82,5 @@ Reason: To extend the functionality of sidebars and Pagebuilder
82
  52. Added code for Image is not loading when source of it starting from ../wp-content issue in class-amp-wistia-embed.php #3403
83
  53. Updated class-amp-wistia-embed.php #3386
84
  54. Added class_exists('SQ_Classes_ObjController') condition to amp_post_template_add_schemaorg_metadata for Squirrly SEO Compatibility #3421
85
- 55. class-amp-content.php updated #3422
 
82
  52. Added code for Image is not loading when source of it starting from ../wp-content issue in class-amp-wistia-embed.php #3403
83
  53. Updated class-amp-wistia-embed.php #3386
84
  54. Added class_exists('SQ_Classes_ObjController') condition to amp_post_template_add_schemaorg_metadata for Squirrly SEO Compatibility #3421
85
+ 55. class-amp-content.php updated #3422
86
+ 56. whitelisted skype in anchor tags #3475
pagebuilder/functions.php CHANGED
@@ -63,7 +63,7 @@ function amppbbase_admin_scripts( $hook_suffix ){
63
  $totalmodules = 1;
64
  if(!empty($previousData)){
65
  $jsonData = json_decode($previousData,true);
66
- if(count($jsonData['rows'])>0){
67
  $totalRows = $jsonData['totalrows'];
68
  $totalmodules = $jsonData['totalmodules'];
69
  $previousData = ($jsonData);
63
  $totalmodules = 1;
64
  if(!empty($previousData)){
65
  $jsonData = json_decode($previousData,true);
66
+ if((isset($jsonData['rows']) && count($jsonData['rows']))>0){
67
  $totalRows = $jsonData['totalrows'];
68
  $totalmodules = $jsonData['totalmodules'];
69
  $previousData = ($jsonData);
pagebuilder/inc/admin-amp-page-builder.js CHANGED
@@ -798,27 +798,36 @@ Vue.component('textarea-wysiwyg', {
798
  props: [ 'defaultText','fieldindex' ],
799
  mounted: function() {
800
  var componentPoint = this;
801
- console.log(jQuery(this.$el));
 
 
 
802
  var textareaId = jQuery(this.$el).find('textarea').attr('id');
803
- if(wp.editor){
804
- wp.editor.initialize(textareaId, {
805
  tinymce: true,
806
  quicktags: true,
807
  })
808
  var editor = window.tinymce.get( textareaId );
809
  editor.on( 'blur hide', function onEditorBlur() {
810
- componentPoint.defaultText.default = wp.editor.getContent(textareaId);
811
  });
812
-
 
 
813
  }
814
 
815
  },
816
 
817
  beforeDestroy: function() {
818
  var componentPoint = this;
819
- if(wp.editor){
 
 
 
 
820
  var textareaId = jQuery(this.$el).find('textarea').attr('id');
821
- wp.editor.remove(textareaId);
822
  }
823
  }
824
  });
798
  props: [ 'defaultText','fieldindex' ],
799
  mounted: function() {
800
  var componentPoint = this;
801
+ var useEditor = wp.oldEditor;
802
+ if(!useEditor){
803
+ useEditor = wp.editor;
804
+ }
805
  var textareaId = jQuery(this.$el).find('textarea').attr('id');
806
+ if(useEditor){
807
+ useEditor.initialize(textareaId, {
808
  tinymce: true,
809
  quicktags: true,
810
  })
811
  var editor = window.tinymce.get( textareaId );
812
  editor.on( 'blur hide', function onEditorBlur() {
813
+ componentPoint.defaultText.default = useEditor.getContent(textareaId);
814
  });
815
+ jQuery("#"+textareaId).on('change', function(){
816
+ componentPoint.defaultText.default = useEditor.getContent(textareaId);
817
+ });
818
  }
819
 
820
  },
821
 
822
  beforeDestroy: function() {
823
  var componentPoint = this;
824
+ var useEditor = wp.oldEditor;
825
+ if(!useEditor){
826
+ useEditor = wp.editor;
827
+ }
828
+ if(useEditor){
829
  var textareaId = jQuery(this.$el).find('textarea').attr('id');
830
+ useEditor.remove(textareaId);
831
  }
832
  }
833
  });
pagebuilder/inc/amppb_save_data.php CHANGED
@@ -8,6 +8,10 @@ add_action( 'save_post', 'amppb_save_post', 10, 2 );
8
  /**
9
  * Save Page Builder Data When Saving Page
10
  */
 
 
 
 
11
  function amppb_save_post( $post_id, $post ){
12
 
13
  /* Stripslashes Submitted Data */
@@ -36,7 +40,7 @@ function amppb_save_post( $post_id, $post ){
36
  $saved_data = get_post_meta( $post_id, 'amp-page-builder', true );
37
 
38
  /* Get new submitted data and sanitize it. */
39
- $submitted_data = isset( $request['amp-page-builder'] ) ? wp_kses_post($request['amp-page-builder']) : null;
40
  $submitted_data = (str_replace(array("'","<script>","</script>"), array("&apos;","",""), $submitted_data));
41
  $submitted_data = wp_slash($submitted_data);
42
 
8
  /**
9
  * Save Page Builder Data When Saving Page
10
  */
11
+ function ampforwp_isjson($string) {
12
+ json_decode($string);
13
+ return (json_last_error() == JSON_ERROR_NONE);
14
+ }
15
  function amppb_save_post( $post_id, $post ){
16
 
17
  /* Stripslashes Submitted Data */
40
  $saved_data = get_post_meta( $post_id, 'amp-page-builder', true );
41
 
42
  /* Get new submitted data and sanitize it. */
43
+ $submitted_data = isset( $request['amp-page-builder'] ) && ampforwp_isjson($request['amp-page-builder']) ? $request['amp-page-builder'] : null;
44
  $submitted_data = (str_replace(array("'","<script>","</script>"), array("&apos;","",""), $submitted_data));
45
  $submitted_data = wp_slash($submitted_data);
46
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
- Stable tag: 0.9.98.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -189,17 +189,39 @@ You can contact us from [here](https://ampforwp.com/contact/)
189
 
190
  == Changelog ==
191
 
192
- = 0.9.98.2 (25nd July 2019) =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  * Fixed: Menu design issue in Design 3 #3489
194
  * Fixed: Fatal error when latest version of Smush pro plugin activated #3487
195
- * Fixed: After Version 0.9.98 update, Background Type gradient options are not showing in Row module of AMP pagebuilder #3490
196
  * Fixed: Undefined index ampforwp-amp-on-off #3474
197
  * Fixed: Search bar is not showing in design three after enabling the search option in header option panel #3484
198
  * Fixed: Content blank if Color Attribute is in Span tag #3497
199
  * Fixed: Sticky Header has no background color when scrolling. #3498
200
 
201
- = 0.9.98.1 (22nd July 2019) =
202
- * Fixed: Logo and headline comes togeather after .98 update #3472
203
- * Fixed: Default loading message as '1' in search bar after latest update (.98) #3476
204
-
205
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
+ Stable tag: 0.9.98.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
189
 
190
  == Changelog ==
191
 
192
+ = 0.9.98.3 (2nd AUGUST 2019) =
193
+ * Improvements: OpenGraph Support in AMP #3261
194
+ * Improvements: Compatibility integrated with Cloudflare stream. #3230
195
+ * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
196
+ * Improvements: Some changes in AMP panel setting's defaults #3065
197
+ * Fixed: Search bar is messed up after 3425 and 3000 #3491
198
+ * Fixed: Lightbox effect not working with "Tablepress" when "Link To" option is selected in Attachment display settings #3451
199
+ * Fixed: Fatal error Uncaught Error: Call to undefined function ampforwp_is_non_amp() #3464
200
+ * Fixed: Ol and li design issue in swift theme on RTL mode #3457
201
+ * Fixed: When AMP Page builder is checked with Empty Content, Container is missing on AMP view #3488
202
+ * Fixed: rel=”nofollow” is getting replaced by rel=”noreferrer in links #3483
203
+ * Fixed: In Archives Category & Tags option is disabled, the link should go to non-amp #3486
204
+ * Fixed: Multiple H1 Tag Issues in AMP Version on Home and Category Pages in Design 3 #3466
205
+ * Fixed: Allow href attribute value with associated apps property #3475
206
+ * Fixed: Validation errors in amp category page when HotWP PRO theme is active #3455
207
+ * Fixed: Compatibility issue with WP Offload Media Lite. #3460
208
+ * Fixed: Fatal error Uncaught Error: Call to undefined method RevSliderFunctionsWP::check_for_shortcodes() #3465
209
+ * Fixed: If a title is loading then only its markup should load otherwise not #3495
210
+ * Fixed: In Template mode feature, some fixes #3478
211
+ * Fixed: Meta description option should be enabled by default SEO #3505
212
+ * Fixed: Fatal error Uncaught Error Class 'AMPforWP\AMPVendor\WP_Error' not found #3514
213
+ * Fixed: After the upgrade, AMP Page Builder is not working! #3506
214
+ * Fixed: Page builder content getting blank when we hit save. #3513
215
+ * Fixed: Wp editor not loading when Using Page builder (with Gutenberg) #3517
216
+ * Fixed: Single design 2 in Swift broken in one specific use case #3532
217
+
218
+ = 0.9.98.2 (25ND JULY 2019) =
219
  * Fixed: Menu design issue in Design 3 #3489
220
  * Fixed: Fatal error when latest version of Smush pro plugin activated #3487
221
+ * Fixed: After Version 0.9.98 update, Background Type gradient options are not showing in Row module of AMP pagebuilder #3490
222
  * Fixed: Undefined index ampforwp-amp-on-off #3474
223
  * Fixed: Search bar is not showing in design three after enabling the search option in header option panel #3484
224
  * Fixed: Content blank if Color Attribute is in Span tag #3497
225
  * Fixed: Sticky Header has no background color when scrolling. #3498
226
 
 
 
 
 
227
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-1/elements/bread-crumbs.php CHANGED
@@ -88,7 +88,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
88
  $tag_id = $post_obj->term_id;
89
  $tag_name = $post_obj->name;
90
  $tag_link = get_tag_link($tag_id);
91
- $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . ampforwp_url_controller( $tag_link, $archive_non_amp ) . '" title="' . esc_attr($tag_name) . '">' . esc_html($tag_name) . '</a></li>';
 
 
 
92
  }
93
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
94
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
@@ -116,7 +119,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
116
  foreach($cat_parents as $parents) {
117
  $cat_id = get_cat_ID( $parents);
118
  $cat_link = get_category_link($cat_id);
119
- $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="'. ampforwp_url_controller( $cat_link, $archive_non_amp ).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
 
 
 
120
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
121
  $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>';
122
  }
88
  $tag_id = $post_obj->term_id;
89
  $tag_name = $post_obj->name;
90
  $tag_link = get_tag_link($tag_id);
91
+ if(ampforwp_get_setting('ampforwp-archive-support-tag') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
92
+ $tag_link = ampforwp_url_controller( $tag_link );
93
+ }
94
+ $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . esc_url($tag_link) . '" title="' . esc_attr($tag_name) . '">' . esc_html($tag_name) . '</a></li>';
95
  }
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
119
  foreach($cat_parents as $parents) {
120
  $cat_id = get_cat_ID( $parents);
121
  $cat_link = get_category_link($cat_id);
122
+ if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
123
+ $cat_link = ampforwp_url_controller( $cat_link );
124
+ }
125
+ $cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
126
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
127
  $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>';
128
  }
templates/design-manager/design-1/elements/meta-taxonomy.php CHANGED
@@ -15,15 +15,15 @@
15
  $term_id = $cat->term_id;
16
  $term_name = $cat->name;
17
  $term_url = get_category_link( $cat->term_id );
18
- if(false == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
19
- $term_url = false;
20
- }
21
- elseif( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-cats-tags-links-single')) {
22
- // #934
23
- $term_url = ampforwp_url_controller( $term_url );
24
- }
25
- echo ('<span class="amp-cat amp-cat-'. esc_attr($term_id) . '" >
26
- '. (!empty($term_url)? ' <a href="'. esc_url( $term_url) . '" title="'.esc_html($cat->name).'" > ':''). esc_html($term_name). (!empty($term_url)? '</a> ':'').' </span>');
27
  } ?>
28
  </div>
29
  <?php endif; } ?>
@@ -39,11 +39,15 @@
39
  printf( esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags:' ) .' ' ));
40
  }
41
  foreach ($ampforwp_tags as $tag) {
42
- if( isset($redux_builder_amp['ampforwp-archive-support']) && $redux_builder_amp['ampforwp-archive-support'] && isset($redux_builder_amp['ampforwp-cats-tags-links-single']) && $redux_builder_amp['ampforwp-cats-tags-links-single']) {
43
- echo ('<span class="amp-tag-'.esc_attr($tag->term_id).'"><a href="'. ampforwp_url_controller( get_tag_link( $tag->term_id ) ).'" >'.$tag->name .'</a></span>');//#934
44
- } else {
45
- echo ('<span>'.esc_attr($tag->name).'</span>');
46
- }
 
 
 
 
47
  }
48
  if($redux_builder_amp['amp-rtl-select-option']) {
49
  echo '<span class="tt-lb">'.esc_attr( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags:' ) .' ' ).'</span>';
15
  $term_id = $cat->term_id;
16
  $term_name = $cat->name;
17
  $term_url = get_category_link( $cat->term_id );
18
+ if(true == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
19
+ $cat_link = get_category_link( $cat->term_id );
20
+ if(true == ampforwp_get_setting('ampforwp-cats-tags-links-single') && ampforwp_get_setting('ampforwp-archive-support-cat') == true ){
21
+ $cat_link = ampforwp_url_controller($cat_link);
22
+ }
23
+ echo ('<span class="amp-cat-'.esc_attr($cat->term_id).'"><a href="'. esc_url($cat_link) .'" title="'.esc_html($cat->name).'" > '. esc_html($cat->name) .'</a></span>');//#934
24
+ }else{
25
+ echo '<span class="amp-cat">'. esc_html($cat->name) .'</span>';
26
+ }
27
  } ?>
28
  </div>
29
  <?php endif; } ?>
39
  printf( esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags:' ) .' ' ));
40
  }
41
  foreach ($ampforwp_tags as $tag) {
42
+ if(ampforwp_get_setting('ampforwp-cats-tags-links-single') == true){
43
+ $tag_link = get_tag_link( $tag->term_id );
44
+ if(ampforwp_get_setting('ampforwp-archive-support') == true && ampforwp_get_setting('ampforwp-archive-support-tag') == true){
45
+ $tag_link = ampforwp_url_controller($tag_link);
46
+ }
47
+ echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.esc_url($tag_link).'" >'.esc_html($tag->name) .'</a></span>');//#934
48
+ }else{
49
+ echo ('<span>'.esc_html($tag->name).'</span>');
50
+ }
51
  }
52
  if($redux_builder_amp['amp-rtl-select-option']) {
53
  echo '<span class="tt-lb">'.esc_attr( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags:' ) .' ' ).'</span>';
templates/design-manager/design-1/elements/title.php CHANGED
@@ -1,10 +1,15 @@
1
  <?php global $redux_builder_amp;
2
  do_action('ampforwp_above_the_title',$this); ?>
3
  <header class="amp-wp-article-header ampforwp-title">
4
- <h1 class="amp-wp-title"><?php
5
- $ampforwp_title = $this->get( 'post_title' ) ;
6
- $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
7
- echo wp_kses_data( $ampforwp_title );?></h1>
 
 
 
 
 
8
  <?php
9
  if( array_key_exists( 'enable-excerpt-single' , $redux_builder_amp ) ) {
10
  if($redux_builder_amp['enable-excerpt-single']) {
1
  <?php global $redux_builder_amp;
2
  do_action('ampforwp_above_the_title',$this); ?>
3
  <header class="amp-wp-article-header ampforwp-title">
4
+ <?php
5
+ $ampforwp_title = $this->get( 'post_title' ) ;
6
+ $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
7
+ if(!empty($ampforwp_title)){
8
+ ?>
9
+ <h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
10
+ <?php
11
+ }
12
+ ?>
13
  <?php
14
  if( array_key_exists( 'enable-excerpt-single' , $redux_builder_amp ) ) {
15
  if($redux_builder_amp['enable-excerpt-single']) {
templates/design-manager/design-2/elements/bread-crumbs.php CHANGED
@@ -88,7 +88,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
88
  $tag_id = $post_obj->term_id;
89
  $tag_name = $post_obj->name;
90
  $tag_link = get_tag_link($tag_id);
91
- $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . ampforwp_url_controller( $tag_link, $archive_non_amp ) . '" title="' . esc_attr($tag_name) . '">' . esc_html($tag_name) . '</a></li>';
 
 
 
92
  }
93
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
94
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
@@ -114,7 +117,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
114
  foreach($cat_parents as $parents) {
115
  $cat_id = get_cat_ID( $parents);
116
  $cat_link = get_category_link($cat_id);
117
- $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="'. ampforwp_url_controller( $cat_link, $archive_non_amp ).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
 
 
 
118
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
119
  $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>';
120
  }
88
  $tag_id = $post_obj->term_id;
89
  $tag_name = $post_obj->name;
90
  $tag_link = get_tag_link($tag_id);
91
+ if(ampforwp_get_setting('ampforwp-archive-support-tag') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
92
+ $tag_link = ampforwp_url_controller( $tag_link );
93
+ }
94
+ $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . esc_url($tag_link) . '" title="' . esc_attr($tag_name) . '">' . esc_attr($tag_name) . '</a></li>';
95
  }
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
117
  foreach($cat_parents as $parents) {
118
  $cat_id = get_cat_ID( $parents);
119
  $cat_link = get_category_link($cat_id);
120
+ if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
121
+ $cat_link = ampforwp_url_controller( $cat_link );
122
+ }
123
+ $cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
124
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
125
  $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>';
126
  }
templates/design-manager/design-2/elements/meta-info.php CHANGED
@@ -30,20 +30,19 @@ if( isset($redux_builder_amp['ampforwp-cats-single']) && $redux_builder_amp['amp
30
  <span>
31
  <?php printf( esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-categories-text'], 'Categories:' )). ' ');?>
32
  </span>
33
- <?php foreach ($ampforwp_categories as $cat ) {
34
- $term_id = $cat->term_id;
35
- $term_name = $cat->name;
36
- $term_url = get_category_link( $cat->term_id );
37
- if(false == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
38
- $term_url = false;
39
- }
40
- elseif( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-cats-tags-links-single')) {
41
- // #934
42
- $term_url = ampforwp_url_controller( $term_url );
43
- }
44
- echo ('<span class="amp-cat amp-cat-'. esc_attr($term_id) . '" >
45
- '. (!empty($term_url)? ' <a href="'. esc_url( $term_url) . '" > ':''). esc_html($term_name). (!empty($term_url)? '</a> ':'').' </span>');
46
- }
47
 
48
 
49
  ?>
30
  <span>
31
  <?php printf( esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-categories-text'], 'Categories:' )). ' ');?>
32
  </span>
33
+ <?php
34
+ foreach ($ampforwp_categories as $cat ) {
35
+ $cat_link = get_category_link( $cat->term_id );
36
+ if( true == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
37
+ $cat_link = get_category_link( $cat->term_id );
38
+ if( true == ampforwp_get_setting('ampforwp-archive-support') && ampforwp_get_setting('ampforwp-archive-support-cat') == true){
39
+ $cat_link = ampforwp_url_controller(get_category_link($cat->term_id));
40
+ }
41
+ echo ('<span class="amp-cat-'.esc_attr($cat->term_id).'"><a href="'.esc_url($cat_link).'" >'.esc_html($cat->name).'</a></span>');//#934
42
+ }else{
43
+ echo '<span class="amp-cat">'. esc_html($cat->name) .'</span>';
44
+ }
45
+ }
 
46
 
47
 
48
  ?>
templates/design-manager/design-2/elements/meta-taxonomy.php CHANGED
@@ -12,13 +12,16 @@
12
  }
13
 
14
  foreach ($ampforwp_tags as $tag) {
15
- if( isset($redux_builder_amp['ampforwp-archive-support']) && $redux_builder_amp['ampforwp-archive-support'] && isset($redux_builder_amp['ampforwp-cats-tags-links-single']) && $redux_builder_amp['ampforwp-cats-tags-links-single']) {
16
- echo ('<span class="amp-tag-'.esc_attr($tag->term_id).'"><a href="'. ampforwp_url_controller( get_tag_link( $tag->term_id ) ).'" >'.esc_attr($tag->name) .'</a></span>');//#934
17
- } else {
18
- echo ('<span>'.esc_attr($tag->name) .'</span>');
19
- }
 
 
 
 
20
  }
21
-
22
  //if RTL is ON
23
  if($redux_builder_amp['amp-rtl-select-option']) {
24
  echo '<span class="tt-lb">'.esc_attr( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags:' ) .' ' ).'</span>';
12
  }
13
 
14
  foreach ($ampforwp_tags as $tag) {
15
+ if( ampforwp_get_setting('ampforwp-cats-tags-links-single') == true){
16
+ $tag_link = get_tag_link( $tag->term_id );
17
+ if( ampforwp_get_setting('ampforwp-archive-support') == true && ampforwp_get_setting('ampforwp-archive-support-tag') == true){
18
+ $tag_link = ampforwp_url_controller(get_tag_link( $tag->term_id ));
19
+ }
20
+ echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.esc_url($tag_link).'" >'.esc_html($tag->name).'</a></span>');//#934
21
+ }else{
22
+ echo ('<span>'.esc_html($tag->name).'</span>');
23
+ }
24
  }
 
25
  //if RTL is ON
26
  if($redux_builder_amp['amp-rtl-select-option']) {
27
  echo '<span class="tt-lb">'.esc_attr( ampforwp_translation($redux_builder_amp['amp-translator-tags-text'], 'Tags:' ) .' ' ).'</span>';
templates/design-manager/design-2/elements/title.php CHANGED
@@ -1,10 +1,15 @@
1
  <?php global $redux_builder_amp;
2
  do_action('ampforwp_above_the_title',$this); ?>
3
  <header class="amp-wp-article-header ampforwp-title">
4
- <h1 class="amp-wp-title"><?php
5
- $ampforwp_title = $this->get( 'post_title' );
6
- $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
7
- echo wp_kses_data( $ampforwp_title );?></h1>
 
 
 
 
 
8
  <?php if( array_key_exists( 'enable-excerpt-single' , $redux_builder_amp ) ) {
9
  if($redux_builder_amp['enable-excerpt-single']) {
10
  if(has_excerpt()){ ?>
1
  <?php global $redux_builder_amp;
2
  do_action('ampforwp_above_the_title',$this); ?>
3
  <header class="amp-wp-article-header ampforwp-title">
4
+ <?php
5
+ $ampforwp_title = $this->get( 'post_title' );
6
+ $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
7
+ if(!empty($ampforwp_title)){
8
+ ?>
9
+ <h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
10
+ <?php
11
+ }
12
+ ?>
13
  <?php if( array_key_exists( 'enable-excerpt-single' , $redux_builder_amp ) ) {
14
  if($redux_builder_amp['enable-excerpt-single']) {
15
  if(has_excerpt()){ ?>
templates/design-manager/design-3/elements/bread-crumbs.php CHANGED
@@ -88,7 +88,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
88
  $tag_id = $post_obj->term_id;
89
  $tag_name = $post_obj->name;
90
  $tag_link = get_tag_link($tag_id);
91
- $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . ampforwp_url_controller( $tag_link, $archive_non_amp ) . '" title="' . esc_attr($tag_name) . '">' . esc_html($tag_name) . '</a></li>';
 
 
 
92
  }
93
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
94
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
@@ -114,7 +117,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
114
  foreach($cat_parents as $parents) {
115
  $cat_id = get_cat_ID( $parents);
116
  $cat_link = get_category_link($cat_id);
117
- $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="'. ampforwp_url_controller( $cat_link, $archive_non_amp ).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
 
 
 
118
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
119
  $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>';
120
  }
88
  $tag_id = $post_obj->term_id;
89
  $tag_name = $post_obj->name;
90
  $tag_link = get_tag_link($tag_id);
91
+ if(ampforwp_get_setting('ampforwp-archive-support-tag') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
92
+ $tag_link = ampforwp_url_controller( $tag_link );
93
+ }
94
+ $tags_breadcrumbs .= '<li class="item-tag item-tag-' . esc_attr($tag_id) . ' item-tag-' . esc_attr($tag_name) . '"><a class="bread-tag bread-tag-' . esc_attr($tag_id) . ' bread-tag-' . esc_attr($tag_name) . '" href="' . esc_url($tag_link) . '" title="'.esc_attr($tag_name).'">'.esc_html($tag_name).'</a></li>';
95
  }
96
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
97
  $tags_breadcrumbs .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
117
  foreach($cat_parents as $parents) {
118
  $cat_id = get_cat_ID( $parents);
119
  $cat_link = get_category_link($cat_id);
120
+ if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
121
+ $cat_link = ampforwp_url_controller( $cat_link );
122
+ }
123
+ $cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
124
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
125
  $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>';
126
  }
templates/design-manager/design-3/elements/meta-info.php CHANGED
@@ -25,18 +25,15 @@ if( isset($redux_builder_amp['ampforwp-cats-single']) && $redux_builder_amp['amp
25
  global $redux_builder_amp; printf( esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-in-designthree'] , 'in' ) .' '));
26
 
27
  foreach ($ampforwp_categories as $cat ) {
28
- $term_id = $cat->term_id;
29
- $term_name = $cat->name;
30
- $term_url = get_category_link( $cat->term_id );
31
- if(false == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
32
- $term_url = false;
33
- }
34
- elseif( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-cats-tags-links-single')) {
35
- // #934
36
- $term_url = ampforwp_url_controller( $term_url );
37
  }
38
- echo ('<span class="amp-cat amp-cat-'. esc_attr($term_id) . '" >
39
- '. (!empty($term_url)? ' <a href="'. esc_url( $term_url) . '" > ':''). esc_html($term_name). (!empty($term_url)? '</a> ':'').' </span>');
 
 
40
  }
41
  ?>
42
  </span>
25
  global $redux_builder_amp; printf( esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-in-designthree'] , 'in' ) .' '));
26
 
27
  foreach ($ampforwp_categories as $cat ) {
28
+ if( true == ampforwp_get_setting('ampforwp-cats-tags-links-single')){
29
+ $cat_link = get_category_link( $cat->term_id );
30
+ if( true == ampforwp_get_setting('ampforwp-archive-support') && true == ampforwp_get_setting('ampforwp-archive-support-cat')){
31
+ $cat_link = ampforwp_url_controller(get_category_link( $cat->term_id ));
 
 
 
 
 
32
  }
33
+ echo ('<span class="amp-cat-'.esc_attr($cat->term_id).'"><a href="'.esc_url($cat_link). '" >'. esc_html($cat->name) .'</a></span>');
34
+ }else{
35
+ echo '<span class="amp-cat">'. esc_html($cat->name) .'</span>';
36
+ }
37
  }
38
  ?>
39
  </span>
templates/design-manager/design-3/elements/meta-taxonomy.php CHANGED
@@ -6,14 +6,19 @@
6
  if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
7
  <?php do_action('ampforwp_before_meta_taxonomy_hook',$this); ?>
8
  <div class="amp-wp-meta amp-wp-content ampforwp-tax-tag">
9
- <?php foreach ($ampforwp_tags as $tag) {
10
- if( isset($redux_builder_amp['ampforwp-archive-support']) && $redux_builder_amp['ampforwp-archive-support'] && isset($redux_builder_amp['ampforwp-cats-tags-links-single']) && $redux_builder_amp['ampforwp-cats-tags-links-single'] ) {
11
- echo ('<span class="amp-tag-'.esc_attr($tag->term_id).'"><a href="'. ampforwp_url_controller( get_tag_link( $tag->term_id ) ) .'" >'. esc_attr($tag->name) .'</a></span>');//#934
12
- }
13
- else {
14
- echo '<span>'. esc_attr($tag->name) .'</span>';
15
- }
16
- } ?>
 
 
 
 
 
17
  </div>
18
  <?php endif;?>
19
  </div> <?php } ?>
6
  if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
7
  <?php do_action('ampforwp_before_meta_taxonomy_hook',$this); ?>
8
  <div class="amp-wp-meta amp-wp-content ampforwp-tax-tag">
9
+ <?php
10
+ foreach ($ampforwp_tags as $tag) {
11
+ if( ampforwp_get_setting('ampforwp-cats-tags-links-single') == true){
12
+ $tag_link = get_tag_link( $tag->term_id );
13
+ if( ampforwp_get_setting('ampforwp-archive-support') == true && ampforwp_get_setting('ampforwp-archive-support-tag') == true){
14
+ $tag_link = ampforwp_url_controller(get_tag_link( $tag->term_id ));
15
+ }
16
+ echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.esc_url($tag_link).'" >'.esc_html($tag->name).'</a></span>');//#934
17
+ }else{
18
+ echo '<span>'.esc_html($tag->name).'</span>';
19
+ }
20
+ }
21
+ ?>
22
  </div>
23
  <?php endif;?>
24
  </div> <?php } ?>
templates/design-manager/design-3/elements/title.php CHANGED
@@ -1,10 +1,15 @@
1
  <?php global $redux_builder_amp;
2
  do_action('ampforwp_above_the_title',$this); ?>
3
  <header class="amp-wp-content amp-wp-article-header ampforwp-title">
4
- <h1 class="amp-wp-title"><?php
5
- $ampforwp_title = $this->get( 'post_title' ) ;
6
- $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
7
- echo wp_kses_data( $ampforwp_title );?></h1>
 
 
 
 
 
8
  <?php if( array_key_exists( 'enable-excerpt-single' , $redux_builder_amp ) ) {
9
  if($redux_builder_amp['enable-excerpt-single']) {
10
  if( has_excerpt() ){ ?>
1
  <?php global $redux_builder_amp;
2
  do_action('ampforwp_above_the_title',$this); ?>
3
  <header class="amp-wp-content amp-wp-article-header ampforwp-title">
4
+ <?php
5
+ $ampforwp_title = $this->get( 'post_title' ) ;
6
+ $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
7
+ if(!empty($ampforwp_title)){
8
+ ?>
9
+ <h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
10
+ <?php
11
+ }
12
+ ?>
13
  <?php if( array_key_exists( 'enable-excerpt-single' , $redux_builder_amp ) ) {
14
  if($redux_builder_amp['enable-excerpt-single']) {
15
  if( has_excerpt() ){ ?>
templates/design-manager/design-3/index.php CHANGED
@@ -104,7 +104,7 @@ if ( get_query_var( 'paged' ) ) {
104
  $post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
105
  $post_date = apply_filters('ampforwp_modify_post_date',$post_date);
106
  echo esc_attr($post_date); ?></div>
107
- <h1><?php the_title() ?></h1>
108
  </div>
109
  </a>
110
  </div>
104
  $post_date = human_time_diff( get_the_time('U', get_the_ID() ), current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],'ago' );
105
  $post_date = apply_filters('ampforwp_modify_post_date',$post_date);
106
  echo esc_attr($post_date); ?></div>
107
+ <h2><?php the_title() ?></h2>
108
  </div>
109
  </a>
110
  </div>
templates/design-manager/design-3/style.php CHANGED
@@ -479,7 +479,6 @@ amp-lightbox{ background: rgba(0, 0, 0,0.85); }
479
  .searchform input{ background: transparent; border: 1px solid #666; color: #f7f7f7; font-size: 14px; font-weight: 400; line-height: 1; letter-spacing: 0.3px; text-transform: capitalize; padding: 20px 0px 20px 30px; margin-top: 15px; width: 100%; }
480
  #searchsubmit{opacity:0}
481
  <?php } // search condition ends ?>
482
- .featured_time{ font-size: 12px; color: #fff; opacity: 0.8; padding-left: 20px; }
483
  .archives_body main{ margin-top:20px }
484
  .taxonomy-description p{margin-top: 5px;font-size: 14px;line-height: 1.5;}
485
  .amp-sub-archives li{width: 50%;} .amp-sub-archives ul{padding: 0;list-style: none;display: flex;font-size: 12px;line-height: 1.2;margin: 5px 0 10px 0px;} .author-img amp-img{border-radius: 50%;margin: 0px 12px 10px 0px;display: block; width:50px;}.author-img{float: left;padding-bottom: 25px;}
@@ -489,12 +488,13 @@ amp-lightbox{ background: rgba(0, 0, 0,0.85); }
489
  .amp-carousel-button { z-index: 999}
490
  .amp-featured-wrapper{ background:#333 }
491
  .amp-featured-area{ margin: 0 auto; max-width: 450px; max-height: 270px; }
492
- .amp-carousel-slide h1{ font-size: 30px; font-family: 'PT Serif', serif; margin: 0; font-weight: normal; line-height: 38px; color: #fff; padding: 10px 20px 20px 20px; }
493
  .amp-featured-area .amp-carousel-slide amp-img:before{ z-index:100; bottom: 0; content: ""; display: block; height: 100%; position:absolute; width: 100%; background: -webkit-gradient(linear, 50% 0%, 50% 75%, color-stop(0%, rgba(0,0,0,0)), color-stop(150%, #000000)) repeat scroll 0 0 rgba(0,0,0,0.2); background: -webkit-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: -moz-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: -o-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); }
494
  .featured_title{ position:absolute; z-index:110; bottom:0 }
495
  .featured_meta{ color:#acacac; font-size:12px; margin:0 15px; }
496
  .featured_meta_left{ float:left }
497
  .featured_meta_right{ float:right }
 
498
  <?php }
499
  if( !ampforwp_woocommerce_conditional_check() ) {
500
  if ( is_singular() || is_home() && $redux_builder_amp['amp-frontpage-select-option'] && ampforwp_get_blog_details() == false ) { ?>
@@ -534,12 +534,12 @@ amp-user-notification button:hover{ cursor: pointer }
534
  @media screen and (max-width: 530px){ .home-post_image{ width: 35%; } .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-wp-post-content p { font-size: 12px; } .related_posts ol li p { line-height: 1.6; margin: 7px 0 0 0;} .comments_list ul li .comment-body {width:auto} .amp-category-block li:nth-child(3) {margin:0} }
535
  @media screen and (max-width: 425px){ .home-post_image{ /* width: 125px;*/ width: 31.6%; overflow: hidden; /* margin-right: 13px; */ margin-right: 3%; max-height: 122px } .home-post_image amp-img{ width: 144%; left: -20%; } h2.amp-wp-title{ margin-bottom: 7px; line-height: 1.31578947; font-size: 19px; position:relative;top:-3px } h2.amp-wp-title a{ color:#262626} .amp-loop-list{padding:25px 15px 22px 15px} .amp-loop-list .amp-wp-post-content{ width: 63%; } .related_posts .amp-loop-list .amp-wp-post-content .small-screen-excerpt-design-3 { display: block; } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .ampforwp-tax-category{ padding-bottom:0 } .amp-wp-byline{ padding:0 } .related_posts .related_link a{ font-size: 17px; line-height: 1.5; } .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 26px;} .icono-share{display:none} .ampforwp-social-icons amp-social-share{ margin-right: 3px;} main .amp-wp-content{ font-size: 16px; line-height: 26px;} .single-post .amp_author_area .amp_author_area_wrapper{font-size:13px;} .amp-category-post{ font-size:12px; color:#666 } .large-screen-excerpt-design-3{ display:none;}.ampforwp-inline-related-post .related_posts ol li{padding:0px 0px 10px 0px;} }
536
  @media screen and (max-width: 400px){ .amp-wp-title{ font-size: 19px; } }
537
- @media screen and (max-width: 375px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 24px;} .amp-carousel-slide h1{ font-size: 22px; line-height: 32px; } #pagination .next a, #pagination .prev a{ color: #666; font-size: 14px; padding: 15px 0px; margin-top: -5px; }.related-title,.comments_list h3{ margin-top:15px; } #pagination .next{ margin-bottom:15px; } .related_posts .related_link {line-height: 1; } }
538
  @media screen and (max-width: 340px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 22px;} h2.amp-wp-title{ line-height: 1.31578947; font-size: 17px; } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } }
539
  @media screen and (max-width: 320px){ .ampforwp-social-icons amp-social-share{ margin-right: 1px; } }
540
  .entry-content amp-anim{display:table-cell;}
541
  <?php if ( true == $redux_builder_amp['amp-rtl-select-option'] ) { ?>
542
- .amp-carousel-slide h1{ direction: rtl; }
543
  .featured_time{ text-align: right; padding-right: 20px; }
544
  main .amp-wp-content{ direction: rtl; }
545
  .home-post_image{ float: right; padding-right: 0%; padding-left: 2%; margin-right: 0%; overflow: hidden;}
479
  .searchform input{ background: transparent; border: 1px solid #666; color: #f7f7f7; font-size: 14px; font-weight: 400; line-height: 1; letter-spacing: 0.3px; text-transform: capitalize; padding: 20px 0px 20px 30px; margin-top: 15px; width: 100%; }
480
  #searchsubmit{opacity:0}
481
  <?php } // search condition ends ?>
 
482
  .archives_body main{ margin-top:20px }
483
  .taxonomy-description p{margin-top: 5px;font-size: 14px;line-height: 1.5;}
484
  .amp-sub-archives li{width: 50%;} .amp-sub-archives ul{padding: 0;list-style: none;display: flex;font-size: 12px;line-height: 1.2;margin: 5px 0 10px 0px;} .author-img amp-img{border-radius: 50%;margin: 0px 12px 10px 0px;display: block; width:50px;}.author-img{float: left;padding-bottom: 25px;}
488
  .amp-carousel-button { z-index: 999}
489
  .amp-featured-wrapper{ background:#333 }
490
  .amp-featured-area{ margin: 0 auto; max-width: 450px; max-height: 270px; }
491
+ .amp-carousel-slide h2{ font-size: 30px; font-family: 'PT Serif', serif; margin: 0; font-weight: normal; line-height: 38px; color: #fff; padding: 10px 20px 20px 20px; }
492
  .amp-featured-area .amp-carousel-slide amp-img:before{ z-index:100; bottom: 0; content: ""; display: block; height: 100%; position:absolute; width: 100%; background: -webkit-gradient(linear, 50% 0%, 50% 75%, color-stop(0%, rgba(0,0,0,0)), color-stop(150%, #000000)) repeat scroll 0 0 rgba(0,0,0,0.2); background: -webkit-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: -moz-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: -o-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); }
493
  .featured_title{ position:absolute; z-index:110; bottom:0 }
494
  .featured_meta{ color:#acacac; font-size:12px; margin:0 15px; }
495
  .featured_meta_left{ float:left }
496
  .featured_meta_right{ float:right }
497
+ .featured_time{ font-size: 12px; color: #fff; opacity: 0.8; padding-left: 20px;}
498
  <?php }
499
  if( !ampforwp_woocommerce_conditional_check() ) {
500
  if ( is_singular() || is_home() && $redux_builder_amp['amp-frontpage-select-option'] && ampforwp_get_blog_details() == false ) { ?>
534
  @media screen and (max-width: 530px){ .home-post_image{ width: 35%; } .amp-loop-list .amp-wp-post-content{ width: 63%; } .amp-wp-post-content p { font-size: 12px; } .related_posts ol li p { line-height: 1.6; margin: 7px 0 0 0;} .comments_list ul li .comment-body {width:auto} .amp-category-block li:nth-child(3) {margin:0} }
535
  @media screen and (max-width: 425px){ .home-post_image{ /* width: 125px;*/ width: 31.6%; overflow: hidden; /* margin-right: 13px; */ margin-right: 3%; max-height: 122px } .home-post_image amp-img{ width: 144%; left: -20%; } h2.amp-wp-title{ margin-bottom: 7px; line-height: 1.31578947; font-size: 19px; position:relative;top:-3px } h2.amp-wp-title a{ color:#262626} .amp-loop-list{padding:25px 15px 22px 15px} .amp-loop-list .amp-wp-post-content{ width: 63%; } .related_posts .amp-loop-list .amp-wp-post-content .small-screen-excerpt-design-3 { display: block; } .related_posts .related_link a{ font-size: 18px; line-height: 1.7; } .ampforwp-tax-category{ padding-bottom:0 } .amp-wp-byline{ padding:0 } .related_posts .related_link a{ font-size: 17px; line-height: 1.5; } .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 26px;} .icono-share{display:none} .ampforwp-social-icons amp-social-share{ margin-right: 3px;} main .amp-wp-content{ font-size: 16px; line-height: 26px;} .single-post .amp_author_area .amp_author_area_wrapper{font-size:13px;} .amp-category-post{ font-size:12px; color:#666 } .large-screen-excerpt-design-3{ display:none;}.ampforwp-inline-related-post .related_posts ol li{padding:0px 0px 10px 0px;} }
536
  @media screen and (max-width: 400px){ .amp-wp-title{ font-size: 19px; } }
537
+ @media screen and (max-width: 375px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 24px;} .amp-carousel-slide h2{ font-size: 22px; line-height: 32px; } #pagination .next a, #pagination .prev a{ color: #666; font-size: 14px; padding: 15px 0px; margin-top: -5px; }.related-title,.comments_list h3{ margin-top:15px; } #pagination .next{ margin-bottom:15px; } .related_posts .related_link {line-height: 1; } }
538
  @media screen and (max-width: 340px){ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 22px;} h2.amp-wp-title{ line-height: 1.31578947; font-size: 17px; } .the_content .amp-ad-wrapper{ text-align: center; margin-left: -13px; } }
539
  @media screen and (max-width: 320px){ .ampforwp-social-icons amp-social-share{ margin-right: 1px; } }
540
  .entry-content amp-anim{display:table-cell;}
541
  <?php if ( true == $redux_builder_amp['amp-rtl-select-option'] ) { ?>
542
+ .amp-carousel-slide h2{ direction: rtl; }
543
  .featured_time{ text-align: right; padding-right: 20px; }
544
  main .amp-wp-content{ direction: rtl; }
545
  .home-post_image{ float: right; padding-right: 0%; padding-left: 2%; margin-right: 0%; overflow: hidden;}
templates/design-manager/swift/single.php CHANGED
@@ -475,10 +475,11 @@ do_action("ampforwp_single_design_type_handle_d1");
475
  do_action('ampforwp_between_related_post',$r_count);
476
  $r_count++;
477
  }
478
- } ?>
479
  </ul>
480
  </div>
481
- <?php wp_reset_postdata(); }
 
482
  } ?>
483
  </div><!-- /.sp-rt -->
484
  </div><!-- /.sp-rl -->
475
  do_action('ampforwp_between_related_post',$r_count);
476
  $r_count++;
477
  }
478
+ ?>
479
  </ul>
480
  </div>
481
+ <?php }
482
+ wp_reset_postdata(); }
483
  } ?>
484
  </div><!-- /.sp-rt -->
485
  </div><!-- /.sp-rl -->
templates/design-manager/swift/style.php CHANGED
@@ -654,10 +654,28 @@ if($redux_builder_amp['swift-social-position'] == 'below-content'){?>
654
  <?php } // H6 Ends
655
  // swift Content Heading Sizes Ends?>
656
  .cntn-wrp p, .cntn-wrp ul, .cntn-wrp ol{margin:0px 0px 30px 0px;word-break: break-word;}
657
- .artl-cnt ul li, .artl-cnt ol li{list-style-type: none;position: relative;padding-left: 20px;}
658
- .artl-cnt ul li:before{content: "";display: inline-block;width: 5px;height: 5px;background: #333;position: absolute;left: 0;top: 12px;}
 
 
 
 
 
 
 
 
 
 
 
 
659
  .artl-cnt ol li {counter-increment: step-counter;}
660
- .artl-cnt ol li::before {content: counter(step-counter);font-size: 16px;color: #000;position: absolute;left: 0px;line-height: 1.2;top: 6px;}
 
 
 
 
 
 
661
  .sp-rt p strong, .pg p strong{font-weight: 700;}
662
  .m-ctr {
663
  position: fixed;
654
  <?php } // H6 Ends
655
  // swift Content Heading Sizes Ends?>
656
  .cntn-wrp p, .cntn-wrp ul, .cntn-wrp ol{margin:0px 0px 30px 0px;word-break: break-word;}
657
+ .artl-cnt ul li, .artl-cnt ol li{list-style-type: none;position: relative;
658
+ <?php if( true == ampforwp_get_setting('amp-rtl-select-option') ) {?>
659
+ padding-right:20px;
660
+ <?php } else{ ?>
661
+ padding-left: 20px;
662
+ <?php } ?>
663
+ }
664
+ .artl-cnt ul li:before{content: "";display: inline-block;width: 5px;height: 5px;background: #333;position: absolute;top:12px;
665
+ <?php if( true == ampforwp_get_setting('amp-rtl-select-option') ) {?>
666
+ right:0;
667
+ <?php } else{ ?>
668
+ left: 0px;
669
+ <?php } ?>
670
+ }
671
  .artl-cnt ol li {counter-increment: step-counter;}
672
+ .artl-cnt ol li::before {content: counter(step-counter);font-size: 16px;color: #000;position: absolute;
673
+ <?php if( true == ampforwp_get_setting('amp-rtl-select-option') ) {?>
674
+ right:0;
675
+ <?php } else{ ?>
676
+ left: 0px;
677
+ <?php } ?>
678
+ line-height: 1.2;top: 6px;}
679
  .sp-rt p strong, .pg p strong{font-weight: 700;}
680
  .m-ctr {
681
  position: fixed;
templates/features.php CHANGED
@@ -718,6 +718,8 @@ function ampforwp_new_dir( $dir ) {
718
  $content = preg_replace('/\[gallery(.*?)\]/', '</p>[gallery$1]</p>', $content);
719
  // value attribute from anchor tag #2262
720
  $content = preg_replace('/<a(.*?)(value=".*?")(.*?)>/', '<a$1$3>', $content);
 
 
721
 
722
  return $content;
723
  }
@@ -805,13 +807,13 @@ function ampforwp_title_callback( $post ) {
805
  }
806
  $exclude_post_value = ampforwp_exclude_posts();
807
  // if hide-amp is selected, add it in the $exclude_post_value
808
- if ( 'hide-amp' == $ampforwp_stored_meta['ampforwp-amp-on-off'][0] && 'page' != $post->post_type ) {
809
  if ( ! in_array($post->ID, $exclude_post_value) ) {
810
  $exclude_post_value[] = $post->ID;
811
  set_transient('ampforwp_exclude_post_transient', $exclude_post_value);
812
  }
813
  }
814
- if ( ( 'default' == $ampforwp_stored_meta['ampforwp-amp-on-off'][0] || !isset($ampforwp_stored_meta['ampforwp-amp-on-off'][0]) ) && 'page' != $post->post_type ) {
815
  if ( in_array($post->ID, $exclude_post_value) ) {
816
  $exclude_post_value = array_flip($exclude_post_value);
817
  unset($exclude_post_value[$post->ID] );
@@ -3088,7 +3090,7 @@ function ampforwp_change_default_amp_page_meta() {
3088
  add_action('amp_post_template_head','ampforwp_meta_description');
3089
  function ampforwp_meta_description() {
3090
  global $redux_builder_amp;
3091
- if ( false == ampforwp_get_setting('ampforwp-seo-meta-description') || 'rank_math' == ampforwp_get_setting('ampforwp-seo-selection') ) {
3092
  return;
3093
  }
3094
  $desc = ampforwp_generate_meta_desc();
@@ -4903,11 +4905,58 @@ if( ! function_exists( 'ampforwp_view_amp_admin_bar' ) ) {
4903
  if($post->post_type == 'post' && !$redux_builder_amp['amp-on-off-for-all-posts'] || $post->post_type == 'page' && !$redux_builder_amp['amp-on-off-for-all-pages']) {
4904
  return;
4905
  }
4906
- $post_type_title = ucfirst($post->post_type);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4907
  $wp_admin_bar->add_node(array(
4908
  'id' => 'ampforwp-view-amp',
4909
  'title' => 'View ' . esc_html($post_type_title) . ' (AMP)' ,
4910
- 'href' => ampforwp_url_controller( get_permalink( $post->ID ) )
4911
  ));
4912
  }
4913
  }
@@ -5689,13 +5738,25 @@ add_action('pre_amp_render_post','ampforwp_remove_ahref_lightbox');
5689
  function ampforwp_remove_ahref_lightbox(){
5690
  if(true == ampforwp_get_setting('ampforwp-amp-img-lightbox')){
5691
  add_filter( 'the_content', 'ampforwp_remove_ahref_lightbox_in_amp' );
 
5692
  }
5693
  }
5694
  function ampforwp_remove_ahref_lightbox_in_amp( $content ) {
5695
  $updated_content = preg_replace("/<a[^>]+\>(<img[^>]+\>)<\/a>/i", '$1', $content);
5696
  return $updated_content;
5697
  }
5698
-
 
 
 
 
 
 
 
 
 
 
 
5699
  // amp-image-lightbox #1892
5700
  if ( ! function_exists('ampforwp_amp_img_lightbox') ) {
5701
  function ampforwp_amp_img_lightbox(){
@@ -6833,4 +6894,25 @@ function ampforwp_generate_taxonomies_transient(){
6833
  }
6834
  }
6835
  return $taxonomies;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6836
  }
718
  $content = preg_replace('/\[gallery(.*?)\]/', '</p>[gallery$1]</p>', $content);
719
  // value attribute from anchor tag #2262
720
  $content = preg_replace('/<a(.*?)(value=".*?")(.*?)>/', '<a$1$3>', $content);
721
+ //Compatibility with Cloudflare stream. #3230
722
+ $content = preg_replace('/<stream[^>]* src="(.*?)"><\/stream>/', '<amp-iframe width="175" height="100" sandbox="allow-scripts allow-same-origin" layout="responsive" allowfullscreen src="https://iframe.cloudflarestream.com/$1"></amp-iframe>', $content);
723
 
724
  return $content;
725
  }
807
  }
808
  $exclude_post_value = ampforwp_exclude_posts();
809
  // if hide-amp is selected, add it in the $exclude_post_value
810
+ if ( 'hide-amp' == ( isset($ampforwp_stored_meta['ampforwp-amp-on-off'][0]) && $ampforwp_stored_meta['ampforwp-amp-on-off'][0] ) && 'page' != $post->post_type ) {
811
  if ( ! in_array($post->ID, $exclude_post_value) ) {
812
  $exclude_post_value[] = $post->ID;
813
  set_transient('ampforwp_exclude_post_transient', $exclude_post_value);
814
  }
815
  }
816
+ if ( ( 'default' == ( isset($ampforwp_stored_meta['ampforwp-amp-on-off'][0]) && $ampforwp_stored_meta['ampforwp-amp-on-off'][0] ) || !isset($ampforwp_stored_meta['ampforwp-amp-on-off'][0]) ) && 'page' != $post->post_type ) {
817
  if ( in_array($post->ID, $exclude_post_value) ) {
818
  $exclude_post_value = array_flip($exclude_post_value);
819
  unset($exclude_post_value[$post->ID] );
3090
  add_action('amp_post_template_head','ampforwp_meta_description');
3091
  function ampforwp_meta_description() {
3092
  global $redux_builder_amp;
3093
+ if ( false == ampforwp_get_setting('ampforwp-seo-meta-desc') || 'rank_math' == ampforwp_get_setting('ampforwp-seo-selection') ) {
3094
  return;
3095
  }
3096
  $desc = ampforwp_generate_meta_desc();
4905
  if($post->post_type == 'post' && !$redux_builder_amp['amp-on-off-for-all-posts'] || $post->post_type == 'page' && !$redux_builder_amp['amp-on-off-for-all-pages']) {
4906
  return;
4907
  }
4908
+ if( is_archive() && is_category() ){
4909
+ if(!ampforwp_get_setting('ampforwp-archive-support') || !ampforwp_get_setting('ampforwp-archive-support-cat') ){
4910
+ return ;
4911
+ }
4912
+ }elseif( is_archive() && is_tag() ){
4913
+ if(!ampforwp_get_setting('ampforwp-archive-support') || !ampforwp_get_setting('ampforwp-archive-support-tag') ){
4914
+ return ;
4915
+ }
4916
+ }elseif( is_archive() && is_tax()){
4917
+ $taxonomies = ampforwp_get_setting('ampforwp-custom-taxonomies');
4918
+ if(empty($taxonomies)){
4919
+ return ;
4920
+ }else{
4921
+ $term_id = get_queried_object()->term_id;
4922
+ $termObj = get_term( $term_id);
4923
+ if( in_array($termObj->taxonomy, $taxonomies)){
4924
+ }else{
4925
+ return ;
4926
+ }
4927
+ }
4928
+ }
4929
+
4930
+ if( is_archive() && is_category()){
4931
+ $term_id = get_queried_object()->term_id;
4932
+ $termObj = get_term( $term_id);
4933
+ $taxonomy_objects = get_object_taxonomies( 'post', 'objects' );
4934
+ $post_type_title = $taxonomy_objects[$termObj->taxonomy]->labels->singular_name;
4935
+ if(ampforwp_get_setting('ampforwp-archive-support') == true && ampforwp_get_setting('ampforwp-archive-support-cat') == true){
4936
+ $current_url = get_term_link($term_id);
4937
+ }
4938
+ }elseif( is_archive() && is_tag()){
4939
+ $term_id = get_queried_object()->term_id;
4940
+ $termObj = get_term( $term_id);
4941
+ $taxonomy_objects = get_object_taxonomies( 'post', 'objects' );
4942
+ $post_type_title = $taxonomy_objects[$termObj->taxonomy]->labels->singular_name;
4943
+ if(ampforwp_get_setting('ampforwp-archive-support') == true && ampforwp_get_setting('ampforwp-archive-support-tag') == true){
4944
+ $current_url = get_term_link($term_id);
4945
+ }
4946
+ }elseif(is_archive() && is_tax()){
4947
+ $term_id = get_queried_object()->term_id;
4948
+ $termObj = get_term( $term_id);
4949
+ $taxonomy_objects = get_taxonomy( $termObj->taxonomy );
4950
+ $post_type_title = $taxonomy_objects->labels->singular_name;
4951
+ $current_url = get_term_link($term_id);
4952
+ }else{
4953
+ $post_type_title = ucfirst($post->post_type);
4954
+ $current_url = get_permalink( $post->ID );
4955
+ }
4956
  $wp_admin_bar->add_node(array(
4957
  'id' => 'ampforwp-view-amp',
4958
  'title' => 'View ' . esc_html($post_type_title) . ' (AMP)' ,
4959
+ 'href' => ampforwp_url_controller( $current_url )
4960
  ));
4961
  }
4962
  }
5738
  function ampforwp_remove_ahref_lightbox(){
5739
  if(true == ampforwp_get_setting('ampforwp-amp-img-lightbox')){
5740
  add_filter( 'the_content', 'ampforwp_remove_ahref_lightbox_in_amp' );
5741
+ add_filter('tablepress_table_render_data','amforwp_remove_tp_image_href');
5742
  }
5743
  }
5744
  function ampforwp_remove_ahref_lightbox_in_amp( $content ) {
5745
  $updated_content = preg_replace("/<a[^>]+\>(<img[^>]+\>)<\/a>/i", '$1', $content);
5746
  return $updated_content;
5747
  }
5748
+ function amforwp_remove_tp_image_href( $orig_table){
5749
+ $tablepressData = array();
5750
+ $j = 0;
5751
+ foreach ($orig_table['data'] as $cols) {
5752
+ for($i=0;$i< count($cols);$i++){
5753
+ $tablepressData[$j][$i] = preg_replace("/<a[^>]+\>(<img[^>]+\>)<\/a>/i",'$1', $cols[$i]);
5754
+ }
5755
+ $j++;
5756
+ }
5757
+ $orig_table['data'] = $tablepressData;
5758
+ return $orig_table;
5759
+ }
5760
  // amp-image-lightbox #1892
5761
  if ( ! function_exists('ampforwp_amp_img_lightbox') ) {
5762
  function ampforwp_amp_img_lightbox(){
6894
  }
6895
  }
6896
  return $taxonomies;
6897
+ }
6898
+
6899
+ // Include Opengraph.php #3261
6900
+ add_action('pre_amp_render_post', 'ampforwp_include_opengraph');
6901
+ if ( ! function_exists('ampforwp_include_opengraph') ) {
6902
+ function ampforwp_include_opengraph(){
6903
+ if ( true == ampforwp_get_setting('ampforwp-seo-og-meta-tags') && '' == ampforwp_get_setting('ampforwp-seo-selection') ) {
6904
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/opengraph.php";
6905
+ }
6906
+ }
6907
+ }
6908
+
6909
+ add_filter('ampforwp_pagebuilder_status_modify','ampforwp_pagebuilder_has_content',10,2);
6910
+ function ampforwp_pagebuilder_has_content($response, $postId){
6911
+ $ampforwp_pagebuilder_enable = get_post_meta($postId,'ampforwp_page_builder_enable', true);
6912
+ if ( isset( $ampforwp_pagebuilder_enable ) && $ampforwp_pagebuilder_enable == 'yes') {
6913
+ if(empty(amppb_post_content(''))){
6914
+ $response = false;
6915
+ }
6916
+ }
6917
+ return $response;
6918
  }
templates/template-mode/admin-bar.css CHANGED
@@ -1049,3 +1049,6 @@ html:lang(he-il) .rtl #wpadminbar * {
1049
  display: none;
1050
  }
1051
  }
 
 
 
1049
  display: none;
1050
  }
1051
  }
1052
+ html{
1053
+ margin-top: 32px;
1054
+ }
templates/template-mode/template-mode.php CHANGED
@@ -466,12 +466,6 @@ Class AMPforWP_theme_mode{
466
  do_action( 'amp_post_template_css', $ampforwpTemplate );
467
  do_action( 'amp_css', $ampforwpTemplate );
468
 
469
- if( is_user_logged_in() ){
470
- $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
471
- if($pref==="true"){
472
- $css .= $this->ampforwp_get_remote_content(AMPFORWP_PLUGIN_DIR_URI."/templates/template-mode/admin-bar.css");
473
- }
474
- }
475
  $stylesheetCss = $this->ampforwp_get_remote_content($stylesheetUri);
476
  $stylesheetCss = str_replace(" img", 'amp-img', $stylesheetCss);
477
  $valuesrc = get_stylesheet_directory_uri();
@@ -486,6 +480,12 @@ Class AMPforWP_theme_mode{
486
  $css .= $stylesheetCss;
487
  $css .= ampforwp_get_setting('css_editor');
488
  $css = str_replace(array('.accordion-mod'), array('.apac'), $css);
 
 
 
 
 
 
489
  echo $this->css_sanitizer($css);
490
  echo "</style>";
491
  }
@@ -647,6 +647,12 @@ Class AMPforWP_theme_mode{
647
  return $this->ampforwp_template_mode_cnt_sanitizer($field);
648
  }
649
 
 
 
 
 
 
 
650
  /*
651
  * Admin bar
652
  */
466
  do_action( 'amp_post_template_css', $ampforwpTemplate );
467
  do_action( 'amp_css', $ampforwpTemplate );
468
 
 
 
 
 
 
 
469
  $stylesheetCss = $this->ampforwp_get_remote_content($stylesheetUri);
470
  $stylesheetCss = str_replace(" img", 'amp-img', $stylesheetCss);
471
  $valuesrc = get_stylesheet_directory_uri();
480
  $css .= $stylesheetCss;
481
  $css .= ampforwp_get_setting('css_editor');
482
  $css = str_replace(array('.accordion-mod'), array('.apac'), $css);
483
+ if( is_user_logged_in() ){
484
+ $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
485
+ if($pref==="true"){
486
+ $css .= $this->ampforwp_get_remote_content(AMPFORWP_PLUGIN_DIR_URI."/templates/template-mode/admin-bar.css");
487
+ }
488
+ }
489
  echo $this->css_sanitizer($css);
490
  echo "</style>";
491
  }
647
  return $this->ampforwp_template_mode_cnt_sanitizer($field);
648
  }
649
 
650
+ public static function content_sanitize($content){
651
+ $selfobj = new self();
652
+ $content = $selfobj->ampforwp_template_mode_cnt_sanitizer($content);
653
+ return $content;
654
+ }
655
+
656
  /*
657
  * Admin bar
658
  */