AMP for WP – Accelerated Mobile Pages - Version 1.0.46

Version Description

(4th May 2020) = * Fixed: Few issues fixed with latest version of yoast plugin #4430 * Fixed: Text not displaying in One signal notification #4413 * Fixed: Wrong amphtml in ?amp endpoint in category pages #4393 * Fixed: Open graph tags not loading from the SEO framework #4399 * Fixed: Blank class in archives loop and loop on homepage #4390 * Fixed: Pagination of category module going to top of the page #4401 * Fixed: Fatal error in customizer in trucking theme #4391 * Fixed: Auto Add AMP in Menu option not working in subdomain #4423 * Fixed: Showing entities instead of UTF-8 in footer json #4395 * Fixed: Ninja Tables plugin css was hiding due to class drawer #4428 * Fixed: AMP Option panel improvements #4408

Download this release

Release Info

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

Code changes from version 1.0.45 to 1.0.46

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.4
7
- Stable tag: 1.0.45
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  = 1.0.45 (30th April 2020) =
198
  * Fixed: Updated the code as per yoast latest version to fixed the canonical, title separator, meta tag errors #4415
199
  * Fixed: Content links unclickable with GDPR #4392
@@ -201,16 +214,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
201
  = 1.0.44 (29th April 2020) =
202
  * Fixed: Multiple issues created after the latest update of Yoast (14.0 and above) #4412
203
 
204
- = 1.0.43 (28th April 2020) =
205
- * Improvement: Added option to hide category description #4388
206
- * Improvement: Added option to remove Google index on paginated pages #4372
207
- * Improvement: Added Filter for amp-carousel #4374
208
- * Improvement: Code improvements in Related posts and Facebook instance article #4300 #4386
209
- * Fixed: Fatal error with the latest update of yoast 14.0 #4412
210
- * Fixed: AMP Lightbox is not working #4378
211
- * Fixed: White spacing in the responsive mode on left side #4375
212
- * Fixed: Video docking is not working in AMP. #4352
213
- * Fixed: Shortcodes displaying in meta descrption #4385
214
- * Fixed: Debug Warnings: count(): Parameter must be an array or an object that implements Countable. #4387
215
-
216
  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.4
7
+ Stable tag: 1.0.46
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.46 (4th May 2020) =
198
+ * Fixed: Few issues fixed with latest version of yoast plugin #4430
199
+ * Fixed: Text not displaying in One signal notification #4413
200
+ * Fixed: Wrong amphtml in ?amp endpoint in category pages #4393
201
+ * Fixed: Open graph tags not loading from the SEO framework #4399
202
+ * Fixed: Blank class in archives loop and loop on homepage #4390
203
+ * Fixed: Pagination of category module going to top of the page #4401
204
+ * Fixed: Fatal error in customizer in trucking theme #4391
205
+ * Fixed: Auto Add AMP in Menu option not working in subdomain #4423
206
+ * Fixed: Showing entities instead of UTF-8 in footer json #4395
207
+ * Fixed: Ninja Tables plugin css was hiding due to class drawer #4428
208
+ * Fixed: AMP Option panel improvements #4408
209
+
210
  = 1.0.45 (30th April 2020) =
211
  * Fixed: Updated the code as per yoast latest version to fixed the canonical, title separator, meta tag errors #4415
212
  * Fixed: Content links unclickable with GDPR #4392
214
  = 1.0.44 (29th April 2020) =
215
  * Fixed: Multiple issues created after the latest update of Yoast (14.0 and above) #4412
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.45
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.45');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
@@ -1086,7 +1086,7 @@ if( !function_exists( 'is_search_enabled_in_ampforwp' ) ) {
1086
  // Fallback for Redux class #2377
1087
  add_action('after_setup_theme', 'ampforwp_redux_class' );
1088
  function ampforwp_redux_class(){
1089
- if ( !class_exists('Redux') && class_exists('ReduxCore\\ReduxFramework\\Redux') && !class_exists('QuadMenu') ) {
1090
  class Redux extends ReduxCore\ReduxFramework\Redux
1091
  {
1092
  # Do nothing, it will inherit all the methods
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.46
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.46');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
1086
  // Fallback for Redux class #2377
1087
  add_action('after_setup_theme', 'ampforwp_redux_class' );
1088
  function ampforwp_redux_class(){
1089
+ if ( !class_exists('Redux') && class_exists('ReduxCore\\ReduxFramework\\Redux') && !class_exists('QuadMenu') && !function_exists('volcanno_plugins_loaded')) {
1090
  class Redux extends ReduxCore\ReduxFramework\Redux
1091
  {
1092
  # Do nothing, it will inherit all the methods
changelog.txt CHANGED
@@ -1,5 +1,18 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.45 (30th April 2020) =
4
  * Fixed: Updated the code as per yoast latest version to fixed the canonical, title separator, meta tag errors #4415
5
  * Fixed: Content links unclickable with GDPR #4392
1
  == Changelog ==
2
 
3
+ = 1.0.46 (4th May 2020) =
4
+ * Fixed: Few issues fixed with latest version of yoast plugin #4430
5
+ * Fixed: Text not displaying in One signal notification #4413
6
+ * Fixed: Wrong amphtml in ?amp endpoint in category pages #4393
7
+ * Fixed: Open graph tags not loading from the SEO framework #4399
8
+ * Fixed: Blank class in archives loop and loop on homepage #4390
9
+ * Fixed: Pagination of category module going to top of the page #4401
10
+ * Fixed: Fatal error in customizer in trucking theme #4391
11
+ * Fixed: Auto Add AMP in Menu option not working in subdomain #4423
12
+ * Fixed: Showing entities instead of UTF-8 in footer json #4395
13
+ * Fixed: Ninja Tables plugin css was hiding due to class drawer #4428
14
+ * Fixed: AMP Option panel improvements #4408
15
+
16
  = 1.0.45 (30th April 2020) =
17
  * Fixed: Updated the code as per yoast latest version to fixed the canonical, title separator, meta tag errors #4415
18
  * Fixed: Content links unclickable with GDPR #4392
components/loop/loop.php CHANGED
@@ -392,6 +392,11 @@ function amp_loop_excerpt($excerpt_length = 15,$tag = 'p', $class = ''){
392
  //excerpt
393
  global $post,$redux_builder_amp;
394
  $excerpt_length = (int) $excerpt_length;
 
 
 
 
 
395
  if( has_excerpt() ) {
396
  $content = get_the_excerpt();
397
  } else {
@@ -406,7 +411,7 @@ function amp_loop_excerpt($excerpt_length = 15,$tag = 'p', $class = ''){
406
  }
407
 
408
  if( ampforwp_get_setting('ampforwp-homepage-loop-readmore-link') == 1 ) {
409
- echo ('<'.esc_attr($tag).' class="'.$class.'">'. wp_trim_words( $content, $excerpt_length ) .' '.'<a href="'. ampforwp_url_controller(get_permalink($post->ID)) . '">'. ampforwp_translation($redux_builder_amp['amp-translator-read-more'],'Read More') . '</a></'.esc_attr($tag).'>');
410
  } else {
411
  echo ('<'.esc_attr($tag).' class="'.esc_attr($class).'">'. wp_trim_words( $content, $excerpt_length ) .'</'.esc_attr($tag).'>');
412
  }
392
  //excerpt
393
  global $post,$redux_builder_amp;
394
  $excerpt_length = (int) $excerpt_length;
395
+
396
+ if ( empty( $class )) {
397
+ $class = 'loop-excerpt';
398
+ }
399
+
400
  if( has_excerpt() ) {
401
  $content = get_the_excerpt();
402
  } else {
411
  }
412
 
413
  if( ampforwp_get_setting('ampforwp-homepage-loop-readmore-link') == 1 ) {
414
+ echo ('<'.esc_attr($tag).' class="'.esc_attr($class).'">'. wp_trim_words( $content, $excerpt_length ) .' '.'<a href="'. ampforwp_url_controller(get_permalink($post->ID)) . '">'. ampforwp_translation($redux_builder_amp['amp-translator-read-more'],'Read More') . '</a></'.esc_attr($tag).'>');
415
  } else {
416
  echo ('<'.esc_attr($tag).' class="'.esc_attr($class).'">'. wp_trim_words( $content, $excerpt_length ) .'</'.esc_attr($tag).'>');
417
  }
includes/admin-style.css CHANGED
@@ -1519,7 +1519,7 @@ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"
1519
  transform: translateZ(0);
1520
  visibility: hidden;
1521
  }
1522
- .drawer {
1523
  max-width: 375px;
1524
  box-shadow: 0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);
1525
  width: 75%;
@@ -2027,7 +2027,7 @@ div#section-ampforwp-ux-section::after,div#section-ampforwp-ux-section-right::af
2027
  .s-f-pg {
2028
  margin-left: 10px;
2029
  }
2030
- .drawer {
2031
  width:86%;
2032
  }
2033
 
1519
  transform: translateZ(0);
1520
  visibility: hidden;
1521
  }
1522
+ .amp-ux-main-section .drawer {
1523
  max-width: 375px;
1524
  box-shadow: 0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);
1525
  width: 75%;
2027
  .s-f-pg {
2028
  margin-left: 10px;
2029
  }
2030
+ .amp-ux-main-section .drawer {
2031
  width:86%;
2032
  }
2033
 
includes/features/push-notification/push-notification-functions.php CHANGED
@@ -118,13 +118,13 @@ if( ! function_exists('ampforwp_onesignal_notifications_widget') ){
118
  layout="fixed"
119
  src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Vic2NyaWJlLWljb24iIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMS44NCAxOS44ODdIMS4yMnMtLjk0Ny0uMDk0LS45NDctLjk5NWMwLS45LjgwNi0uOTQ4LjgwNi0uOTQ4czMuMTctMS41MTcgMy4xNy0yLjYwOGMwLTEuMDktLjUyLTEuODUtLjUyLTYuMzA1czIuODUtNy44NyA2LjI2LTcuODdjMCAwIC40NzMtMS4xMzQgMS44NS0xLjEzNCAxLjMyNSAwIDEuOCAxLjEzNyAxLjggMS4xMzcgMy40MTMgMCA2LjI2IDMuNDE4IDYuMjYgNy44NyAwIDQuNDYtLjQ3NyA1LjIyLS40NzcgNi4zMSAwIDEuMDkgMy4xNzYgMi42MDcgMy4xNzYgMi42MDdzLjgxLjA0Ni44MS45NDdjMCAuODUzLS45OTYuOTk1LS45OTYuOTk1SDExLjg0ek04IDIwLjk3N2g3LjExcy0uNDkgMi45ODctMy41MyAyLjk4N1M4IDIwLjk3OCA4IDIwLjk3OHoiIGZpbGw9IiNGRkYiLz48L3N2Zz4=">
120
  </amp-img>
121
- <?php echo ampforwp_translation( $redux_builder_amp['ampforwp-onesignal-translator-subscribe'], 'Subscribe to updates' ); ?>
122
  </button>
123
  </amp-web-push-widget>
124
  <!-- An unsubscription widget -->
125
  <amp-web-push-widget visibility="subscribed" layout="fixed" width="230" height="45">
126
  <button class="unsubscribe" on="tap:amp-web-push.unsubscribe">
127
- <?php echo ampforwp_translation( $redux_builder_amp['ampforwp-onesignal-translator-unsubscribe'], 'Unsubscribe from updates' ); ?>
128
  </button>
129
  </amp-web-push-widget>
130
  </div>
118
  layout="fixed"
119
  src="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Vic2NyaWJlLWljb24iIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMS44NCAxOS44ODdIMS4yMnMtLjk0Ny0uMDk0LS45NDctLjk5NWMwLS45LjgwNi0uOTQ4LjgwNi0uOTQ4czMuMTctMS41MTcgMy4xNy0yLjYwOGMwLTEuMDktLjUyLTEuODUtLjUyLTYuMzA1czIuODUtNy44NyA2LjI2LTcuODdjMCAwIC40NzMtMS4xMzQgMS44NS0xLjEzNCAxLjMyNSAwIDEuOCAxLjEzNyAxLjggMS4xMzcgMy40MTMgMCA2LjI2IDMuNDE4IDYuMjYgNy44NyAwIDQuNDYtLjQ3NyA1LjIyLS40NzcgNi4zMSAwIDEuMDkgMy4xNzYgMi42MDcgMy4xNzYgMi42MDdzLjgxLjA0Ni44MS45NDdjMCAuODUzLS45OTYuOTk1LS45OTYuOTk1SDExLjg0ek04IDIwLjk3N2g3LjExcy0uNDkgMi45ODctMy41MyAyLjk4N1M4IDIwLjk3OCA4IDIwLjk3OHoiIGZpbGw9IiNGRkYiLz48L3N2Zz4=">
120
  </amp-img>
121
+ <?php echo ampforwp_translation( ampforwp_get_setting('ampforwp-onesignal-translator-subscribe'), 'Subscribe to updates' ); ?>
122
  </button>
123
  </amp-web-push-widget>
124
  <!-- An unsubscription widget -->
125
  <amp-web-push-widget visibility="subscribed" layout="fixed" width="230" height="45">
126
  <button class="unsubscribe" on="tap:amp-web-push.unsubscribe">
127
+ <?php echo ampforwp_translation( ampforwp_get_setting('ampforwp-onesignal-translator-unsubscribe'), 'Unsubscribe from updates' ); ?>
128
  </button>
129
  </amp-web-push-widget>
130
  </div>
includes/features/structure-data/structured-data-functions.php CHANGED
@@ -449,7 +449,7 @@ function ampforwp_sd_sitenavigation(){
449
  if($navObj){
450
  $input['@context'] = 'https://schema.org';
451
  $input['@graph'] = $navObj; ?>
452
- <script type="application/ld+json"><?php echo wp_json_encode( $input ); ?></script>
453
  <?php }
454
  }
455
  }
449
  if($navObj){
450
  $input['@context'] = 'https://schema.org';
451
  $input['@graph'] = $navObj; ?>
452
+ <script type="application/ld+json"><?php echo wp_json_encode( $input, JSON_UNESCAPED_UNICODE ); ?></script>
453
  <?php }
454
  }
455
  }
includes/options/admin-config.php CHANGED
@@ -3639,6 +3639,7 @@ Redux::setSection( $opt_name, array(
3639
  'type' => 'raw',
3640
  'subtitle' => '<a class="amp-layouts-desc" href="https://ampforwp.com/amp-layouts/" target="_blank">What is Layouts?</a>',
3641
  'title' => esc_html__('AMP Layouts', 'accelerated-mobile-pages'),
 
3642
  'full_width'=>true,
3643
  'class' =>(!is_plugin_active('amp-layouts/amp-layouts.php')? '': 'hide'),//,
3644
  'markdown'=> true,
@@ -3652,6 +3653,7 @@ Redux::setSection( $opt_name, array(
3652
  'id' => 'info_theme_framework',
3653
  'type' => 'info',
3654
  'style' => 'success',
 
3655
  'desc' => $amptfad
3656
  ),
3657
  )
3639
  'type' => 'raw',
3640
  'subtitle' => '<a class="amp-layouts-desc" href="https://ampforwp.com/amp-layouts/" target="_blank">What is Layouts?</a>',
3641
  'title' => esc_html__('AMP Layouts', 'accelerated-mobile-pages'),
3642
+ 'required' => array('amp-design-selector', '=' , '4'),
3643
  'full_width'=>true,
3644
  'class' =>(!is_plugin_active('amp-layouts/amp-layouts.php')? '': 'hide'),//,
3645
  'markdown'=> true,
3653
  'id' => 'info_theme_framework',
3654
  'type' => 'info',
3655
  'style' => 'success',
3656
+ 'required' => array('amp-design-selector', '!=' , 'amp-theme-framework-master'),
3657
  'desc' => $amptfad
3658
  ),
3659
  )
includes/vendor/amp/includes/amp-post-template-actions.php CHANGED
@@ -5,7 +5,6 @@ if ( ! defined( 'ABSPATH' ) ) {
5
  }
6
  // Callbacks for adding content to an AMP template
7
 
8
- add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_title' );
9
  function amp_post_template_add_title( $amp_template ) {
10
  ?>
11
  <title><?php echo esc_html( $amp_template->get( 'document_title' ) ); ?></title>
@@ -18,6 +17,7 @@ if( (class_exists('Yoast\\WP\\SEO\\Integrations\\Front_End_Integration')) ){
18
  }
19
  } else {
20
  add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
 
21
  }
22
 
23
  function amp_post_template_add_canonical( $amp_template ) {
@@ -110,7 +110,7 @@ function amp_post_template_add_schemaorg_metadata( $amp_template ) {
110
  $seo_sel = ampforwp_get_setting('ampforwp-seo-selection');
111
  if( (ampforwp_get_setting('ampforwp-seo-yoast-schema') == false && ampforwp_get_setting('ampforwp-seo-selection') == 'yoast') || empty($seo_sel) ){
112
  ?>
113
- <script type="application/ld+json"><?php echo wp_json_encode( $metadata ); ?></script>
114
  <?php
115
  }
116
  }
5
  }
6
  // Callbacks for adding content to an AMP template
7
 
 
8
  function amp_post_template_add_title( $amp_template ) {
9
  ?>
10
  <title><?php echo esc_html( $amp_template->get( 'document_title' ) ); ?></title>
17
  }
18
  } else {
19
  add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
20
+ add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_title' );
21
  }
22
 
23
  function amp_post_template_add_canonical( $amp_template ) {
110
  $seo_sel = ampforwp_get_setting('ampforwp-seo-selection');
111
  if( (ampforwp_get_setting('ampforwp-seo-yoast-schema') == false && ampforwp_get_setting('ampforwp-seo-selection') == 'yoast') || empty($seo_sel) ){
112
  ?>
113
+ <script type="application/ld+json"><?php echo wp_json_encode( $metadata, JSON_UNESCAPED_UNICODE ); ?></script>
114
  <?php
115
  }
116
  }
pagebuilder/modules/contents-module.php CHANGED
@@ -23,7 +23,7 @@ function ampforwp_content_module_pagination($args, $fieldValues){
23
  $output = '{{if_condition_content_layout_type==1}}
24
  <div {{if_id}}id="{{id}}"{{ifend_id}} class="pb_mod cm {{user_class}}">
25
  {{if_content_title}}<h4>{{content_title}}</h4> {{ifend_content_title}}
26
- <div class="wrap"><ul>{{category_selection}}</ul></div>
27
  {{pagination_links}}
28
  </div>
29
  {{ifend_condition_content_layout_type_1}}
@@ -596,7 +596,7 @@ if ( is_admin() ) {
596
  if( $paged == $i && $startPage!=$endPage){
597
  $pagination_links .= "<a class='active' href='#/' >".esc_html__($i, 'accelerated-mobile-pages')."</a>";
598
  }else{
599
- $allPages = add_query_arg( array( $pagination_text => $i ), $queryUrl );
600
  if($startPage!=$endPage){
601
  $pagination_links .= "<a href =".esc_url($allPages)." >".esc_html__($i, 'accelerated-mobile-pages')."</a>";
602
  }
23
  $output = '{{if_condition_content_layout_type==1}}
24
  <div {{if_id}}id="{{id}}"{{ifend_id}} class="pb_mod cm {{user_class}}">
25
  {{if_content_title}}<h4>{{content_title}}</h4> {{ifend_content_title}}
26
+ <div id="cat-jump{{id}}" class="wrap"><ul>{{category_selection}}</ul></div>
27
  {{pagination_links}}
28
  </div>
29
  {{ifend_condition_content_layout_type_1}}
596
  if( $paged == $i && $startPage!=$endPage){
597
  $pagination_links .= "<a class='active' href='#/' >".esc_html__($i, 'accelerated-mobile-pages')."</a>";
598
  }else{
599
+ $allPages = add_query_arg( array( $pagination_text => $i ), $queryUrl ) . '#cat-jump'.esc_html($fieldValues['id']);
600
  if($startPage!=$endPage){
601
  $pagination_links .= "<a href =".esc_url($allPages)." >".esc_html__($i, 'accelerated-mobile-pages')."</a>";
602
  }
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.4
7
- Stable tag: 1.0.45
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,19 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  = 1.0.45 (30th April 2020) =
195
  * Fixed: Updated the code as per yoast latest version to fixed the canonical, title separator, meta tag errors #4415
196
  * Fixed: Content links unclickable with GDPR #4392
@@ -198,16 +211,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
198
  = 1.0.44 (29th April 2020) =
199
  * Fixed: Multiple issues created after the latest update of Yoast (14.0 and above) #4412
200
 
201
- = 1.0.43 (28th April 2020) =
202
- * Improvement: Added option to hide category description #4388
203
- * Improvement: Added option to remove Google index on paginated pages #4372
204
- * Improvement: Added Filter for amp-carousel #4374
205
- * Improvement: Code improvements in Related posts and Facebook instance article #4300 #4386
206
- * Fixed: Fatal error with the latest update of yoast 14.0 #4412
207
- * Fixed: AMP Lightbox is not working #4378
208
- * Fixed: White spacing in the responsive mode on left side #4375
209
- * Fixed: Video docking is not working in AMP. #4352
210
- * Fixed: Shortcodes displaying in meta descrption #4385
211
- * Fixed: Debug Warnings: count(): Parameter must be an array or an object that implements Countable. #4387
212
-
213
  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.4
7
+ Stable tag: 1.0.46
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 1.0.46 (4th May 2020) =
195
+ * Fixed: Few issues fixed with latest version of yoast plugin #4430
196
+ * Fixed: Text not displaying in One signal notification #4413
197
+ * Fixed: Wrong amphtml in ?amp endpoint in category pages #4393
198
+ * Fixed: Open graph tags not loading from the SEO framework #4399
199
+ * Fixed: Blank class in archives loop and loop on homepage #4390
200
+ * Fixed: Pagination of category module going to top of the page #4401
201
+ * Fixed: Fatal error in customizer in trucking theme #4391
202
+ * Fixed: Auto Add AMP in Menu option not working in subdomain #4423
203
+ * Fixed: Showing entities instead of UTF-8 in footer json #4395
204
+ * Fixed: Ninja Tables plugin css was hiding due to class drawer #4428
205
+ * Fixed: AMP Option panel improvements #4408
206
+
207
  = 1.0.45 (30th April 2020) =
208
  * Fixed: Updated the code as per yoast latest version to fixed the canonical, title separator, meta tag errors #4415
209
  * Fixed: Content links unclickable with GDPR #4392
211
  = 1.0.44 (29th April 2020) =
212
  * Fixed: Multiple issues created after the latest update of Yoast (14.0 and above) #4412
213
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -358,7 +358,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
358
  }
359
  // URL Purifier
360
  $amp_url = ampforwp_url_purifier($amp_url);
361
- if(true == ampforwp_get_setting('amp-core-end-point') && (!is_home() && !is_front_page())){
362
  $amp_url = add_query_arg( 'amp', '', get_the_permalink() );
363
  }
364
  $amp_url = apply_filters('ampforwp_modify_rel_canonical',$amp_url);
@@ -1455,7 +1455,8 @@ function ampforwp_yoast_social_title($type) {
1455
  $title = WPSEO_Meta::get_value('twitter-title',$page_id );
1456
  }
1457
  if (empty($title) ){
1458
- $title = get_post_meta($page_id, '_yoast_wpseo_title', true);
 
1459
  }
1460
  if (empty($title) ){
1461
  $title = get_the_title($page_id);
@@ -1650,7 +1651,7 @@ function ampforwp_replace_title_tags() {
1650
  }
1651
 
1652
  // Yoast SEO Title compatibility #2871
1653
- if( class_exists('WPSEO_Frontend') && ('yoast' || 1) == ampforwp_get_setting('ampforwp-seo-selection') && !class_exists('Yoast\\WP\\SEO\\Integrations\\Front_End_Integration')) {
1654
  $yoast_title = $WPSEO_Frontend = $yoast_instance = '';
1655
 
1656
  if ( class_exists('Yoast\WP\SEO\Presentations\Indexable_Presentation') ) {
@@ -1665,7 +1666,8 @@ function ampforwp_replace_title_tags() {
1665
  }
1666
  // Custom Front Page Title From Yoast SEO #1163
1667
  if ( ampforwp_is_front_page() || ampforwp_is_blog() ) {
1668
- $yoast_title = $WPSEO_Frontend->get_content_title( $post );
 
1669
  }
1670
  if ( $yoast_title ) {
1671
  $site_title = apply_filters( 'wpseo_title', $yoast_title, $yoast_instance );
@@ -3024,6 +3026,8 @@ function ampforwp_auto_add_amp_in_menu_link( $atts, $item, $args ) {
3024
  $atts['href'] = user_trailingslashit(trailingslashit( $atts['href'] ) . AMPFORWP_AMP_QUERY_VAR);
3025
  }
3026
  }
 
 
3027
 
3028
  return $atts;
3029
  }
@@ -3182,7 +3186,7 @@ function ampforwp_meta_description() {
3182
  return;
3183
  }
3184
  $desc = ampforwp_generate_meta_desc();
3185
- if ( $desc ) {
3186
  echo '<meta name="description" content="'. esc_attr( convert_chars( stripslashes( $desc ) ) ) .'"/>';
3187
  }
3188
  }
@@ -4149,16 +4153,19 @@ function ampforwp_home_archive_canonical_setter(){
4149
  // Except for the homepage
4150
  if( class_exists('Yoast\\WP\\SEO\\Integrations\\Front_End_Integration') ) {
4151
 
4152
- if ( ampforwp_is_home() && 'page' == get_option( 'show_on_front') && empty(get_option( 'page_for_posts')) ) {
4153
  return ;
4154
  }
4155
- if(ampforwp_is_front_page() && 'page' == get_option( 'show_on_front') && empty(get_option( 'page_for_posts'))){
4156
  return ;
4157
  }
4158
  if(is_search()){
4159
  return;
4160
  }
4161
  remove_action('amp_post_template_head','ampforwp_rel_canonical_home_archive');
 
 
 
4162
  }
4163
  }
4164
 
@@ -7062,6 +7069,20 @@ function ampforwp_fontawesome_canonical_link(){
7062
  }
7063
  add_action('amp_post_template_head', 'ampforwp_set_dns_preload_urls');
7064
  function ampforwp_set_dns_preload_urls(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7065
  $prefetch = ampforwp_get_setting('amp-prefetch-options');
7066
  $data_arr = array();
7067
  if(is_array($prefetch)){
358
  }
359
  // URL Purifier
360
  $amp_url = ampforwp_url_purifier($amp_url);
361
+ if(true == ampforwp_get_setting('amp-core-end-point') && (!is_home() && !is_front_page() && !is_archive())){
362
  $amp_url = add_query_arg( 'amp', '', get_the_permalink() );
363
  }
364
  $amp_url = apply_filters('ampforwp_modify_rel_canonical',$amp_url);
1455
  $title = WPSEO_Meta::get_value('twitter-title',$page_id );
1456
  }
1457
  if (empty($title) ){
1458
+ $title .= get_post_meta($page_id, '_yoast_wpseo_title', true);
1459
+ $title = wpseo_replace_vars( $title,$post );
1460
  }
1461
  if (empty($title) ){
1462
  $title = get_the_title($page_id);
1651
  }
1652
 
1653
  // Yoast SEO Title compatibility #2871
1654
+ if( class_exists('WPSEO_Frontend') && ('yoast' || 1) == ampforwp_get_setting('ampforwp-seo-selection') ) {
1655
  $yoast_title = $WPSEO_Frontend = $yoast_instance = '';
1656
 
1657
  if ( class_exists('Yoast\WP\SEO\Presentations\Indexable_Presentation') ) {
1666
  }
1667
  // Custom Front Page Title From Yoast SEO #1163
1668
  if ( ampforwp_is_front_page() || ampforwp_is_blog() ) {
1669
+ $yoast_title = get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_title', true);
1670
+ $yoast_title = wpseo_replace_vars( $yoast_title,$post );
1671
  }
1672
  if ( $yoast_title ) {
1673
  $site_title = apply_filters( 'wpseo_title', $yoast_title, $yoast_instance );
3026
  $atts['href'] = user_trailingslashit(trailingslashit( $atts['href'] ) . AMPFORWP_AMP_QUERY_VAR);
3027
  }
3028
  }
3029
+
3030
+ $atts = apply_filters('ampforwp_auto_add_amp_menu_url',$atts);
3031
 
3032
  return $atts;
3033
  }
3186
  return;
3187
  }
3188
  $desc = ampforwp_generate_meta_desc();
3189
+ if ( $desc && !class_exists('Yoast\\WP\\SEO\\Integrations\\Front_End_Integration')) {
3190
  echo '<meta name="description" content="'. esc_attr( convert_chars( stripslashes( $desc ) ) ) .'"/>';
3191
  }
3192
  }
4153
  // Except for the homepage
4154
  if( class_exists('Yoast\\WP\\SEO\\Integrations\\Front_End_Integration') ) {
4155
 
4156
+ if ( ampforwp_is_home() && 'page' == get_option( 'show_on_front') && empty(get_option( 'page_for_posts')) && !isset($_GET['lang'])) {
4157
  return ;
4158
  }
4159
+ if(ampforwp_is_front_page() && 'page' == get_option( 'show_on_front') && empty(get_option( 'page_for_posts')) && !isset($_GET['lang'])){
4160
  return ;
4161
  }
4162
  if(is_search()){
4163
  return;
4164
  }
4165
  remove_action('amp_post_template_head','ampforwp_rel_canonical_home_archive');
4166
+ if(function_exists('wpseo_premium_init')){
4167
+ add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
4168
+ }
4169
  }
4170
  }
4171
 
7069
  }
7070
  add_action('amp_post_template_head', 'ampforwp_set_dns_preload_urls');
7071
  function ampforwp_set_dns_preload_urls(){
7072
+ // Open graph tag is not loading from the SEO framework #4399
7073
+ if (function_exists('the_seo_framework_boot') && 'seo_framework' == ampforwp_get_setting('ampforwp-seo-selection')) {
7074
+ $og_tsf = \the_seo_framework();
7075
+ if($og_tsf){
7076
+ echo $og_tsf->og_image();
7077
+ echo $og_tsf->og_locale();
7078
+ echo $og_tsf->og_type();
7079
+ echo $og_tsf->og_title();
7080
+ echo $og_tsf->og_image();
7081
+ echo $og_tsf->og_description();
7082
+ echo $og_tsf->og_sitename();
7083
+ }
7084
+ }
7085
+
7086
  $prefetch = ampforwp_get_setting('amp-prefetch-options');
7087
  $data_arr = array();
7088
  if(is_array($prefetch)){