AMP for WP – Accelerated Mobile Pages - Version 0.9.54.1

Version Description

(4th July 2017) = * Minor bug post 0.9.54 bug fixed

Download this release

Release Info

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

Code changes from version 0.9.54 to 0.9.54.1

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.54
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -17,7 +17,7 @@ define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
17
  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_VERSION','0.9.54');
21
  // any changes to AMP_QUERY_VAR should be refelected here
22
  define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
23
 
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.54.1
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
17
  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_VERSION','0.9.54.1');
21
  // any changes to AMP_QUERY_VAR should be refelected here
22
  define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
23
 
classes/class-init.php CHANGED
@@ -1,20 +1,11 @@
1
- <?php
2
-
3
- if ( ! class_exists( 'Ampforwp_Loader', false ) ) {
4
-
5
  class Ampforwp_Loader {
6
-
7
-
8
  public function __construct() {
9
  $this->load_required_files();
10
  }
11
-
12
  public function load_required_files() {
13
-
14
  require AMPFORWP_PLUGIN_DIR . '/templates/features.php';
15
  require AMPFORWP_PLUGIN_DIR . '/templates/instant-articles/instant-article-sanitizer.php';
16
-
17
  }
18
  }
19
- }
20
- ?>
1
+ <?php if ( ! class_exists( 'Ampforwp_Loader', false ) ) {
 
 
 
2
  class Ampforwp_Loader {
 
 
3
  public function __construct() {
4
  $this->load_required_files();
5
  }
 
6
  public function load_required_files() {
 
7
  require AMPFORWP_PLUGIN_DIR . '/templates/features.php';
8
  require AMPFORWP_PLUGIN_DIR . '/templates/instant-articles/instant-article-sanitizer.php';
 
9
  }
10
  }
11
+ } ?>
 
readme.txt CHANGED
@@ -136,6 +136,9 @@ You can contact me using this url: http://ampforwp.com/contact/
136
 
137
  == Changelog ==
138
 
 
 
 
139
  = 0.9.54 (4th July 2017) =
140
  * View more details on https://ampforwp.com/new/
141
  * Facebook Instant Articles Support #862
136
 
137
  == Changelog ==
138
 
139
+ = 0.9.54.1 (4th July 2017) =
140
+ * Minor bug post 0.9.54 bug fixed
141
+
142
  = 0.9.54 (4th July 2017) =
143
  * View more details on https://ampforwp.com/new/
144
  * Facebook Instant Articles Support #862
templates/instant-articles/instant-article-sanitizer.php CHANGED
@@ -1,23 +1,18 @@
1
  <?php
2
-
3
  add_filter( 'fbia_content', 'headlines');
4
- add_filter( 'fbia_content', 'filter_dom') ;
5
  add_filter( 'fbia_content', 'address_tag');
6
-
7
- remove_all_filters( 'post_gallery' );
8
- add_filter( 'post_gallery', 'gallery_shortcode', 10, 3 );
9
-
10
 
11
  // DOM Document Filter
12
  if(class_exists("DOMDocument")){
13
  add_filter( 'fbia_content_dom', 'list_items_with_content');
14
  add_filter( 'fbia_content_dom', 'validate_images');
15
  add_filter( 'fbia_content_dom','resize_images');
16
-
17
  // The empty P tags class should run last
18
  add_filter( 'fbia_content_dom','no_empty_p_tags');
19
  }
20
-
21
  function headlines($content){
22
  // Replace h3, h4, h5, h6 with h2
23
  $content = preg_replace(
@@ -25,20 +20,16 @@ function headlines($content){
25
  '<h2>$1</h2>',
26
  $content
27
  );
28
-
29
  return $content;
30
  }
31
-
32
  function address_tag($content){
33
  $content = preg_replace(
34
  '/<address[^>]*>(.*)<\/address>/sU',
35
  '<p>$1</p>',
36
  $content
37
  );
38
-
39
  return $content;
40
  }
41
-
42
  function filter_dom($content){
43
  $DOMDocument = get_content_DOM($content);
44
 
@@ -179,8 +170,6 @@ function resize_images($DOMDocument){
179
  }
180
  }
181
  }
182
-
183
-
184
  return $DOMDocument;
185
  }
186
 
@@ -238,8 +227,7 @@ function no_empty_p_tags($DOMDocument){
238
 
239
  return $DOMDocument;
240
  }
241
-
242
- function fb_gallery_shortcode($output, $attr, $instance){
243
  $post = get_post();
244
 
245
  $atts = shortcode_atts( array(
@@ -301,4 +289,4 @@ function fb_gallery_shortcode($output, $attr, $instance){
301
  $output .= "</figure>";
302
 
303
  return $output;
304
- }
1
  <?php
 
2
  add_filter( 'fbia_content', 'headlines');
3
+ add_filter( 'fbia_content', 'filter_dom');
4
  add_filter( 'fbia_content', 'address_tag');
5
+ //remove_all_filters( 'post_gallery' );
6
+ //add_filter( 'post_gallery', 'fb_gallery_shortcode', 10, 3 );
 
 
7
 
8
  // DOM Document Filter
9
  if(class_exists("DOMDocument")){
10
  add_filter( 'fbia_content_dom', 'list_items_with_content');
11
  add_filter( 'fbia_content_dom', 'validate_images');
12
  add_filter( 'fbia_content_dom','resize_images');
 
13
  // The empty P tags class should run last
14
  add_filter( 'fbia_content_dom','no_empty_p_tags');
15
  }
 
16
  function headlines($content){
17
  // Replace h3, h4, h5, h6 with h2
18
  $content = preg_replace(
20
  '<h2>$1</h2>',
21
  $content
22
  );
 
23
  return $content;
24
  }
 
25
  function address_tag($content){
26
  $content = preg_replace(
27
  '/<address[^>]*>(.*)<\/address>/sU',
28
  '<p>$1</p>',
29
  $content
30
  );
 
31
  return $content;
32
  }
 
33
  function filter_dom($content){
34
  $DOMDocument = get_content_DOM($content);
35
 
170
  }
171
  }
172
  }
 
 
173
  return $DOMDocument;
174
  }
175
 
227
 
228
  return $DOMDocument;
229
  }
230
+ /*function fb_gallery_shortcode($output, $attr, $instance){
 
231
  $post = get_post();
232
 
233
  $atts = shortcode_atts( array(
289
  $output .= "</figure>";
290
 
291
  return $output;
292
+ }*/