AMP for WP – Accelerated Mobile Pages - Version 1.0.76

Version Description

(9th February 2021) = * Improvement: The SEO Checklist Banner #4912 * Fixed: Telegram icon not visible in menu #4919 * Fixed: Validation error in amp-img with transposh plugin #4918 * Fixed: Fatal error when FIFU plugin is activate #4920 * Fixed: AMP admin option panel is showing blank on user end #4914 * Fixed: Tag base remove in AMP not working after 1.0.60 #4908 * Fixed: data-playlist gets removed automatically in amp-brid-player #4906 * Fixed: View Non-Amp Version link does not link to proper canonical url #4901 * Fixed: Srcset not loading in category module of AMP page builder #4900 * Fixed: Debug warnings #4917

Download this release

Release Info

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

Code changes from version 1.0.75 to 1.0.76

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.6
7
- Stable tag: 1.0.75
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,18 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  = 1.0.75 (23rd January 2021) =
197
  * Fixed: Imgur embed code not working in AMP #4899
198
  * Fixed: Srcset not loading in category module of AMP page builder #4900
@@ -202,20 +214,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
202
  * Fixed: Post Pagination not working after 1.0.69 version #4902
203
  * Fixed: Debug warnings #4896
204
 
205
- = 1.0.74 (30th December 2020) =
206
- * Improvement: Added Oxygen Pagebuilder Compatibility for AMP Pagebuilder Extension #4868
207
- * Improvement: Added disable right click option on AMP for copy protection #4877
208
- * Fixed: Validation Errors when WP Daddy Builder Pro is active #4879
209
- * Fixed: The yoast meta title is not reflecting in AMP with Smartmag theme #4885
210
-
211
- = 1.0.73 (23rd December 2020) =
212
- * Fixed: Javascript issues after update to WordPress 5.6 #4867
213
- * Fixed: '-' symbol is not appearing on post title #4866
214
- * Fixed: GDPR strings are not getting translated in WPML #4874
215
- * Fixed: AMP Browser caching policy updated #4876
216
- * Fixed: Validation Errors when WP Daddy Builder Pro is active #4879
217
- * Fixed: Vuukle comments box appearing twice in AMP #4878
218
- * Fixed: Validation error when 'area' tag is added in post content #4882
219
- * Fixed: Validation error "Custom JS is not allowed" with ALL in one SEO pro #4883
220
-
221
  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.6
7
+ Stable tag: 1.0.76
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
193
 
194
  == Changelog ==
195
 
196
+ = 1.0.76 (9th February 2021) =
197
+ * Improvement: The SEO Checklist Banner #4912
198
+ * Fixed: Telegram icon not visible in menu #4919
199
+ * Fixed: Validation error in amp-img with transposh plugin #4918
200
+ * Fixed: Fatal error when FIFU plugin is activate #4920
201
+ * Fixed: AMP admin option panel is showing blank on user end #4914
202
+ * Fixed: Tag base remove in AMP not working after 1.0.60 #4908
203
+ * Fixed: data-playlist gets removed automatically in amp-brid-player #4906
204
+ * Fixed: View Non-Amp Version link does not link to proper canonical url #4901
205
+ * Fixed: Srcset not loading in category module of AMP page builder #4900
206
+ * Fixed: Debug warnings #4917
207
+
208
  = 1.0.75 (23rd January 2021) =
209
  * Fixed: Imgur embed code not working in AMP #4899
210
  * Fixed: Srcset not loading in category module of AMP page builder #4900
214
  * Fixed: Post Pagination not working after 1.0.69 version #4902
215
  * Fixed: Debug warnings #4896
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
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.75
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.75');
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.76
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.76');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
base_remover/base_remover.php CHANGED
@@ -50,7 +50,7 @@ function ampforwp_url_base_rewrite_rules(){
50
  add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
51
  add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
52
  add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
53
- add_filter( 'post_tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
54
  }elseif( $tagBaseRewrite === '0' ) {
55
  remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
56
  remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
50
  add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
51
  add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
52
  add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
53
+ add_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
54
  }elseif( $tagBaseRewrite === '0' ) {
55
  remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
56
  remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
changelog.txt CHANGED
@@ -1,5 +1,17 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.75 (23rd January 2021) =
4
  * Fixed: Imgur embed code not working in AMP #4899
5
  * Fixed: Srcset not loading in category module of AMP page builder #4900
1
  == Changelog ==
2
 
3
+ = 1.0.76 (9th February 2021) =
4
+ * Improvement: The SEO Checklist Banner #4912
5
+ * Fixed: Telegram icon not visible in menu #4919
6
+ * Fixed: Validation error in amp-img with transposh plugin #4918
7
+ * Fixed: Fatal error when FIFU plugin is activate #4920
8
+ * Fixed: AMP admin option panel is showing blank on user end #4914
9
+ * Fixed: Tag base remove in AMP not working after 1.0.60 #4908
10
+ * Fixed: data-playlist gets removed automatically in amp-brid-player #4906
11
+ * Fixed: View Non-Amp Version link does not link to proper canonical url #4901
12
+ * Fixed: Srcset not loading in category module of AMP page builder #4900
13
+ * Fixed: Debug warnings #4917
14
+
15
  = 1.0.75 (23rd January 2021) =
16
  * Fixed: Imgur embed code not working in AMP #4899
17
  * Fixed: Srcset not loading in category module of AMP page builder #4900
components/author-box/author-box.php CHANGED
@@ -106,7 +106,10 @@ if ( isset($args['show_time']) ) {
106
  $alt = array_pop($match);
107
  $alt = implode(" ", $alt);
108
  $alt = explode(" ", $alt);
109
- if (isset($alt[0])) {
 
 
 
110
  $alt = 'alt=' . $alt[0];
111
  }
112
  }
106
  $alt = array_pop($match);
107
  $alt = implode(" ", $alt);
108
  $alt = explode(" ", $alt);
109
+ if(class_exists('transposh_plugin') && isset($_GET['lang']) && isset($alt[1]) ){
110
+ $alt = 'alt=' . $alt[1];
111
+ }
112
+ elseif (isset($alt[0])) {
113
  $alt = 'alt=' . $alt[0];
114
  }
115
  }
images/the-seo-checklist-by-seo-buddy.png ADDED
Binary file
includes/options/admin-config.php CHANGED
@@ -2314,6 +2314,19 @@ function ampforwp_get_all_tags($id){
2314
  'required' => array('amp-inspection-tool', '=' , '0'),
2315
  'switch-text' => true,
2316
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
2317
  )
2318
  )
2319
  );
2314
  'required' => array('amp-inspection-tool', '=' , '0'),
2315
  'switch-text' => true,
2316
  ),
2317
+ array(
2318
+ 'id' => 'ampforwp-the-seo-checklist',
2319
+ 'type' => 'section',
2320
+ 'title' => esc_html__('The SEO Checklist - Get your website on the first page of Google', 'accelerated-mobile-pages'),
2321
+ 'indent' => true,
2322
+ 'layout_type' => 'accordion',
2323
+ 'accordion-open'=> 1,
2324
+ ),
2325
+ array(
2326
+ 'id' => 'ampforwp-the-seo-checklist-title',
2327
+ 'type' => 'select',
2328
+ 'desc' => '<div style="text-align:center;"><a href="https://seobuddy.com/seo-checklist/magazine3" target="_blank"><img src="'.AMPFORWP_IMAGE_DIR . '/the-seo-checklist-by-seo-buddy.png" width="100" height="60" /></a><br/><br/><b>RECOMMENDED:</b> We would like to recommend <a href="https://seobuddy.com/seo-checklist/magazine3" target="_blank">102-Point SEO Checklist</a>. It includes 40+ step-by-step guides (SOPs) to every important SEO action you need to take to optimize your website and get more organic traffic. And using discount coupon MAGAZINE3 you get a 25% off the original price.<br/><br/><a class="premium_features_btn" target="_blank" href="https://seobuddy.com/seo-checklist/magazine3" style="color: #000;padding: 10px 15px;cursor: pointer;text-decoration: none;" >Read more about this SEO Checklist</a></div>',
2329
+ ),
2330
  )
2331
  )
2332
  );
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -1568,4 +1568,7 @@ doc-cnt h1 , .doc-cnt p{
1568
  top: 7px;
1569
  }
1570
 
1571
- /** Discount Offer CSS Ends **/
 
 
 
1568
  top: 7px;
1569
  }
1570
 
1571
+ /** Discount Offer CSS Ends **/
1572
+ table#section-table-ampforwp-the-seo-checklist strong , table#section-table-ampforwp-the-seo-checklist th {
1573
+ display: none;
1574
+ }
includes/options/redux-core/inc/class.redux_helpers.php CHANGED
@@ -346,12 +346,13 @@ namespace ReduxCore\ReduxFramework;
346
  $r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) );
347
  $g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) );
348
  $b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) );
349
- } else {
350
- if (ctype_xdigit($hex)) {
351
  $r = hexdec( substr( $hex, 0, 2 ) );
352
  $g = hexdec( substr( $hex, 2, 2 ) );
353
  $b = hexdec( substr( $hex, 4, 2 ) );
354
  }
 
 
355
  }
356
  $rgb = $r . ',' . $g . ',' . $b;
357
 
346
  $r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) );
347
  $g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) );
348
  $b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) );
349
+ } else if (function_exists('ctype_xdigit') && ctype_xdigit($hex)) {
 
350
  $r = hexdec( substr( $hex, 0, 2 ) );
351
  $g = hexdec( substr( $hex, 2, 2 ) );
352
  $b = hexdec( substr( $hex, 4, 2 ) );
353
  }
354
+ else{
355
+ return false;
356
  }
357
  $rgb = $r . ',' . $g . ',' . $b;
358
 
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -563,6 +563,7 @@ class AMP_Allowed_Tags_Generated {
563
  'value' => '#dock-slot',
564
  ),
565
  'data-outstream' => array(
 
566
  'value_regex' => '[0-9]+',
567
  ),
568
  'data-partner' => array(
@@ -574,9 +575,11 @@ class AMP_Allowed_Tags_Generated {
574
  'value_regex' => '[0-9]+',
575
  ),
576
  'data-playlist' => array(
 
577
  'value_regex' => '[0-9]+',
578
  ),
579
  'data-video' => array(
 
580
  'value_regex' => '[0-9]+',
581
  ),
582
  'media' => array(),
563
  'value' => '#dock-slot',
564
  ),
565
  'data-outstream' => array(
566
+ 'mandatory' => true,
567
  'value_regex' => '[0-9]+',
568
  ),
569
  'data-partner' => array(
575
  'value_regex' => '[0-9]+',
576
  ),
577
  'data-playlist' => array(
578
+ 'mandatory' => true,
579
  'value_regex' => '[0-9]+',
580
  ),
581
  'data-video' => array(
582
+ 'mandatory' => true,
583
  'value_regex' => '[0-9]+',
584
  ),
585
  'media' => array(),
pagebuilder/modules/contents-module.php CHANGED
@@ -367,7 +367,7 @@ if ( is_admin() ) {
367
 
368
  <div class="cml">
369
  <a href="{{ampforwp_post_url}}">
370
- {{if_image}}<amp-img class="ampforwp_wc_shortcode_img" src="{{image}}" width="{{width}}" height="{{height}}" srcset="{{image}}" layout="responsive" alt="{{image_alt}}"> </amp-img>{{ifend_image}}</a>
371
  </div>
372
  <div class="cmr">
373
  <a href="{{ampforwp_post_url}}">{{title}}</a>
@@ -399,11 +399,12 @@ if ( is_admin() ) {
399
  }else{
400
  $ampforwp_post_url = user_trailingslashit($ampforwp_post_url) . AMPFORWP_AMP_QUERY_VAR;
401
  }
402
- $image = $height = $width = $image_alt = "";
403
  if ( has_post_thumbnail() ) {
404
  $thumb_id = get_post_thumbnail_id();
405
  $image_alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true);
406
- $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'full', true);
 
407
  $image = $thumb_url_array[0];
408
  $width = $thumb_url_array[1];
409
  $height = $thumb_url_array[2];
@@ -496,6 +497,7 @@ if ( is_admin() ) {
496
  $rawhtml = str_replace(array(
497
  "{{ampforwp_post_url}}",
498
  "{{image}}",
 
499
  "{{width}}",
500
  "{{height}}",
501
  "{{title}}",
@@ -510,6 +512,7 @@ if ( is_admin() ) {
510
  array(
511
  $ampforwp_post_url,
512
  $image,
 
513
  $width,
514
  $height,
515
  $title,
@@ -524,6 +527,7 @@ if ( is_admin() ) {
524
  $loopHtml);
525
  $rawhtml = ampforwp_replaceIfContentConditional("ampforwp_post_url", $ampforwp_post_url, $rawhtml);
526
  $rawhtml = ampforwp_replaceIfContentConditional("image", $image, $rawhtml);
 
527
  $rawhtml = ampforwp_replaceIfContentConditional("width", $width, $rawhtml);
528
  $rawhtml = ampforwp_replaceIfContentConditional("height", $height, $rawhtml);
529
  $rawhtml = ampforwp_replaceIfContentConditional("title", $title, $rawhtml);
367
 
368
  <div class="cml">
369
  <a href="{{ampforwp_post_url}}">
370
+ {{if_image}}<amp-img class="ampforwp_wc_shortcode_img" src="{{image}}" width="{{width}}" height="{{height}}" srcset="{{image_srcset}}" layout="responsive" alt="{{image_alt}}"> </amp-img>{{ifend_image}}</a>
371
  </div>
372
  <div class="cmr">
373
  <a href="{{ampforwp_post_url}}">{{title}}</a>
399
  }else{
400
  $ampforwp_post_url = user_trailingslashit($ampforwp_post_url) . AMPFORWP_AMP_QUERY_VAR;
401
  }
402
+ $image = $height = $width = $image_alt = $image_srcset = "";
403
  if ( has_post_thumbnail() ) {
404
  $thumb_id = get_post_thumbnail_id();
405
  $image_alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true);
406
+ $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'full', true);
407
+ $image_srcset = wp_get_attachment_image_srcset( $thumb_id, 'full');
408
  $image = $thumb_url_array[0];
409
  $width = $thumb_url_array[1];
410
  $height = $thumb_url_array[2];
497
  $rawhtml = str_replace(array(
498
  "{{ampforwp_post_url}}",
499
  "{{image}}",
500
+ "{{image_srcset}}",
501
  "{{width}}",
502
  "{{height}}",
503
  "{{title}}",
512
  array(
513
  $ampforwp_post_url,
514
  $image,
515
+ $image_srcset,
516
  $width,
517
  $height,
518
  $title,
527
  $loopHtml);
528
  $rawhtml = ampforwp_replaceIfContentConditional("ampforwp_post_url", $ampforwp_post_url, $rawhtml);
529
  $rawhtml = ampforwp_replaceIfContentConditional("image", $image, $rawhtml);
530
+ $rawhtml = ampforwp_replaceIfContentConditional("image_srcset", $image_srcset, $rawhtml);
531
  $rawhtml = ampforwp_replaceIfContentConditional("width", $width, $rawhtml);
532
  $rawhtml = ampforwp_replaceIfContentConditional("height", $height, $rawhtml);
533
  $rawhtml = ampforwp_replaceIfContentConditional("title", $title, $rawhtml);
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.6
7
- Stable tag: 1.0.75
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,18 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  = 1.0.75 (23rd January 2021) =
194
  * Fixed: Imgur embed code not working in AMP #4899
195
  * Fixed: Srcset not loading in category module of AMP page builder #4900
@@ -199,30 +211,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
199
  * Fixed: Post Pagination not working after 1.0.69 version #4902
200
  * Fixed: Debug warnings #4896
201
 
202
- = 1.0.74 (30th December 2020) =
203
- * Improvement: Added Oxygen Pagebuilder Compatibility for AMP Pagebuilder Extension #4868
204
- * Improvement: Added disable right click option on AMP for copy protection #4877
205
- * Fixed: Validation Errors when WP Daddy Builder Pro is active #4879
206
- * Fixed: The yoast meta title is not reflecting in AMP with Smartmag theme #4885
207
-
208
- = 1.0.73 (23rd December 2020) =
209
- * Fixed: Javascript issues after update to WordPress 5.6 #4867
210
- * Fixed: '-' symbol is not appearing on post title #4866
211
- * Fixed: GDPR strings are not getting translated in WPML #4874
212
- * Fixed: AMP Browser caching policy updated #4876
213
- * Fixed: Validation Errors when WP Daddy Builder Pro is active #4879
214
- * Fixed: Vuukle comments box appearing twice in AMP #4878
215
- * Fixed: Validation error when 'area' tag is added in post content #4882
216
- * Fixed: Validation error "Custom JS is not allowed" with ALL in one SEO pro #4883
217
-
218
- = 1.0.72 (17th December 2020) =
219
- * Improvement: Added i2Pros and cons plugin compatibility #4837
220
- * Improvement: Added WP-PageNavi plugin compatibility #4831
221
- * Improvement: Added Categories Images plugin compatibility #3973
222
- * Improvement: Added webp images on the homepage and Archives with Imagify plugin #4725
223
- * Improvement: Added Recipe Compatibility for AMP Extension #4868
224
- * Fixed: Amp option panel breaks when AECC Global Theme is activated. #4863
225
- * Fixed: Facebook page embed fails #4871
226
- * Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873
227
-
228
  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.6
7
+ Stable tag: 1.0.76
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
190
 
191
  == Changelog ==
192
 
193
+ = 1.0.76 (9th February 2021) =
194
+ * Improvement: The SEO Checklist Banner #4912
195
+ * Fixed: Telegram icon not visible in menu #4919
196
+ * Fixed: Validation error in amp-img with transposh plugin #4918
197
+ * Fixed: Fatal error when FIFU plugin is activate #4920
198
+ * Fixed: AMP admin option panel is showing blank on user end #4914
199
+ * Fixed: Tag base remove in AMP not working after 1.0.60 #4908
200
+ * Fixed: data-playlist gets removed automatically in amp-brid-player #4906
201
+ * Fixed: View Non-Amp Version link does not link to proper canonical url #4901
202
+ * Fixed: Srcset not loading in category module of AMP page builder #4900
203
+ * Fixed: Debug warnings #4917
204
+
205
  = 1.0.75 (23rd January 2021) =
206
  * Fixed: Imgur embed code not working in AMP #4899
207
  * Fixed: Srcset not loading in category module of AMP page builder #4900
211
  * Fixed: Post Pagination not working after 1.0.69 version #4902
212
  * Fixed: Debug warnings #4896
213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-3/elements/related-posts.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  }
5
  global $post, $redux_builder_amp;
6
  do_action('ampforwp_above_related_post',$this); //Above Related Posts
7
- $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts'];
8
  $int_number_of_related_posts = (int)$string_number_of_related_posts;
9
 
10
  // declaring this variable here to prevent debug errors
@@ -39,7 +39,7 @@ if( $current_post_type = get_post_type( $post )) {
39
  }
40
  }//end of block for custom Post types
41
 
42
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
43
  $categories = get_the_category($post->ID);
44
  if ($categories) {
45
  $category_ids = array();
@@ -64,7 +64,7 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
64
  }
65
  } //end of block for categories
66
  //code block for tags
67
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
68
  $ampforwp_tags = get_the_tags($post->ID);
69
  if ($ampforwp_tags) {
70
  $tag_ids = array();
4
  }
5
  global $post, $redux_builder_amp;
6
  do_action('ampforwp_above_related_post',$this); //Above Related Posts
7
+ $string_number_of_related_posts = ampforwp_get_setting('ampforwp-number-of-related-posts');
8
  $int_number_of_related_posts = (int)$string_number_of_related_posts;
9
 
10
  // declaring this variable here to prevent debug errors
39
  }
40
  }//end of block for custom Post types
41
 
42
+ if(ampforwp_get_setting('ampforwp-single-select-type-of-related')==2){
43
  $categories = get_the_category($post->ID);
44
  if ($categories) {
45
  $category_ids = array();
64
  }
65
  } //end of block for categories
66
  //code block for tags
67
+ if(ampforwp_get_setting('ampforwp-single-select-type-of-related')==1) {
68
  $ampforwp_tags = get_the_tags($post->ID);
69
  if ($ampforwp_tags) {
70
  $tag_ids = array();
templates/design-manager/design-3/style.php CHANGED
@@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) {
8
  global $redux_builder_amp;
9
  global $post;
10
  $post_id = '';
11
- $post_id = $post->ID;
12
  $get_customizer = new AMP_Post_Template( $post_id );
13
  // Get content width
14
  $colorscheme = ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color');
8
  global $redux_builder_amp;
9
  global $post;
10
  $post_id = '';
11
+ $post_id = ampforwp_get_the_ID();
12
  $get_customizer = new AMP_Post_Template( $post_id );
13
  // Get content width
14
  $colorscheme = ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color');
templates/design-manager/swift/header.php CHANGED
@@ -95,7 +95,7 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
95
  <?php } ?>
96
  <?php if(ampforwp_get_setting('enbl-telegram')){?>
97
  <li>
98
- <a title="telegram" class="s_telegram" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="<?php echo esc_url(ampforwp_get_setting('enbl-telegram-prfl-url')); ?>"><amp-img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIi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ODUxIDEwLjE4NSwtOS4xODZjMC4xMDgsLTAuMDk4IDAuMTIzLC0wLjI2MiAwLjAzMywtMC4zNzdjLTAuMDg5LC0wLjExNSAtMC4yNTMsLTAuMTQyIC0wLjM3NiwtMC4wNjRjLTQuMjg2LDIuNzM3IC0xMS44OTQsNy41OTYgLTExLjg5NCw3LjU5NloiLz48L3N2Zz4="height="16" width="16"></amp-img></a>
99
  </li>
100
  <?php } ?>
101
  </ul>
@@ -234,7 +234,7 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
234
  <?php } ?>
235
  <?php if(ampforwp_get_setting('enbl-telegram')){?>
236
  <li>
237
- <a title="telegram" class="s_telegram" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="<?php echo esc_url(ampforwp_get_setting('enbl-telegram-prfl-url')); ?>"><amp-img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM6c2VyaWY9Imh0dHA6Ly93d3cuc2VyaWYuY29tLyIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxOyI+PHBhdGggaWQ9InRlbGVncmFtLTEiIGQ9Ik0x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360
  <?php } ?>
361
  <?php if(ampforwp_get_setting('enbl-telegram')){?>
362
  <li>
363
- <a title="telegram" class="s_telegram" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="<?php echo esc_url(ampforwp_get_setting('enbl-telegram-prfl-url')); ?>"><amp-img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM6c2VyaWY9Imh0dHA6Ly93d3cuc2VyaWYuY29tLyIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxOyI+PHBhdGggaWQ9InRlbGVncmFtLTEiIGQ9Ik0xOC4zODQsMjIuNzc5YzAuMzIyLDAuMjI4IDAuNzM3LDAuMjg1IDEuMTA3LDAuMTQ1YzAuMzcsLTAuMTQxIDAuNjQyLC0wLjQ1NyAwLjcyNCwtMC44NGMwLjg2OSwtNC4wODQgMi45NzcsLTE0LjQyMSAzLjc2OCwtMTguMTM2YzAuMDYsLTAuMjggLTAuMDQsLTAuNTcxIC0wLjI2LC0wLjc1OGMtMC4yMiwtMC4xODcgLTAuNTI1LC0wLjI0MSAtMC43OTcsLTAuMTRjLTQuMTkzLDEuNTUyIC0xNy4xMDYsNi4zOTcgLTIyLjM4NCw4LjM1Yy0wLjMzNSwwLjEyNCAtMC41NTMsMC40NDYgLTAuNTQyLDAuNzk5YzAuMDEyLDAuMzU0IDAuMjUsMC42NjEgMC41OTMsMC43NjRjMi4zNjcsMC43MDggNS40NzQsMS42OTMgNS40NzQsMS42OTNjMCwwIDEuNDUyLDQuMzg1IDIuMjA5LDYuNjE1YzAuMDk1LDAuMjggMC4zMTQsMC41IDAuNjAzLDAuNTc2YzAuMjg4LDAuMDc1IDAuNTk2LC0wLjAwNCAwLjgxMSwtMC4yMDdjMS4yMTYsLTEuMTQ4IDMuMDk2LC0yLjkyMyAzLjA5NiwtMi45MjNjMCwwIDMuNTcyLDIuNjE5IDUuNTk4LDQuMDYyWm0tMTEuMDEsLTguNjc3bDEuNjc5LDUuNTM4bDAuMzczLC0zLjUwN2MwLDAgNi40ODcsLTUuODUxIDEwLjE4NSwtOS4xODZjMC4xMDgsLTAuMDk4IDAuMTIzLC0wLjI2MiAwLjAzMywtMC4zNzdjLTAuMDg5LC0wLjExNSAtMC4yNTMsLTAuMTQyIC0wLjM3NiwtMC4wNjRjLTQuMjg2LDIuNzM3IC0xMS44OTQsNy41OTYgLTExLjg5NCw3LjU5NloiLz48L3N2Zz4=" width="16" height="16"></amp-img></a>
364
  </li>
365
  <?php } ?>
366
  </ul>
95
  <?php } ?>
96
  <?php if(ampforwp_get_setting('enbl-telegram')){?>
97
  <li>
98
+ <a title="telegram" class="s_telegram" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="<?php echo esc_url(ampforwp_get_setting('enbl-telegram-prfl-url')); ?>"></a>
99
  </li>
100
  <?php } ?>
101
  </ul>
234
  <?php } ?>
235
  <?php if(ampforwp_get_setting('enbl-telegram')){?>
236
  <li>
237
+ <a title="telegram" class="s_telegram" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="<?php echo esc_url(ampforwp_get_setting('enbl-telegram-prfl-url')); ?>"></a>
238
  </li>
239
  <?php } ?>
240
  </ul>
360
  <?php } ?>
361
  <?php if(ampforwp_get_setting('enbl-telegram')){?>
362
  <li>
363
+ <a title="telegram" class="s_telegram" target="_blank" <?php ampforwp_rel_attributes_social_links(); ?> href="<?php echo esc_url(ampforwp_get_setting('enbl-telegram-prfl-url')); ?>"></a>
364
  </li>
365
  <?php } ?>
366
  </ul>
templates/design-manager/swift/style.php CHANGED
@@ -2354,10 +2354,8 @@ if(ampforwp_get_setting('ampforwp-gallery-design-type')==3){?>
2354
  font-size: 16px;
2355
  }
2356
  <?php } ?>
2357
- .m-s-i li a.s_telegram{
2358
- background: #d0d0d0;
2359
- padding: 0px 2px;
2360
- border-radius: 2px;
2361
  }
2362
  .cntn-wrp h1, .cntn-wrp h2, .cntn-wrp h3, .cntn-wrp h4, .cntn-wrp h5, h6{margin-bottom:5px;}
2363
  <?php // H1 - H6 Font Sizes
2354
  font-size: 16px;
2355
  }
2356
  <?php } ?>
2357
+ .m-s-i li a.s_telegram:after {
2358
+ content: "\e93f";
 
 
2359
  }
2360
  .cntn-wrp h1, .cntn-wrp h2, .cntn-wrp h3, .cntn-wrp h4, .cntn-wrp h5, h6{margin-bottom:5px;}
2361
  <?php // H1 - H6 Font Sizes
templates/features.php CHANGED
@@ -3869,7 +3869,7 @@ function ampforwp_view_nonamp(){
3869
  if( true == ampforwp_get_setting('ampforwp-nofollow-view-nonamp') ){
3870
  $nofollow = 'rel=nofollow';
3871
  }
3872
- $amp_url = untrailingslashit( home_url( $wp->request ) );
3873
  $amp_url = explode('/', $amp_url);
3874
  $amp_url = array_flip($amp_url);
3875
  unset($amp_url['amp']);
@@ -8394,7 +8394,9 @@ function ampforwp_include_required_scripts($content){
8394
  }
8395
  }
8396
  }
8397
-
 
 
8398
  $comp_dom = new DOMDocument();
8399
  @$comp_dom->loadHTML($content);
8400
  $xpath = new DOMXPath( $comp_dom );
@@ -9051,7 +9053,7 @@ function ampforwp_yoast_home_robots($string) {
9051
  return $string;
9052
  }
9053
  //Fallback added
9054
- if( !function_exists( 'fifu_amp_url' ) ) {
9055
  function fifu_amp_url($url, $width, $height) {
9056
  $size = get_post_meta(ampforwp_get_the_ID(), 'fifu_image_dimension');
9057
  if (!empty($size)) {
3869
  if( true == ampforwp_get_setting('ampforwp-nofollow-view-nonamp') ){
3870
  $nofollow = 'rel=nofollow';
3871
  }
3872
+ $amp_url = ampforwp_amphtml_generator();
3873
  $amp_url = explode('/', $amp_url);
3874
  $amp_url = array_flip($amp_url);
3875
  unset($amp_url['amp']);
8394
  }
8395
  }
8396
  }
8397
+ if (empty($content)) {
8398
+ return '';
8399
+ }
8400
  $comp_dom = new DOMDocument();
8401
  @$comp_dom->loadHTML($content);
8402
  $xpath = new DOMXPath( $comp_dom );
9053
  return $string;
9054
  }
9055
  //Fallback added
9056
+ if( function_exists('fifu_activate') && !function_exists( 'fifu_amp_url' ) ) {
9057
  function fifu_amp_url($url, $width, $height) {
9058
  $size = get_post_meta(ampforwp_get_the_ID(), 'fifu_image_dimension');
9059
  if (!empty($size)) {