AMP for WP – Accelerated Mobile Pages - Version 0.9.65.1

Version Description

(24nd October 2017) = * AMP Minifcation Issues fixed

Download this release

Release Info

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

Code changes from version 0.9.65 to 0.9.65.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.65
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.65');
22
 
23
  // any changes to AMP_QUERY_VAR should be refelected here
24
  function ampforwp_generate_endpoint(){
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.65.1
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.65.1');
22
 
23
  // any changes to AMP_QUERY_VAR should be refelected here
24
  function ampforwp_generate_endpoint(){
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/25
5
  Requires at least: 3.0
6
  Tested up to: 4.8.2
7
- Stable tag: 0.9.65
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -149,6 +149,9 @@ You can contact me using this url: http://ampforwp.com/contact/
149
 
150
  == Changelog ==
151
 
 
 
 
152
  = 0.9.65 (22nd October 2017) =
153
  * View more details on https://ampforwp.com/new/
154
  * Favicon for AMP #1039
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 4.8.2
7
+ Stable tag: 0.9.65.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
149
 
150
  == Changelog ==
151
 
152
+ = 0.9.65.1 (24nd October 2017) =
153
+ * AMP Minifcation Issues fixed
154
+
155
  = 0.9.65 (22nd October 2017) =
156
  * View more details on https://ampforwp.com/new/
157
  * Favicon for AMP #1039
templates/features.php CHANGED
@@ -4254,7 +4254,7 @@ function ampforwp_minify_html_output($content_buffer){
4254
  $mod = '/u';
4255
  else
4256
  $mod = '/s';
4257
- $buffer = str_replace(array (chr(13) . chr(10), chr(9)), array (chr(10), ''), $buffer);
4258
  $buffer = str_ireplace(array ('<script', '/script>', '<pre', '/pre>', '<textarea', '/textarea>', '<style', '/style>'), array ('M1N1FY-ST4RT<script', '/script>M1N1FY-3ND', 'M1N1FY-ST4RT<pre', '/pre>M1N1FY-3ND', 'M1N1FY-ST4RT<textarea', '/textarea>M1N1FY-3ND', 'M1N1FY-ST4RT<style', '/style>M1N1FY-3ND'), $buffer);
4259
  $split = explode('M1N1FY-3ND', $buffer);
4260
  $buffer = '';
@@ -4288,16 +4288,18 @@ function ampforwp_minify_html_output($content_buffer){
4288
  } else {
4289
  $process = $split[$i];
4290
  $asis = '';
4291
- }
4292
- $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/(\s)+' . $mod), array('>', '<', '\\1'), $process);
 
 
4293
  if ( $minify_html_comments != 'no' )
4294
  $process = preg_replace('/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->).)*-->' . $mod, '', $process);
4295
  $buffer .= $process.$asis;
4296
  }
4297
  $buffer = str_replace(array (chr(10) . '<script', chr(10) . '<style', '*/' . chr(10), 'M1N1FY-ST4RT'), array('<script', '<style', '*/', ''), $buffer);
4298
- $minify_html_xhtml = get_option( 'minify_html_xhtml' );
4299
- $minify_html_relative = get_option( 'minify_html_relative' );
4300
- $minify_html_scheme = get_option( 'minify_html_scheme' );
4301
  if ( $minify_html_xhtml == 'yes' && strtolower( substr( ltrim( $buffer ), 0, 15 ) ) == '<!doctype html>' )
4302
  $buffer = str_replace( ' />', '>', $buffer );
4303
  if ( $minify_html_relative == 'yes' )
4254
  $mod = '/u';
4255
  else
4256
  $mod = '/s';
4257
+ $buffer = str_replace(array (chr(13) . chr(10), chr(9)), array (chr(10), ' '), $buffer);
4258
  $buffer = str_ireplace(array ('<script', '/script>', '<pre', '/pre>', '<textarea', '/textarea>', '<style', '/style>'), array ('M1N1FY-ST4RT<script', '/script>M1N1FY-3ND', 'M1N1FY-ST4RT<pre', '/pre>M1N1FY-3ND', 'M1N1FY-ST4RT<textarea', '/textarea>M1N1FY-3ND', 'M1N1FY-ST4RT<style', '/style>M1N1FY-3ND'), $buffer);
4259
  $split = explode('M1N1FY-3ND', $buffer);
4260
  $buffer = '';
4288
  } else {
4289
  $process = $split[$i];
4290
  $asis = '';
4291
+ }
4292
+
4293
+ $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('>', '<', ' '), $process);
4294
+
4295
  if ( $minify_html_comments != 'no' )
4296
  $process = preg_replace('/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->).)*-->' . $mod, '', $process);
4297
  $buffer .= $process.$asis;
4298
  }
4299
  $buffer = str_replace(array (chr(10) . '<script', chr(10) . '<style', '*/' . chr(10), 'M1N1FY-ST4RT'), array('<script', '<style', '*/', ''), $buffer);
4300
+ $minify_html_xhtml = 'no';
4301
+ $minify_html_relative = 'no';
4302
+ $minify_html_scheme = 'no';
4303
  if ( $minify_html_xhtml == 'yes' && strtolower( substr( ltrim( $buffer ), 0, 15 ) ) == '<!doctype html>' )
4304
  $buffer = str_replace( ' />', '>', $buffer );
4305
  if ( $minify_html_relative == 'yes' )