AMP for WP – Accelerated Mobile Pages - Version 1.0.77.16

Version Description

(29th July 2021) = * Improvements: Added Filter to remove last-modified header in amp #5101 * Fixed: Webp images are not converting with Webp Express plugin #5108 * Fixed: Validation error - The tag 'lite-youtube' is disallowed #5102 * Fixed: Yoast custom breadcrumbs title not working after update #5100

Download this release

Release Info

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

Code changes from version 1.0.77.15 to 1.0.77.16

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.8
7
- Stable tag: 1.0.77.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,6 +197,12 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
 
 
 
 
 
 
200
  = 1.0.77.15 (27th July 2021) =
201
  * Improvements: Added Yoast custom breadcrumbs title support #5100
202
  * Fixed: Author name only showing for the first post on homepage #5099
@@ -208,10 +214,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
208
  * Fixed: Related posts title and excerpt not appearing properly #5095
209
  * Fixed: Debug warnigs with WP Foro plugin #5094
210
 
211
- = 1.0.77.13 (16th July 2021) =
212
- * Fixed: FooGallery plugin not working with AMP #5090
213
- * Fixed: Console error when Back to Top link option is enabled #5091
214
- * Fixed: Exclude Categories is not working #5088
215
- * Fixed: Long word post title not breaking in mobile view #5092
216
-
217
  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.8
7
+ Stable tag: 1.0.77.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
197
 
198
  == Changelog ==
199
 
200
+ = 1.0.77.16 (29th July 2021) =
201
+ * Improvements: Added Filter to remove last-modified header in amp #5101
202
+ * Fixed: Webp images are not converting with Webp Express plugin #5108
203
+ * Fixed: Validation error - The tag 'lite-youtube' is disallowed #5102
204
+ * Fixed: Yoast custom breadcrumbs title not working after update #5100
205
+
206
  = 1.0.77.15 (27th July 2021) =
207
  * Improvements: Added Yoast custom breadcrumbs title support #5100
208
  * Fixed: Author name only showing for the first post on homepage #5099
214
  * Fixed: Related posts title and excerpt not appearing properly #5095
215
  * Fixed: Debug warnigs with WP Foro plugin #5094
216
 
 
 
 
 
 
 
217
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 1.0.77.15
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','1.0.77.15');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 1.0.77.16
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','1.0.77.16');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
3
  = 1.0.77.15 (27th July 2021) =
4
  * Improvements: Added Yoast custom breadcrumbs title support #5100
5
  * Fixed: Author name only showing for the first post on homepage #5099
1
  == Changelog ==
2
 
3
+ = 1.0.77.16 (29th July 2021) =
4
+ * Improvements: Added Filter to remove last-modified header in amp #5101
5
+ * Fixed: Webp images are not converting with Webp Express plugin #5108
6
+ * Fixed: Validation error - The tag 'lite-youtube' is disallowed #5102
7
+ * Fixed: Yoast custom breadcrumbs title not working after update #5100
8
+
9
  = 1.0.77.15 (27th July 2021) =
10
  * Improvements: Added Yoast custom breadcrumbs title support #5100
11
  * Fixed: Author name only showing for the first post on homepage #5099
components/breadcrumb/breadcrumb.php CHANGED
@@ -106,7 +106,7 @@ function amp_breadcrumb_output(){
106
  $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>';
107
  }
108
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
109
- if (function_exists('wpseo_premium_run_upgrade') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
110
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
111
  }else{
112
  $bc_title = get_the_title(ampforwp_get_the_ID());
@@ -151,7 +151,7 @@ function amp_breadcrumb_output(){
151
  $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($parents). '" href="'. esc_url($cat_link).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
152
  }
153
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
154
- if (function_exists('wpseo_premium_run_upgrade') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
155
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
156
  }else{
157
  $bc_title = get_the_title(ampforwp_get_the_ID());
106
  $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>';
107
  }
108
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
109
+ if (class_exists('WPSEO_Premium') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
110
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
111
  }else{
112
  $bc_title = get_the_title(ampforwp_get_the_ID());
151
  $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($parents). '" href="'. esc_url($cat_link).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
152
  }
153
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
154
+ if (class_exists('WPSEO_Premium') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
155
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
156
  }else{
157
  $bc_title = get_the_title(ampforwp_get_the_ID());
includes/features/performance/performance-functions.php CHANGED
@@ -82,6 +82,9 @@ function ampforwp_minify_html_output($content_buffer){
82
  if(preg_match('/<picture(.*?)<\/picture>/s', $content_buffer)){
83
  $content_buffer = preg_replace('/<picture(.*?)<\/picture>/s', '<noscript><picture$1</picture></noscript>', $content_buffer);
84
  }
 
 
 
85
  global $redux_builder_amp;
86
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
87
  return $content_buffer;
82
  if(preg_match('/<picture(.*?)<\/picture>/s', $content_buffer)){
83
  $content_buffer = preg_replace('/<picture(.*?)<\/picture>/s', '<noscript><picture$1</picture></noscript>', $content_buffer);
84
  }
85
+ if(class_exists('Avada') && preg_match('/<lite-youtube(.*?)videoid="(.*?)"(.*?)><\/lite-youtube>/s', $content_buffer)){
86
+ $content_buffer = preg_replace('/<lite-youtube(.*?)videoid="(.*?)"(.*?)><\/lite-youtube>/', '<amp-youtube width="480" height="270" layout="responsive" data-videoid="$2"></amp-youtube>', $content_buffer);
87
+ }
88
  global $redux_builder_amp;
89
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
90
  return $content_buffer;
includes/vendor/amp/amp.php CHANGED
@@ -94,7 +94,9 @@ if ( ! function_exists('AMPforWP\\AMPVendor\\amp_render') ) {
94
  $template = $ampforwpTemplate = new AMP_Post_Template( $post_id );
95
  $template->load();
96
  // Set Header: last modified information
97
- if( is_singular() && $post_id ) {
 
 
98
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
99
  }
100
  exit;
94
  $template = $ampforwpTemplate = new AMP_Post_Template( $post_id );
95
  $template->load();
96
  // Set Header: last modified information
97
+ $last_modified = true;
98
+ $last_modified = apply_filters('ampforwp_update_last_modified_header', $last_modified);
99
+ if( is_singular() && $post_id && $last_modified) {
100
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
101
  }
102
  exit;
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.8
7
- Stable tag: 1.0.77.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,12 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
197
  = 1.0.77.15 (27th July 2021) =
198
  * Improvements: Added Yoast custom breadcrumbs title support #5100
199
  * Fixed: Author name only showing for the first post on homepage #5099
@@ -205,10 +211,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
205
  * Fixed: Related posts title and excerpt not appearing properly #5095
206
  * Fixed: Debug warnigs with WP Foro plugin #5094
207
 
208
- = 1.0.77.13 (16th July 2021) =
209
- * Fixed: FooGallery plugin not working with AMP #5090
210
- * Fixed: Console error when Back to Top link option is enabled #5091
211
- * Fixed: Exclude Categories is not working #5088
212
- * Fixed: Long word post title not breaking in mobile view #5092
213
-
214
  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.8
7
+ Stable tag: 1.0.77.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
194
 
195
  == Changelog ==
196
 
197
+ = 1.0.77.16 (29th July 2021) =
198
+ * Improvements: Added Filter to remove last-modified header in amp #5101
199
+ * Fixed: Webp images are not converting with Webp Express plugin #5108
200
+ * Fixed: Validation error - The tag 'lite-youtube' is disallowed #5102
201
+ * Fixed: Yoast custom breadcrumbs title not working after update #5100
202
+
203
  = 1.0.77.15 (27th July 2021) =
204
  * Improvements: Added Yoast custom breadcrumbs title support #5100
205
  * Fixed: Author name only showing for the first post on homepage #5099
211
  * Fixed: Related posts title and excerpt not appearing properly #5095
212
  * Fixed: Debug warnigs with WP Foro plugin #5094
213
 
 
 
 
 
 
 
214
  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
@@ -100,7 +100,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
100
  $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>';
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
103
- if (function_exists('wpseo_premium_run_upgrade') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
104
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
105
  }else{
106
  $bc_title = get_the_title(ampforwp_get_the_ID());
@@ -146,7 +146,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
146
  $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>';
147
  }
148
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
149
- if (function_exists('wpseo_premium_run_upgrade') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
150
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
151
  }else{
152
  $bc_title = get_the_title(ampforwp_get_the_ID());
100
  $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>';
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
103
+ if (class_exists('WPSEO_Premium') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
104
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
105
  }else{
106
  $bc_title = get_the_title(ampforwp_get_the_ID());
146
  $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>';
147
  }
148
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
149
+ if (class_exists('WPSEO_Premium') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
150
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
151
  }else{
152
  $bc_title = get_the_title(ampforwp_get_the_ID());
templates/design-manager/design-2/elements/bread-crumbs.php CHANGED
@@ -100,7 +100,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
100
  $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>';
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
103
- if (function_exists('wpseo_premium_run_upgrade') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
104
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
105
  }else{
106
  $bc_title = get_the_title(ampforwp_get_the_ID());
@@ -144,7 +144,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
144
  $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>';
145
  }
146
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
147
- if (function_exists('wpseo_premium_run_upgrade') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
148
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
149
  }else{
150
  $bc_title = get_the_title(ampforwp_get_the_ID());
100
  $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>';
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
103
+ if (class_exists('WPSEO_Premium') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
104
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
105
  }else{
106
  $bc_title = get_the_title(ampforwp_get_the_ID());
144
  $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>';
145
  }
146
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
147
+ if (class_exists('WPSEO_Premium') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
148
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
149
  }else{
150
  $bc_title = get_the_title(ampforwp_get_the_ID());
templates/design-manager/design-3/elements/bread-crumbs.php CHANGED
@@ -100,7 +100,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
100
  $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>';
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
103
- if (function_exists('wpseo_premium_run_upgrade') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
104
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
105
  }else{
106
  $bc_title = get_the_title(ampforwp_get_the_ID());
@@ -143,7 +143,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
143
  $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>';
144
  }
145
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
146
- if (function_exists('wpseo_premium_run_upgrade') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
147
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
148
  }else{
149
  $bc_title = get_the_title(ampforwp_get_the_ID());
100
  $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>';
101
  }
102
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
103
+ if (class_exists('WPSEO_Premium') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
104
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
105
  }else{
106
  $bc_title = get_the_title(ampforwp_get_the_ID());
143
  $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>';
144
  }
145
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
146
+ if (class_exists('WPSEO_Premium') && !empty(WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID()))) {
147
  $bc_title = WPSEO_Meta::get_value( 'bctitle', ampforwp_get_the_ID() );
148
  }else{
149
  $bc_title = get_the_title(ampforwp_get_the_ID());
templates/features.php CHANGED
@@ -9543,8 +9543,8 @@ function ampforwp_webp_express_compatibility($content){
9543
  preg_match_all('/src="(.*?)"/', $content,$src);
9544
  if(isset($src[1][0])){
9545
  $img_url = esc_url($src[1][0]);
9546
- if(file_exists($img_url_webp) && !preg_match('/\.webp/', $img_url)){
9547
- $img_url_webp = preg_replace('/http(.*?)\/wp-content(.*?)/', 'http$1/wp-content/webp-express/webp-images/doc-root/wp-content$2', $img_url);
9548
  if(!preg_match('/\.webp/', $img_url)){
9549
  $img_url_webp = esc_url($img_url_webp).".webp";
9550
  $content = str_replace($img_url, $img_url_webp, $content);
9543
  preg_match_all('/src="(.*?)"/', $content,$src);
9544
  if(isset($src[1][0])){
9545
  $img_url = esc_url($src[1][0]);
9546
+ if(!preg_match('/\.webp/', $img_url)){
9547
+ $img_url_webp = preg_replace('/http(.*?)\/wp-content(.*?)/', 'http$1/wp-content/webp-express/webp-images$2', $img_url);
9548
  if(!preg_match('/\.webp/', $img_url)){
9549
  $img_url_webp = esc_url($img_url_webp).".webp";
9550
  $content = str_replace($img_url, $img_url_webp, $content);