AMP for WP – Accelerated Mobile Pages - Version 1.0.76.11

Version Description

(14th April 2021) = * Improvements: Added an option to select same categories in infinite scroll #4017 * Improvements: Added an option to select same tags in infinite scroll #4939 * Improvements: Added the filter to change breadcrumbs name #4979 * Fixed: Muffin pagebuilder not working in AMP #4983 * Fixed: PHP 8 debug errors #4981 * Fixed: AMP menu automatically scrolls down to bottom in Design three #4967 * Fixed: Deprecated Filters Detected Warning in All in one SEO plugin #4980

Download this release

Release Info

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

Code changes from version 1.0.76.10 to 1.0.76.11

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.7
7
- Stable tag: 1.0.76.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,15 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
196
  = 1.0.76.10 (9th April 2021) =
197
  * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
198
  * Improvements: Added the feature to track each author contribution to the website pageview #4952
@@ -215,12 +224,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
215
  * Fixed: Upgrade for Free' button in structured data settings is not working #4960
216
  * Fixed: Beginner and advance mode popup not closing #4974
217
 
218
- = 1.0.76.8 (22nd March 2021) =
219
- * Fixed: Srcset attribute not appearing on images with AMP page builder #4954
220
- * Fixed: Option added to disable structured data in AMP #4953
221
- * Fixed: Debug Warning with PHP 8.02 and WordPress 5.6.2 #4946
222
- * Fixed: Background Video loop not working with AMP page builder #4948
223
- * Fixed: Mobile redirection not working for the front page when pages are disabled #4942
224
- * Fixed: Captions are not working on Slideshow Module by Jetpack Plugin #4950
225
-
226
  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.7
7
+ Stable tag: 1.0.76.11
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.11 (14th April 2021) =
197
+ * Improvements: Added an option to select same categories in infinite scroll #4017
198
+ * Improvements: Added an option to select same tags in infinite scroll #4939
199
+ * Improvements: Added the filter to change breadcrumbs name #4979
200
+ * Fixed: Muffin pagebuilder not working in AMP #4983
201
+ * Fixed: PHP 8 debug errors #4981
202
+ * Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
203
+ * Fixed: Deprecated Filters Detected Warning in All in one SEO plugin #4980
204
+
205
  = 1.0.76.10 (9th April 2021) =
206
  * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
207
  * Improvements: Added the feature to track each author contribution to the website pageview #4952
224
  * Fixed: Upgrade for Free' button in structured data settings is not working #4960
225
  * Fixed: Beginner and advance mode popup not closing #4974
226
 
 
 
 
 
 
 
 
 
227
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 1.0.76.10
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','1.0.76.10');
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.11
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.11');
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,14 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.76.10 (9th April 2021) =
4
  * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
5
  * Improvements: Added the feature to track each author contribution to the website pageview #4952
1
  == Changelog ==
2
 
3
+ = 1.0.76.11 (14th April 2021) =
4
+ * Improvements: Added an option to select same categories in infinite scroll #4017
5
+ * Improvements: Added an option to select same tags in infinite scroll #4939
6
+ * Improvements: Added the filter to change breadcrumbs name #4979
7
+ * Fixed: Muffin pagebuilder not working in AMP #4983
8
+ * Fixed: PHP 8 debug errors #4981
9
+ * Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
10
+ * Fixed: Deprecated Filters Detected Warning in All in one SEO plugin #4980
11
+
12
  = 1.0.76.10 (9th April 2021) =
13
  * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
14
  * Improvements: Added the feature to track each author contribution to the website pageview #4952
classes/class-ampforwp-infinite-scroll.php CHANGED
@@ -125,6 +125,26 @@ if( ! class_exists('AMPforWP_Infinite_Scroll') ) {
125
  'posts_per_page' => 2,
126
  'no_found_rows' => true
127
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  $query_args = apply_filters('ampforwp_infinite_scroll_query_args', $query_args);
129
  $query = new WP_Query( $query_args );
130
  while ($query->have_posts()) {
125
  'posts_per_page' => 2,
126
  'no_found_rows' => true
127
  );
128
+ if (ampforwp_get_setting('ampforwp-infinite-scroll-single') && ampforwp_get_setting('ampforwp-infinite-scroll-single-category')){
129
+ $categories = get_the_category($post->ID);
130
+ if ($categories) {
131
+ $category_ids = array();
132
+ foreach($categories as $individual_category){
133
+ $category_ids[] = $individual_category->cat_ID;
134
+ }
135
+ }
136
+ $query_args['category__in'] = $category_ids;
137
+ }
138
+ if (ampforwp_get_setting('ampforwp-infinite-scroll-single') && ampforwp_get_setting('ampforwp-infinite-scroll-single-tag')){
139
+ $tags = get_the_tags(ampforwp_get_the_ID());
140
+ if ($tags) {
141
+ $tags_ids = array();
142
+ foreach($tags as $individual_tag){
143
+ $tags_ids[] = $individual_tag->term_id;
144
+ }
145
+ }
146
+ $query_args['tag__in'] = $tags_ids;
147
+ }
148
  $query_args = apply_filters('ampforwp_infinite_scroll_query_args', $query_args);
149
  $query = new WP_Query( $query_args );
150
  while ($query->have_posts()) {
components/breadcrumb/breadcrumb.php CHANGED
@@ -142,7 +142,8 @@ function amp_breadcrumb_output(){
142
  $cat_link = ampforwp_url_controller( $cat_link );
143
  }
144
  $cat_link = apply_filters('ampforwp_breadcrumbs_category_url', $cat_link,$post->ID);
145
- $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
 
146
  }
147
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
148
  $cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
142
  $cat_link = ampforwp_url_controller( $cat_link );
143
  }
144
  $cat_link = apply_filters('ampforwp_breadcrumbs_category_url', $cat_link,$post->ID);
145
+ $parents = apply_filters('ampforwp_breadcrumbs_category_name', $parents);
146
+ $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . esc_attr($parents). '" href="'. esc_url($cat_link).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
147
  }
148
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
149
  $cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
components/components-core.php CHANGED
@@ -560,12 +560,13 @@ function amp_content($post_id= ''){
560
  // Custom/Alternative AMP content added through post meta
561
  $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
562
  }
563
- // Muffin Builder Compatibility #1455 #1893
564
- if ( function_exists('mfn_builder_print') && ! $amp_custom_content_enable ) {
565
- ob_start();
566
- mfn_builder_print( $thisTemplate->get( 'post_id' ) );
567
- $content = ob_get_contents();
568
- ob_end_clean();
 
569
  $sanitizer_obj = new AMPFORWP_Content( $content,
570
  array(),
571
  apply_filters( 'ampforwp_content_sanitizers',
560
  // Custom/Alternative AMP content added through post meta
561
  $ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
562
  }
563
+ // Muffin Builder Compatibility #1455 #1893 #4983
564
+ if ( class_exists('Mfn_Builder_Front') && ! $amp_custom_content_enable ) {
565
+ $mfn_builder = $content = '';
566
+ $mfn_builder = new Mfn_Builder_Front(ampforwp_get_the_ID());
567
+ if (! empty($mfn_builder) ) {
568
+ $content = $mfn_builder->show();
569
+ }
570
  $sanitizer_obj = new AMPFORWP_Content( $content,
571
  array(),
572
  apply_filters( 'ampforwp_content_sanitizers',
includes/options/admin-config.php CHANGED
@@ -4198,6 +4198,28 @@ Redux::setSection( $opt_name, array(
4198
  'default' => true,
4199
  'required' => array( 'ampforwp-infinite-scroll', '=' , 1 )
4200
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4201
  array(
4202
  'id' => 'google-icons',
4203
  'type' => 'section',
4198
  'default' => true,
4199
  'required' => array( 'ampforwp-infinite-scroll', '=' , 1 )
4200
  ),
4201
+ array(
4202
+ 'id' => 'ampforwp-infinite-scroll-single-category',
4203
+ 'type' => 'switch',
4204
+ 'class' => 'child_opt child_opt_arrow',
4205
+ 'title' => esc_html__('Same Category', 'accelerated-mobile-pages'),
4206
+ 'default' => false,
4207
+ 'required' => array(
4208
+ array('ampforwp-infinite-scroll', '=' , '1'),
4209
+ array('ampforwp-infinite-scroll-single', '=' , '1')
4210
+ ),
4211
+ ),
4212
+ array(
4213
+ 'id' => 'ampforwp-infinite-scroll-single-tag',
4214
+ 'type' => 'switch',
4215
+ 'class' => 'child_opt child_opt_arrow',
4216
+ 'title' => esc_html__('Same Tag', 'accelerated-mobile-pages'),
4217
+ 'default' => false,
4218
+ 'required' => array(
4219
+ array('ampforwp-infinite-scroll', '=' , '1'),
4220
+ array('ampforwp-infinite-scroll-single', '=' , '1')
4221
+ ),
4222
+ ),
4223
  array(
4224
  'id' => 'google-icons',
4225
  'type' => 'section',
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.7
7
- Stable tag: 1.0.76.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,15 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
 
193
  = 1.0.76.10 (9th April 2021) =
194
  * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
195
  * Improvements: Added the feature to track each author contribution to the website pageview #4952
@@ -212,12 +221,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
212
  * Fixed: Upgrade for Free' button in structured data settings is not working #4960
213
  * Fixed: Beginner and advance mode popup not closing #4974
214
 
215
- = 1.0.76.8 (22nd March 2021) =
216
- * Fixed: Srcset attribute not appearing on images with AMP page builder #4954
217
- * Fixed: Option added to disable structured data in AMP #4953
218
- * Fixed: Debug Warning with PHP 8.02 and WordPress 5.6.2 #4946
219
- * Fixed: Background Video loop not working with AMP page builder #4948
220
- * Fixed: Mobile redirection not working for the front page when pages are disabled #4942
221
- * Fixed: Captions are not working on Slideshow Module by Jetpack Plugin #4950
222
-
223
  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.7
7
+ Stable tag: 1.0.76.11
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.11 (14th April 2021) =
194
+ * Improvements: Added an option to select same categories in infinite scroll #4017
195
+ * Improvements: Added an option to select same tags in infinite scroll #4939
196
+ * Improvements: Added the filter to change breadcrumbs name #4979
197
+ * Fixed: Muffin pagebuilder not working in AMP #4983
198
+ * Fixed: PHP 8 debug errors #4981
199
+ * Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
200
+ * Fixed: Deprecated Filters Detected Warning in All in one SEO plugin #4980
201
+
202
  = 1.0.76.10 (9th April 2021) =
203
  * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
204
  * Improvements: Added the feature to track each author contribution to the website pageview #4952
221
  * Fixed: Upgrade for Free' button in structured data settings is not working #4960
222
  * Fixed: Beginner and advance mode popup not closing #4974
223
 
 
 
 
 
 
 
 
 
224
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-3/style.php CHANGED
@@ -38,7 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  /* Global Styling */
39
  body{
40
  font-size: 16px;
41
- line-height:1.6;
42
  }
43
  body, amp-sidebar, .single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6, h2.amp-wp-title , h3.amp-wp-title, .cmt-button-wrapper a, h1.amp-wp-title, .single-post main,.related-title,.single-post .cmts_list h3, .rp .related_link a{
44
  <?php $fontFamily = "font-family: sans-serif;"; ?>
38
  /* Global Styling */
39
  body{
40
  font-size: 16px;
41
+ line-height:1.4;
42
  }
43
  body, amp-sidebar, .single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6, h2.amp-wp-title , h3.amp-wp-title, .cmt-button-wrapper a, h1.amp-wp-title, .single-post main,.related-title,.single-post .cmts_list h3, .rp .related_link a{
44
  <?php $fontFamily = "font-family: sans-serif;"; ?>
templates/features.php CHANGED
@@ -3330,8 +3330,9 @@ function ampforwp_meta_description() {
3330
  }
3331
  }
3332
  // All in One Seo Compatibility #1557
3333
- add_filter('aioseop_amp_description', '__return_false');
3334
-
 
3335
  // 55. Call Now Button Feature added
3336
  add_action('ampforwp_call_button','ampforwp_call_button_html_output');
3337
  function ampforwp_call_button_html_output(){
@@ -6869,10 +6870,10 @@ function ampforwp_thrive_content($content){
6869
  add_action( 'add_meta_boxes', 'ampforwp_ia_meta_box' );
6870
  if ( ! function_exists('ampforwp_ia_meta_box') ) {
6871
  function ampforwp_ia_meta_box() {
6872
- global $redux_builder_amp, $post;
6873
 
6874
  if ( ampforwp_role_based_access_options() == true ) {
6875
- if( true == $redux_builder_amp['fb-instant-article-switch'] && $post->post_type == 'post' ) {
6876
  add_meta_box( 'ampforwp_ia_meta', esc_html__( 'Show Instant Article for Current Post?','accelerated-mobile-pages' ), 'ampforwp_ia_meta_callback', 'post','side' );
6877
  }
6878
  }
3330
  }
3331
  }
3332
  // All in One Seo Compatibility #1557
3333
+ if(version_compare(AIOSEO_VERSION,'4.0.0', '<')){
3334
+ add_filter('aioseop_amp_description', '__return_false');
3335
+ }
3336
  // 55. Call Now Button Feature added
3337
  add_action('ampforwp_call_button','ampforwp_call_button_html_output');
3338
  function ampforwp_call_button_html_output(){
6870
  add_action( 'add_meta_boxes', 'ampforwp_ia_meta_box' );
6871
  if ( ! function_exists('ampforwp_ia_meta_box') ) {
6872
  function ampforwp_ia_meta_box() {
6873
+ global $post;
6874
 
6875
  if ( ampforwp_role_based_access_options() == true ) {
6876
+ if( ampforwp_get_setting('fb-instant-article-switch') && $post->post_type == 'post' ) {
6877
  add_meta_box( 'ampforwp_ia_meta', esc_html__( 'Show Instant Article for Current Post?','accelerated-mobile-pages' ), 'ampforwp_ia_meta_callback', 'post','side' );
6878
  }
6879
  }