Version Description
- Date Tag fix
- Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.8.6.1 |
Comparing to | |
See all releases |
Code changes from version 0.8.6 to 0.8.6.1
- README.md +5 -1
- accelerated-moblie-pages.php +1 -1
- readme.txt +5 -1
- templates/features.php +14 -2
README.md
CHANGED
@@ -7,7 +7,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
7 |
Donate link: https://www.paypal.me/Kaludi/5
|
8 |
Requires at least: 3.0
|
9 |
Tested up to: 4.6.1
|
10 |
-
Stable tag: 0.8.6
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -116,6 +116,10 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
|
|
116 |
|
117 |
|
118 |
== Changelog ==
|
|
|
|
|
|
|
|
|
119 |
= 0.8.6 =
|
120 |
* Proper Details at http://ampforwp.com/amp-0-8-6-released-related-posts-comments/
|
121 |
* Related Posts
|
7 |
Donate link: https://www.paypal.me/Kaludi/5
|
8 |
Requires at least: 3.0
|
9 |
Tested up to: 4.6.1
|
10 |
+
Stable tag: 0.8.6.1
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
116 |
|
117 |
|
118 |
== Changelog ==
|
119 |
+
= 0.8.6.1 =
|
120 |
+
* Date Tag fix
|
121 |
+
* Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
|
122 |
+
|
123 |
= 0.8.6 =
|
124 |
* Proper Details at http://ampforwp.com/amp-0-8-6-released-related-posts-comments/
|
125 |
* Related Posts
|
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 Toolbox - Accelerated Mobile Pages for WordPress
|
6 |
-
Version: 0.8.6
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: http://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/5
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP Toolbox - Accelerated Mobile Pages for WordPress
|
6 |
+
Version: 0.8.6.1
|
7 |
Author: Ahmed Kaludi, Mohammed Kaludi
|
8 |
Author URI: http://ampforwp.com/
|
9 |
Donate link: https://www.paypal.me/Kaludi/5
|
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.6.1
|
7 |
-
Stable tag: 0.8.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -113,6 +113,10 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
|
|
113 |
|
114 |
|
115 |
== Changelog ==
|
|
|
|
|
|
|
|
|
116 |
= 0.8.6 =
|
117 |
* Proper Details at http://ampforwp.com/amp-0-8-6-released-related-posts-comments/
|
118 |
* Related Posts
|
4 |
Donate link: https://www.paypal.me/Kaludi/5
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.6.1
|
7 |
+
Stable tag: 0.8.6.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
113 |
|
114 |
|
115 |
== Changelog ==
|
116 |
+
= 0.8.6.1 =
|
117 |
+
* Date Tag fix
|
118 |
+
* Few validation issues after 0.8.6 were fixed (Frontpage amp-img strip issue fixed)
|
119 |
+
|
120 |
= 0.8.6 =
|
121 |
* Proper Details at http://ampforwp.com/amp-0-8-6-released-related-posts-comments/
|
122 |
* Related Posts
|
templates/features.php
CHANGED
@@ -385,7 +385,7 @@
|
|
385 |
$content = preg_replace('/property=[^>]*/', '', $content);
|
386 |
$content = preg_replace('/vocab=[^>]*/', '', $content);
|
387 |
$content = preg_replace('/value=[^>]*/', '', $content);
|
388 |
-
$content = preg_replace('/date
|
389 |
$content = preg_replace('/contenteditable=[^>]*/', '', $content);
|
390 |
$content = preg_replace('/time=[^>]*/', '', $content);
|
391 |
$content = preg_replace('/non-refundable=[^>]*/', '', $content);
|
@@ -399,6 +399,18 @@
|
|
399 |
$content = preg_replace('#<table.*?>#i', '<table width="100%">', $content);
|
400 |
$content = preg_replace('#<style scoped.*?>(.*?)</style>#i', '', $content);
|
401 |
$content = preg_replace('/href="javascript:void*/', ' ', $content);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
$content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
|
403 |
return $content;
|
404 |
}
|
@@ -641,4 +653,4 @@ add_action( 'amp_post_template_head', function() {
|
|
641 |
add_action( 'pre_amp_render_post', 'ampforwp_remove_schema_data' );
|
642 |
function ampforwp_remove_schema_data() {
|
643 |
remove_filter('the_content','display_rich_snippet');
|
644 |
-
}
|
385 |
$content = preg_replace('/property=[^>]*/', '', $content);
|
386 |
$content = preg_replace('/vocab=[^>]*/', '', $content);
|
387 |
$content = preg_replace('/value=[^>]*/', '', $content);
|
388 |
+
$content = preg_replace('/date=[^>]*/', '', $content);
|
389 |
$content = preg_replace('/contenteditable=[^>]*/', '', $content);
|
390 |
$content = preg_replace('/time=[^>]*/', '', $content);
|
391 |
$content = preg_replace('/non-refundable=[^>]*/', '', $content);
|
399 |
$content = preg_replace('#<table.*?>#i', '<table width="100%">', $content);
|
400 |
$content = preg_replace('#<style scoped.*?>(.*?)</style>#i', '', $content);
|
401 |
$content = preg_replace('/href="javascript:void*/', ' ', $content);
|
402 |
+
// $content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
|
403 |
+
return $content;
|
404 |
+
}
|
405 |
+
|
406 |
+
// 11.5 Strip unwanted codes the_content of Frontpage
|
407 |
+
add_action( 'pre_amp_render_post','ampforwp_strip_invalid_content_frontpage');
|
408 |
+
function ampforwp_strip_invalid_content_frontpage(){
|
409 |
+
if ( is_front_page() || is_home() ) {
|
410 |
+
add_filter( 'the_content', 'ampforwp_the_content_filter_frontpage', 20 );
|
411 |
+
}
|
412 |
+
}
|
413 |
+
function ampforwp_the_content_filter_frontpage( $content ) {
|
414 |
$content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
|
415 |
return $content;
|
416 |
}
|
653 |
add_action( 'pre_amp_render_post', 'ampforwp_remove_schema_data' );
|
654 |
function ampforwp_remove_schema_data() {
|
655 |
remove_filter('the_content','display_rich_snippet');
|
656 |
+
}
|