Skip to content

Commit

Permalink
0.7.1 release
Browse files Browse the repository at this point in the history
= 0.7.1 =
* Bug #24 (Github) fixed
* Strip Style tags for faster & better validation
* Bug #21 (Github) fixed
  • Loading branch information
ahmedkaludi committed Aug 12, 2016
1 parent f395d45 commit 6682524
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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?**
Expand Down Expand Up @@ -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
* 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
2 changes: 1 addition & 1 deletion accelerated-moblie-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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?**
Expand Down Expand Up @@ -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
* 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
14 changes: 13 additions & 1 deletion themes/default/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('#<p.*?>(.*?)</p>#i', '<p>\1</p>', $content);
$content = preg_replace('#<span.*?>(.*?)</span>#i', '<span>\1</span>', $content);
$content = preg_replace('#<ol.*?>(.*?)</ol>#i', '<ol>\1</ol>', $content);
$content = preg_replace('#<ul.*?>(.*?)</ul>#i', '<ul>\1</ul>', $content);
$content = preg_replace('#<li.*?>(.*?)</li>#i', '<li>\1</li>', $content);
$content = preg_replace('#<div.*?>(.*?)</div>#i', '<div>\1</div>', $content);
$content = preg_replace('#<td.*?>(.*?)</td>#i', '<td>\1</td>', $content);
$content = preg_replace('#<a style=".*?" href="(.*?)">(.*?)</a>#i', '<a href="\1">\1</a>', $content);
return $content;
}
?>

0 comments on commit 6682524

Please sign in to comment.