From 6682524604fe7c59298d689083733a0f287be4df Mon Sep 17 00:00:00 2001
From: Ahmed Kaludi
Date: Fri, 12 Aug 2016 10:34:03 +0530
Subject: [PATCH] 0.7.1 release
= 0.7.1 =
* Bug #24 (Github) fixed
* Strip Style tags for faster & better validation
* Bug #21 (Github) fixed
---
README.md | 13 +++++++++----
accelerated-moblie-pages.php | 2 +-
readme.txt | 13 +++++++++----
themes/default/functions.php | 14 +++++++++++++-
4 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 36ee274b6..e0e7c2cae 100644
--- a/README.md
+++ b/README.md
@@ -6,8 +6,8 @@ https://wordpress.org/plugins/accelerated-mobile-pages/
Contributors: mohammed_kaludi, ahmedkaludi
Tags: accelerated mobile pages, amp, mobile, amp project, google amp, amp wp
Requires at least: 3.0
-Tested up to: 4.5.2
-Stable tag: 0.7
+Tested up to: 4.5.3
+Stable tag: 0.7.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -30,7 +30,7 @@ Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on
* Separate WordPress Menu for AMP version
-**NOTE: Next Update of this plugin will be released on 4 August 2016.** [Here is the list of things](https://goo.gl/jDTPyg) that will be updated in the next update
+**NOTE: Next Big Update of this plugin will be released on 7th September 2016.
**How to test if AMP is working or not?**
@@ -115,4 +115,9 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
* Navigation Validation bug fixed
* Two more validation bugs fixed ('role' and 'tabindex' attribute)
* Featured image automatically hides if it is not present
-* Validation issues in the images of the post's the_content
\ No newline at end of file
+* Validation issues in the images of the post's the_content
+
+= 0.7.1 =
+* Bug #24 (Github) fixed
+* Strip Style tags for faster & better validation
+* Bug #21 (Github) fixed
\ No newline at end of file
diff --git a/accelerated-moblie-pages.php b/accelerated-moblie-pages.php
index d77c4674c..780486acb 100644
--- a/accelerated-moblie-pages.php
+++ b/accelerated-moblie-pages.php
@@ -3,7 +3,7 @@
Plugin Name: Accelerated Mobile Pages
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
Description: Accelerated Mobile Pages for WordPress
-Version: 0.7
+Version: 0.7.1
Author: Ahmed Kaludi, Mohammed Kaludi
Author URI: http://AhmedKaludi.com/
License: GPL2
diff --git a/readme.txt b/readme.txt
index 47bf0250c..ef004e57a 100644
--- a/readme.txt
+++ b/readme.txt
@@ -2,8 +2,8 @@
Contributors: mohammed_kaludi, ahmedkaludi
Tags: accelerated mobile pages, amp, mobile, amp project, google amp, amp wp
Requires at least: 3.0
-Tested up to: 4.5.2
-Stable tag: 0.7
+Tested up to: 4.5.3
+Stable tag: 0.7.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -26,7 +26,7 @@ Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on
* Separate WordPress Menu for AMP version
-**NOTE: Next Update of this plugin will be released on 4 August 2016.** [Here is the list of things](https://goo.gl/jDTPyg) that will be updated in the next update
+**NOTE: Next Big Update of this plugin will be released on 7th September 2016.
**How to test if AMP is working or not?**
@@ -115,4 +115,9 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
* Navigation Validation bug fixed
* Two more validation bugs fixed ('role' and 'tabindex' attribute)
* Featured image automatically hides if it is not present
-* Validation issues in the images of the post's the_content
\ No newline at end of file
+* Validation issues in the images of the post's the_content
+
+= 0.7.1 =
+* Bug #24 (Github) fixed
+* Strip Style tags for faster & better validation
+* Bug #21 (Github) fixed
\ No newline at end of file
diff --git a/themes/default/functions.php b/themes/default/functions.php
index 4551b1ae4..d97da9c8e 100644
--- a/themes/default/functions.php
+++ b/themes/default/functions.php
@@ -368,8 +368,20 @@ function amp_image_tag($content) {
$content = strtr($content, $replace);
return $content;
}
-
add_filter('the_content','amp_image_tag');
+// Strip the styles
+add_filter( 'the_content', 'the_content_filter', 20 );
+function the_content_filter( $content ) {
+ $content = preg_replace('#(.*?)
#i', '\1
', $content);
+ $content = preg_replace('#(.*?)#i', '\1', $content);
+ $content = preg_replace('#(.*?)#i', '\1
', $content);
+ $content = preg_replace('#(.*?)#i', '', $content);
+ $content = preg_replace('#(.*?)#i', '\1', $content);
+ $content = preg_replace('#(.*?)#i', '\1
', $content);
+ $content = preg_replace('#(.*?)#i', '\1 | ', $content);
+ $content = preg_replace('#(.*?)#i', '\1', $content);
+ return $content;
+}
?>
\ No newline at end of file