AMP for WP – Accelerated Mobile Pages - Version 0.9.34

Version Description

  • Newspaper theme by Tagdiv was having issues, we have fixed this one.
Download this release

Release Info

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

Code changes from version 0.9.33 to 0.9.34

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/5
5
  Requires at least: 3.0
6
  Tested up to: 4.7
7
- Stable tag: 0.9.32
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -122,6 +122,26 @@ You can contact me using this url: http://ampforwp.com/contact/
122
 
123
  == Changelog ==
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  = 0.9.32 [7th Jan 2017] =
126
  * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
127
  * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
  Tested up to: 4.7
7
+ Stable tag: 0.9.34
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
122
 
123
  == Changelog ==
124
 
125
+ = 0.9.34 =
126
+ * Newspaper theme by Tagdiv was having issues, we have fixed this one.
127
+
128
+ = 0.9.33 [15th Jan 2017] =
129
+ * Full details at https://ampforwp.com/debug-errors-shortcodes/
130
+ * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
131
+ * Debug errors fixed, Code is now much cleaner.
132
+ * New rewrite rules for homepage pagination. It had some paginated URLs with wrong amphtml tag.
133
+ * Extra analytics file was loading. Better compatibility with Yoast & Monster analytics.
134
+ * Properly removes AMP if turned off from Post panel
135
+ * z-index position improved on Sticky Social bar
136
+ * Better compatibility with shortcodes.
137
+ * Divi Standard Layouts Compatibility
138
+ * Properly Hide AMP posts if excluded. #367
139
+ * Mobile redirection was causing loop issues which are now fixed.
140
+ * Some plugins were loading in core AMP js file, which was causing the issues, which is now fixed. [Better Validation]
141
+ * onclick was getting added in the links on AMP version. Issue fixed. [Better Validation]
142
+ * thrive_headline tag was getting added in the Title tag which was causing validation issues. Fixed. [Better Validation]
143
+ * Some interactive plugins were using place, state, city and imap tags which are now fixed. [Better Validation]
144
+
145
  = 0.9.32 [7th Jan 2017] =
146
  * Full details at https://ampforwp.com/first-wave-of-polishing-in-2017/
147
  * Rel=canonical issue fixed: AMP URL redirect to the normal URL #293 & #332.
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 0.9.33
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
@@ -26,7 +26,7 @@ add_action( 'init', 'ampforwp_add_custom_post_support',11);
26
 
27
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
28
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
29
- define('AMPFORWP_VERSION','0.9.33');
30
  /*
31
  * Load Files only in the backend
32
  * As we don't need plugin activation code to run everytime the site loads
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.34
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
26
 
27
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
28
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
29
+ define('AMPFORWP_VERSION','0.9.34');
30
  /*
31
  * Load Files only in the backend
32
  * As we don't need plugin activation code to run everytime the site loads
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/5
5
  Requires at least: 3.0
6
  Tested up to: 4.7
7
- Stable tag: 0.9.33
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -122,6 +122,9 @@ You can contact me using this url: http://ampforwp.com/contact/
122
 
123
  == Changelog ==
124
 
 
 
 
125
  = 0.9.33 [15th Jan 2017] =
126
  * Full details at https://ampforwp.com/debug-errors-shortcodes/
127
  * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
  Tested up to: 4.7
7
+ Stable tag: 0.9.34
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
122
 
123
  == Changelog ==
124
 
125
+ = 0.9.34 =
126
+ * Newspaper theme by Tagdiv was having issues, we have fixed this one.
127
+
128
  = 0.9.33 [15th Jan 2017] =
129
  * Full details at https://ampforwp.com/debug-errors-shortcodes/
130
  * Mobile was not working with Newspaper theme by Tagdiv [Bugfix]
templates/features.php CHANGED
@@ -942,10 +942,13 @@ function ampforwp_remove_title_tags(){
942
  // 27. Clean the Defer issue
943
  // TODO : Get back to this issue. #407
944
  function ampforwp_the_content_filter_full( $content_buffer ) {
 
 
945
  $content_buffer = preg_replace("/' defer='defer/", "", $content_buffer);
946
  $content_buffer = preg_replace("/onclick=[^>]*/", "", $content_buffer);
947
  $content_buffer = preg_replace("/<\\/?thrive_headline(.|\\s)*?>/",'',$content_buffer);
948
- return $content_buffer;
 
949
  }
950
  ob_start('ampforwp_the_content_filter_full');
951
 
@@ -983,6 +986,9 @@ function ampforwp_skip_amp_post( $skip, $post_id, $post ) {
983
  }
984
 
985
  //30. TagDiv menu issue removed
986
- if( class_exists( 'td_mobile_theme' ) ) {
987
- remove_action('option_stylesheet', array('td_mobile_theme', 'mobile'));
988
- }
 
 
 
942
  // 27. Clean the Defer issue
943
  // TODO : Get back to this issue. #407
944
  function ampforwp_the_content_filter_full( $content_buffer ) {
945
+ $ampforwp_is_amp_endpoint = ampforwp_is_amp_endpoint();
946
+ if ( $ampforwp_is_amp_endpoint ) {
947
  $content_buffer = preg_replace("/' defer='defer/", "", $content_buffer);
948
  $content_buffer = preg_replace("/onclick=[^>]*/", "", $content_buffer);
949
  $content_buffer = preg_replace("/<\\/?thrive_headline(.|\\s)*?>/",'',$content_buffer);
950
+ }
951
+ return $content_buffer;
952
  }
953
  ob_start('ampforwp_the_content_filter_full');
954
 
986
  }
987
 
988
  //30. TagDiv menu issue removed
989
+ add_action('init','ampforwp_remove_tagdiv_mobile_menu');
990
+ function ampforwp_remove_tagdiv_mobile_menu() {
991
+ if( class_exists( 'Mobile_Detect' )) {
992
+ remove_action('option_stylesheet', array('td_mobile_theme', 'mobile'));
993
+ }
994
+ }