AMP for WP – Accelerated Mobile Pages - Version 0.9.57.3

Version Description

Download this release

Release Info

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

Code changes from version 0.9.57 to 0.9.57.3

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.57
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -18,7 +18,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
18
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
19
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
20
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
21
- define('AMPFORWP_VERSION','0.9.57');
22
  // any changes to AMP_QUERY_VAR should be refelected here
23
  define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
24
 
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.57.3
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
18
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
19
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
20
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
21
+ define('AMPFORWP_VERSION','0.9.57.3');
22
  // any changes to AMP_QUERY_VAR should be refelected here
23
  define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
24
 
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.8.1
7
- Stable tag: 0.9.57
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
  Tested up to: 4.8.1
7
+ Stable tag: 0.9.57.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
templates/design-manager/design-2/style.php CHANGED
@@ -284,5 +284,5 @@ amp-user-notification button { background-color: <?php echo sanitize_hex_color(
284
  @media (min-width: 768px) and (max-width: 1600px) {.tablepress { overflow-x: none; } }
285
  @media (min-width: 320px) and (max-width: 767px) {.tablepress { display: inline-block; overflow-x: scroll; } }
286
  <?php } ?>
287
-
288
  <?php echo $redux_builder_amp['css_editor']; } ?>
284
  @media (min-width: 768px) and (max-width: 1600px) {.tablepress { overflow-x: none; } }
285
  @media (min-width: 320px) and (max-width: 767px) {.tablepress { display: inline-block; overflow-x: scroll; } }
286
  <?php } ?>
287
+ .design_2_wrapper .amp-loop-list .amp-wp-meta {display: none;}
288
  <?php echo $redux_builder_amp['css_editor']; } ?>
templates/features.php CHANGED
@@ -78,6 +78,8 @@
78
  66. Make AMP compatible with Squirrly SEO
79
  69. Post Pagination #834 #857
80
  70. Hide AMP by specific Categories #872
 
 
81
  */
82
  // Adding AMP-related things to the main theme
83
  global $redux_builder_amp;
@@ -3318,6 +3320,7 @@ function ampforwp_rel_canonical_home_archive(){
3318
  }
3319
  }
3320
 
 
3321
  //Alt tag for thumbnails #1013
3322
  function ampforwp_thumbnail_alt(){
3323
  $thumb_id = '';
@@ -3329,27 +3332,34 @@ function ampforwp_thumbnail_alt(){
3329
  echo "alt = '$thumb_alt'";
3330
  }
3331
  }
3332
- // For Post ID in Body tag
3333
  function ampforwp_get_body_class(){
 
 
 
3334
 
3335
- global $post;
3336
- global $redux_builder_amp;
3337
- $post_id = '';
3338
-
3339
- if ( is_singular() ) {
3340
- $post_id = $post->ID;
3341
- }
3342
- if ( $redux_builder_amp['amp-frontpage-select-option']) {
3343
- if ( is_home() && is_front_page() ) {
3344
- $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
3345
- } elseif ( is_home() ){
3346
- $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
3347
- }
3348
- }
3349
 
3350
- return $post_id;
3351
  }
3352
 
3353
  function ampforwp_the_body_class(){
3354
- echo 'post-id-' . ampforwp_get_body_class();
3355
- }#1006 Pegazee
 
 
 
 
 
 
 
 
78
  66. Make AMP compatible with Squirrly SEO
79
  69. Post Pagination #834 #857
80
  70. Hide AMP by specific Categories #872
81
+ 71. Alt tag for thumbnails #1013 and For Post ID in Body tag #1006
82
+ 72. Blacklist Sanitizer Added back #1024
83
  */
84
  // Adding AMP-related things to the main theme
85
  global $redux_builder_amp;
3320
  }
3321
  }
3322
 
3323
+ // 71. Alt tag for thumbnails #1013 and For Post ID in Body tag #1006
3324
  //Alt tag for thumbnails #1013
3325
  function ampforwp_thumbnail_alt(){
3326
  $thumb_id = '';
3332
  echo "alt = '$thumb_alt'";
3333
  }
3334
  }
3335
+ // For Post ID in Body tag #1006
3336
  function ampforwp_get_body_class(){
3337
+ global $post;
3338
+ global $redux_builder_amp;
3339
+ $post_id = '';
3340
 
3341
+ if ( is_singular() ) {
3342
+ $post_id = $post->ID;
3343
+ }
3344
+ if ( $redux_builder_amp['amp-frontpage-select-option']) {
3345
+ if ( is_home() && is_front_page() ) {
3346
+ $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
3347
+ } elseif ( is_home() ){
3348
+ $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
3349
+ }
3350
+ }
 
 
 
 
3351
 
3352
+ return $post_id;
3353
  }
3354
 
3355
  function ampforwp_the_body_class(){
3356
+ echo 'post-id-' . ampforwp_get_body_class();
3357
+ }
3358
+
3359
+ // 72. Blacklist Sanitizer Added back #1024
3360
+ add_filter('amp_content_sanitizers', 'ampforwp_add_blacklist_sanitizer');
3361
+ function ampforwp_add_blacklist_sanitizer($data){
3362
+ // Blacklist Sanitizer Added back until we find a better solution to replace it
3363
+ $data['AMP_Blacklist_Sanitizer'] = array();
3364
+ return $data;
3365
+ }