AMP for WP – Accelerated Mobile Pages - Version 0.9.98.14

Version Description

(7th OCTOBER 2019) = * Fixed: Value Attribute Stripping out from the forms added in the content. #3689 * Fixed: Remove AAWP from extension list #3735 * Fixed: Data is not saving while Importing options from the json file #3667 * Fixed: Debug warning #3723, #3729, #3730, #3731

Download this release

Release Info

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

Code changes from version 0.9.98.13 to 0.9.98.14

README.md 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: 5.2.3
7
- Stable tag: 0.9.98.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,12 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
194
  = 0.9.98.13 (27th SEPTEMBER 2019) =
195
  * Improvements: Need to create an option to clear the cache in tree shaking #3680
196
  * Improvements: Only get the required dashicons for Admin Toolbar #3707
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.3
7
+ Stable tag: 0.9.98.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 0.9.98.14 (7th OCTOBER 2019) =
195
+ * Fixed: Value Attribute Stripping out from the forms added in the content. #3689
196
+ * Fixed: Remove AAWP from extension list #3735
197
+ * Fixed: Data is not saving while Importing options from the json file #3667
198
+ * Fixed: Debug warning #3723, #3729, #3730, #3731
199
+
200
  = 0.9.98.13 (27th SEPTEMBER 2019) =
201
  * Improvements: Need to create an option to clear the cache in tree shaking #3680
202
  * Improvements: Only get the required dashicons for Admin Toolbar #3707
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.98.13
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','0.9.98.13');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
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.98.14
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','0.9.98.14');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
3
  = 0.9.98.13 (27th SEPTEMBER 2019) =
4
  * Improvements: Need to create an option to clear the cache in tree shaking #3680
5
  * Improvements: Only get the required dashicons for Admin Toolbar #3707
1
  == Changelog ==
2
 
3
+ = 0.9.98.14 (7th OCTOBER 2019) =
4
+ * Fixed: Value Attribute Stripping out from the forms added in the content. #3689
5
+ * Fixed: Remove AAWP from extension list #3735
6
+ * Fixed: Data is not saving while Importing options from the json file #3667
7
+ * Fixed: Debug warning #3723, #3729, #3730, #3731
8
+
9
  = 0.9.98.13 (27th SEPTEMBER 2019) =
10
  * Improvements: Need to create an option to clear the cache in tree shaking #3680
11
  * Improvements: Only get the required dashicons for Admin Toolbar #3707
includes/features/performance/performance-functions.php CHANGED
@@ -198,12 +198,12 @@ if( !function_exists("ampforwp_tree_shaking_purify_amphtml") ){
198
  $tmpDoc->loadHTML($completeContent);
199
  $font_css = '';
200
  if('swift-icons'==ampforwp_get_setting('ampforwp_font_icon')){
201
- preg_match_all("/@font-face\s\{(.*?)\}/i", $completeContent, $matches);
202
  foreach ($matches[0] as $key => $value) {
203
  $font_css .= $value;
204
  }
205
  }
206
- preg_match_all("/@font-face{(.*?)\}/i", $completeContent, $matches1);
207
  foreach ($matches1[0] as $key => $value) {
208
  $font_css .= $value;
209
  }
198
  $tmpDoc->loadHTML($completeContent);
199
  $font_css = '';
200
  if('swift-icons'==ampforwp_get_setting('ampforwp_font_icon')){
201
+ preg_match_all("/@font-face\s\{(.*?)\}/si", $completeContent, $matches);
202
  foreach ($matches[0] as $key => $value) {
203
  $font_css .= $value;
204
  }
205
  }
206
+ preg_match_all("/@font-face{(.*?)\}/si", $completeContent, $matches1);
207
  foreach ($matches1[0] as $key => $value) {
208
  $font_css .= $value;
209
  }
includes/features/structure-data/structured-data-functions.php CHANGED
@@ -280,9 +280,9 @@ function ampforwp_structured_data_type( $metadata ) {
280
  }
281
  }
282
 
283
- if( $post->post_type == "post" && empty( $set_sd_post )){
284
  return;
285
- }elseif($post->post_type == "page" && empty( $set_sd_page )) {
286
  return;
287
  }
288
 
280
  }
281
  }
282
 
283
+ if( isset( $post->post_type ) && $post->post_type == "post" && empty( $set_sd_post )){
284
  return;
285
+ }elseif(isset( $post->post_type ) && $post->post_type == "page" && empty( $set_sd_page )) {
286
  return;
287
  }
288
 
includes/options/admin-config.php CHANGED
@@ -535,18 +535,7 @@ $extension_listing_array = array(
535
  'item_name'=>'Table Of Content Plus For AMP',
536
  'store_url'=>'https://accounts.ampforwp.com',
537
  'is_activated'=>(is_plugin_active('table-of-content-plus-for-amp/table-of-content-plus-for-amp.php')? 1 : 2),
538
- ),
539
- array(
540
- 'name'=>'AAWP for AMP',
541
- 'desc'=>'Automatically Adds Amazon Affiliates Compatibility to your AMP version',
542
- 'img_src'=> AMPFORWP_IMAGE_DIR . '/click.png',
543
- 'price'=>'$39',
544
- 'url_link'=>'http://ampforwp.com/addons/aawp-for-amp/',
545
- 'plugin_active_path'=> 'aawp-for-amp/aawp-for-amp.php',
546
- 'item_name'=>'AAWP for AMP',
547
- 'store_url'=>'https://accounts.ampforwp.com',
548
- 'is_activated'=>(function_exists('aawp_for_amp_plugin_updater')? 1 : 2),
549
- ),
550
  );
551
  $viewAllExtensions = array(
552
  'name'=>'View All Extensions',
535
  'item_name'=>'Table Of Content Plus For AMP',
536
  'store_url'=>'https://accounts.ampforwp.com',
537
  'is_activated'=>(is_plugin_active('table-of-content-plus-for-amp/table-of-content-plus-for-amp.php')? 1 : 2),
538
+ )
 
 
 
 
 
 
 
 
 
 
 
539
  );
540
  $viewAllExtensions = array(
541
  'name'=>'View All Extensions',
includes/options/redux-core/inc/extensions/import_export/import_export/field_import_export.js CHANGED
@@ -1,73 +1,83 @@
1
- /*global jQuery, document, redux*/
2
-
3
- (function( $ ) {
4
  "use strict";
5
-
6
- redux.field_objects = redux.field_objects || {};
7
- redux.field_objects.import_export = redux.field_objects.import_export || {};
8
-
9
- redux.field_objects.import_export.init = function( selector ) {
10
- if ( !selector ) {
11
- selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-import_export:visible' );
12
- }
13
-
14
- $( selector ).each(
15
- function() {
16
- var el = $( this );
17
- var parent = el;
18
- if ( !el.hasClass( 'redux-field-container' ) ) {
19
- parent = el.parents( '.redux-field-container:first' );
20
- }
21
- if ( parent.is( ":hidden" ) ) { // Skip hidden fields
22
- return;
23
- }
24
- if ( parent.hasClass( 'redux-field-init' ) ) {
25
- parent.removeClass( 'redux-field-init' );
26
- } else {
27
- return;
28
- }
29
- el.each(
30
- function() {
31
- $( '#redux-import' ).click(
32
- function( e ) {
33
- if ( $( '#import-code-value' ).val() === "" && $( '#import-link-value' ).val() === "" ) {
34
- e.preventDefault();
35
- return false;
36
- }
37
- window.onbeforeunload = null;
38
- redux.args.ajax_save = false;
39
- }
40
- );
41
- var options = redux.options;
42
- options['redux-backup'] = 1;
43
- $( '#redux-export-code' ).text( JSON.stringify( options ) ).focus().select();
44
-
45
- var textBox1 = document.getElementById( "redux-export-code" );
46
- textBox1.onfocus = function() {
47
- textBox1.select();
48
- // Work around Chrome's little problem
49
- textBox1.onmouseup = function() {
50
- // Prevent further mouseup intervention
51
- textBox1.onmouseup = null;
52
- return false;
53
- };
54
- };
55
- var textBox2 = document.getElementById( "import-code-value" );
56
- textBox2.onfocus = function() {
57
- textBox2.select();
58
- // Work around Chrome's little problem
59
- textBox2.onmouseup = function() {
60
- // Prevent further mouseup intervention
61
- textBox2.onmouseup = null;
62
- return false;
63
- };
64
- };
65
-
66
  }
67
- );
68
- }
69
- );
70
- };
71
- })( jQuery );
72
-
73
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ! function(e) {
 
 
2
  "use strict";
3
+ redux.field_objects = redux.field_objects || {}, redux.field_objects.import_export = redux.field_objects.import_export || {}, redux.field_objects.import_export.init = function(i) {
4
+ i || (i = e(document).find(".redux-group-tab:visible").find(".redux-container-import_export:visible")), e(i).each(function() {
5
+ var i = e(this),
6
+ t = i;
7
+ i.hasClass("redux-field-container") || (t = i.parents(".redux-field-container:first")), t.is(":hidden") || t.hasClass("redux-field-init") && (t.removeClass("redux-field-init"), i.each(function() {
8
+ e("#redux-import").click(function(i) {
9
+ return "" === e("#import-code-value").val() && "" === e("#import-link-value").val() ? (i.preventDefault(), !1) : (window.onbeforeunload = null, void(redux.args.ajax_save = !1))
10
+ }), e(this).find("#redux-import-code-button").click(function() {
11
+ var i = e("#redux-import-code-wrapper");
12
+ e("#redux-import-link-wrapper").is(":visible") ? (e("#import-link-value").text(""), e("#redux-import-link-wrapper").slideUp("fast", function() {
13
+ i.slideDown("fast", function() {
14
+ e("#import-code-value").focus()
15
+ })
16
+ })) : i.is(":visible") ? i.slideUp() : i.slideDown("medium", function() {
17
+ e("#import-code-value").focus()
18
+ })
19
+ }), e(this).find("#redux-import-link-button").click(function() {
20
+ var i = e("#redux-import-link-wrapper");
21
+ e("#redux-import-code-wrapper").is(":visible") ? (e("#import-code-value").text(""), e("#redux-import-code-wrapper").slideUp("fast", function() {
22
+ i.slideDown("fast", function() {
23
+ e("#import-link-value").focus()
24
+ })
25
+ })) : i.is(":visible") ? i.slideUp() : i.slideDown("medium", function() {
26
+ e("#import-link-value").focus()
27
+ })
28
+ }), e(this).find("#redux-export-code-copy").click(function() {
29
+ var i = e("#redux-export-code");
30
+ e("#redux-export-link-value").is(":visible") ? e("#redux-export-link-value").slideUp("fast", function() {
31
+ i.slideDown("medium", function() {
32
+ var i = redux.options;
33
+ i["redux-backup"] = 1, e(this).text(JSON.stringify(i)).focus().select()
34
+ })
35
+ }) : i.is(":visible") ? i.slideUp().text("") : i.slideDown("medium", function() {
36
+ var i = redux.options;
37
+ i["redux-backup"] = 1, e(this).text(JSON.stringify(i)).focus().select()
38
+ })
39
+ }), e(this).find("textarea").focusout(function() {
40
+ e(this).attr("id"), e(this)
41
+ }), e(this).find("#redux-export-link").click(function() {
42
+ var i = e("#redux-export-link-value");
43
+ e("#redux-export-code").is(":visible") ? e("#redux-export-code").slideUp("fast", function() {
44
+ i.slideDown().focus().select()
45
+ }) : i.is(":visible") ? i.slideUp() : i.slideDown("medium", function() {
46
+ e(this).focus().select()
47
+ })
48
+ });
49
+ var i = document.getElementById("redux-export-code");
50
+ i.onfocus = function() {
51
+ i.select(), i.onmouseup = function() {
52
+ return i.onmouseup = null, !1
53
+ }
54
+ };
55
+ var t = document.getElementById("import-code-value");
56
+ t.onfocus = function() {
57
+ t.select(), t.onmouseup = function() {
58
+ return t.onmouseup = null, !1
 
 
 
 
 
59
  }
60
+ }, e("#redux-import-from-file").click(function() {
61
+ e("#redux-import-file-type").trigger("click")
62
+ }), e("#redux-import-file-type").on("change", function() {
63
+ if (1 == confirm("Are you sure! You want import the file. Please make sure to take backup of your AMP Settings before importing, it will override your AMP Settings.")) {
64
+ var i = e("#ampforwp_import_nonce").val(),
65
+ t = e("#redux-import-file-type").prop("files")[0],
66
+ o = new FormData;
67
+ o.append("file", t), o.append("action", "ampforwp_import_file_from_file"), o.append("security", i), e.ajax({
68
+ url: ajaxurl,
69
+ cache: !1,
70
+ contentType: !1,
71
+ processData: !1,
72
+ data: o,
73
+ type: "post",
74
+ success: function(i) {
75
+ "0" != (i = i.replace(/}0/i, "}")) ? (e("#import-code-value").hide(), e("#import-code-value").val(i), e("#redux-import").trigger("click")) : e("#admin-import-file-name").html("Unable to import the file.")
76
+ }
77
+ })
78
+ } else location.reload()
79
+ })
80
+ }))
81
+ })
82
+ }
83
+ }(jQuery);
includes/options/redux-core/inc/extensions/import_export/import_export/field_import_export.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.import_export=redux.field_objects.import_export||{},redux.field_objects.import_export.init=function(i){i||(i=e(document).find(".redux-group-tab:visible").find(".redux-container-import_export:visible")),e(i).each(function(){var i=e(this),t=i;i.hasClass("redux-field-container")||(t=i.parents(".redux-field-container:first")),t.is(":hidden")||t.hasClass("redux-field-init")&&(t.removeClass("redux-field-init"),i.each(function(){e("#redux-import").click(function(i){return""===e("#import-code-value").val()&&""===e("#import-link-value").val()?(i.preventDefault(),!1):(window.onbeforeunload=null,void(redux.args.ajax_save=!1))}),e(this).find("#redux-import-code-button").click(function(){var i=e("#redux-import-code-wrapper");e("#redux-import-link-wrapper").is(":visible")?(e("#import-link-value").text(""),e("#redux-import-link-wrapper").slideUp("fast",function(){i.slideDown("fast",function(){e("#import-code-value").focus()})})):i.is(":visible")?i.slideUp():i.slideDown("medium",function(){e("#import-code-value").focus()})}),e(this).find("#redux-import-link-button").click(function(){var i=e("#redux-import-link-wrapper");e("#redux-import-code-wrapper").is(":visible")?(e("#import-code-value").text(""),e("#redux-import-code-wrapper").slideUp("fast",function(){i.slideDown("fast",function(){e("#import-link-value").focus()})})):i.is(":visible")?i.slideUp():i.slideDown("medium",function(){e("#import-link-value").focus()})}),e(this).find("#redux-export-code-copy").click(function(){var i=e("#redux-export-code");e("#redux-export-link-value").is(":visible")?e("#redux-export-link-value").slideUp("fast",function(){i.slideDown("medium",function(){var i=redux.options;i["redux-backup"]=1,e(this).text(JSON.stringify(i)).focus().select()})}):i.is(":visible")?i.slideUp().text(""):i.slideDown("medium",function(){var i=redux.options;i["redux-backup"]=1,e(this).text(JSON.stringify(i)).focus().select()})}),e(this).find("textarea").focusout(function(){e(this).attr("id"),e(this)}),e(this).find("#redux-export-link").click(function(){var i=e("#redux-export-link-value");e("#redux-export-code").is(":visible")?e("#redux-export-code").slideUp("fast",function(){i.slideDown().focus().select()}):i.is(":visible")?i.slideUp():i.slideDown("medium",function(){e(this).focus().select()})});var i=document.getElementById("redux-export-code");i.onfocus=function(){i.select(),i.onmouseup=function(){return i.onmouseup=null,!1}};var t=document.getElementById("import-code-value");t.onfocus=function(){t.select(),t.onmouseup=function(){return t.onmouseup=null,!1}},e("#redux-import-from-file").click(function(){e("#redux-import-file-type").trigger("click")}),e("#redux-import-file-type").on("change",function(){if(1==confirm("Are you sure! You want import the file. Please make sure to take backup of your AMP Settings before importing, it will override your AMP Settings.")){var i=e("#ampforwp_import_nonce").val(),t=e("#redux-import-file-type").prop("files")[0],o=new FormData;o.append("file",t),o.append("action","ampforwp_import_file_from_file"),o.append("security",i),e.ajax({url:ajaxurl,cache:!1,contentType:!1,processData:!1,data:o,type:"post",success:function(i){"0"!=i?(e("#import-code-value").hide(),e("#import-code-value").val(i),e("#redux-import").trigger("click")):e("#admin-import-file-name").html("Unable to import the file.")}})}else location.reload()})}))})}}(jQuery);
1
+ !function(e){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.import_export=redux.field_objects.import_export||{},redux.field_objects.import_export.init=function(i){i||(i=e(document).find(".redux-group-tab:visible").find(".redux-container-import_export:visible")),e(i).each(function(){var i=e(this),t=i;i.hasClass("redux-field-container")||(t=i.parents(".redux-field-container:first")),t.is(":hidden")||t.hasClass("redux-field-init")&&(t.removeClass("redux-field-init"),i.each(function(){e("#redux-import").click(function(i){return""===e("#import-code-value").val()&&""===e("#import-link-value").val()?(i.preventDefault(),!1):(window.onbeforeunload=null,void(redux.args.ajax_save=!1))}),e(this).find("#redux-import-code-button").click(function(){var i=e("#redux-import-code-wrapper");e("#redux-import-link-wrapper").is(":visible")?(e("#import-link-value").text(""),e("#redux-import-link-wrapper").slideUp("fast",function(){i.slideDown("fast",function(){e("#import-code-value").focus()})})):i.is(":visible")?i.slideUp():i.slideDown("medium",function(){e("#import-code-value").focus()})}),e(this).find("#redux-import-link-button").click(function(){var i=e("#redux-import-link-wrapper");e("#redux-import-code-wrapper").is(":visible")?(e("#import-code-value").text(""),e("#redux-import-code-wrapper").slideUp("fast",function(){i.slideDown("fast",function(){e("#import-link-value").focus()})})):i.is(":visible")?i.slideUp():i.slideDown("medium",function(){e("#import-link-value").focus()})}),e(this).find("#redux-export-code-copy").click(function(){var i=e("#redux-export-code");e("#redux-export-link-value").is(":visible")?e("#redux-export-link-value").slideUp("fast",function(){i.slideDown("medium",function(){var i=redux.options;i["redux-backup"]=1,e(this).text(JSON.stringify(i)).focus().select()})}):i.is(":visible")?i.slideUp().text(""):i.slideDown("medium",function(){var i=redux.options;i["redux-backup"]=1,e(this).text(JSON.stringify(i)).focus().select()})}),e(this).find("textarea").focusout(function(){e(this).attr("id"),e(this)}),e(this).find("#redux-export-link").click(function(){var i=e("#redux-export-link-value");e("#redux-export-code").is(":visible")?e("#redux-export-code").slideUp("fast",function(){i.slideDown().focus().select()}):i.is(":visible")?i.slideUp():i.slideDown("medium",function(){e(this).focus().select()})});var i=document.getElementById("redux-export-code");i.onfocus=function(){i.select(),i.onmouseup=function(){return i.onmouseup=null,!1}};var t=document.getElementById("import-code-value");t.onfocus=function(){t.select(),t.onmouseup=function(){return t.onmouseup=null,!1}},e("#redux-import-from-file").click(function(){e("#redux-import-file-type").trigger("click")}),e("#redux-import-file-type").on("change",function(){if(1==confirm("Are you sure! You want import the file. Please make sure to take backup of your AMP Settings before importing, it will override your AMP Settings.")){var i=e("#ampforwp_import_nonce").val(),t=e("#redux-import-file-type").prop("files")[0],o=new FormData;o.append("file",t),o.append("action","ampforwp_import_file_from_file"),o.append("security",i),e.ajax({url:ajaxurl,cache:!1,contentType:!1,processData:!1,data:o,type:"post",success:function(i){"0"!=(i=i.replace(/}0/i,"}"))?(e("#import-code-value").hide(),e("#import-code-value").val(i),e("#redux-import").trigger("click")):e("#admin-import-file-name").html("Unable to import the file.")}})}else location.reload()})}))})}}(jQuery);
includes/redirect.php CHANGED
@@ -261,7 +261,7 @@ function ampforwp_redirection() {
261
  session_start();
262
  }
263
 
264
- if ( isset( $_SESSION['ampforwp_mobile'] ) && 'mobile-on' == $_SESSION['ampforwp_amp_mode'] && 'exit' == $_SESSION['ampforwp_mobile'] ) {
265
  return;
266
  }
267
 
261
  session_start();
262
  }
263
 
264
+ if ( isset( $_SESSION['ampforwp_mobile'] ) && (isset($_SESSION['ampforwp_amp_mode']) && 'mobile-on' == $_SESSION['ampforwp_amp_mode']) && 'exit' == $_SESSION['ampforwp_mobile'] ) {
265
  return;
266
  }
267
 
includes/vendor/amp/includes/sanitizers/class-amp-tree-style-sanitizer.php CHANGED
@@ -1332,7 +1332,7 @@ class AMP_treeshaking_Style_Sanitizer extends AMP_tree_Base_Sanitizer {
1332
  $this->parse_import_stylesheet( $css_item, $css_list, $options )
1333
  );
1334
  } elseif ( $css_item instanceof AtRuleSet ) {
1335
- if ( ! in_array( $css_item->atRuleName(), $options['allowed_at_rules'], true ) ) {
1336
  $error = array(
1337
  'code' => self::ILLEGAL_AT_RULE_ERROR_CODE,
1338
  'at_rule' => $css_item->atRuleName(),
@@ -1349,7 +1349,7 @@ class AMP_treeshaking_Style_Sanitizer extends AMP_tree_Base_Sanitizer {
1349
  );
1350
  }
1351
  } elseif ( $css_item instanceof KeyFrame ) {
1352
- if ( ! in_array( 'keyframes', $options['allowed_at_rules'], true ) ) {
1353
  $error = array(
1354
  'code' => self::ILLEGAL_AT_RULE_ERROR_CODE,
1355
  'at_rule' => $css_item->atRuleName(),
@@ -1468,7 +1468,7 @@ class AMP_treeshaking_Style_Sanitizer extends AMP_tree_Base_Sanitizer {
1468
  $properties = $ruleset->getRules();
1469
  foreach ( $properties as $property ) {
1470
  $vendorless_property_name = preg_replace( '/^-\w+-/', '', $property->getRule() );
1471
- if ( ! in_array( $vendorless_property_name, $options['property_whitelist'], true ) ) {
1472
  $error = array(
1473
  'code' => 'illegal_css_property',
1474
  'property_name' => $property->getRule(),
@@ -1667,7 +1667,7 @@ class AMP_treeshaking_Style_Sanitizer extends AMP_tree_Base_Sanitizer {
1667
  $properties = $rules->getRules();
1668
  foreach ( $properties as $property ) {
1669
  $vendorless_property_name = preg_replace( '/^-\w+-/', '', $property->getRule() );
1670
- if ( ! in_array( $vendorless_property_name, $options['property_whitelist'], true ) ) {
1671
  $error = array(
1672
  'code' => 'illegal_css_property',
1673
  'property_name' => $property->getRule(),
1332
  $this->parse_import_stylesheet( $css_item, $css_list, $options )
1333
  );
1334
  } elseif ( $css_item instanceof AtRuleSet ) {
1335
+ if ( is_array($options['allowed_at_rules']) && ! in_array( $css_item->atRuleName(), $options['allowed_at_rules'], true ) ) {
1336
  $error = array(
1337
  'code' => self::ILLEGAL_AT_RULE_ERROR_CODE,
1338
  'at_rule' => $css_item->atRuleName(),
1349
  );
1350
  }
1351
  } elseif ( $css_item instanceof KeyFrame ) {
1352
+ if (is_array($options['allowed_at_rules']) && ! in_array( 'keyframes', $options['allowed_at_rules'], true ) ) {
1353
  $error = array(
1354
  'code' => self::ILLEGAL_AT_RULE_ERROR_CODE,
1355
  'at_rule' => $css_item->atRuleName(),
1468
  $properties = $ruleset->getRules();
1469
  foreach ( $properties as $property ) {
1470
  $vendorless_property_name = preg_replace( '/^-\w+-/', '', $property->getRule() );
1471
+ if ( is_array($options['property_whitelist']) && ! in_array( $vendorless_property_name, $options['property_whitelist'], true ) ) {
1472
  $error = array(
1473
  'code' => 'illegal_css_property',
1474
  'property_name' => $property->getRule(),
1667
  $properties = $rules->getRules();
1668
  foreach ( $properties as $property ) {
1669
  $vendorless_property_name = preg_replace( '/^-\w+-/', '', $property->getRule() );
1670
+ if ( is_array($options['property_whitelist']) && ! in_array( $vendorless_property_name, $options['property_whitelist'], true ) ) {
1671
  $error = array(
1672
  'code' => 'illegal_css_property',
1673
  'property_name' => $property->getRule(),
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: 5.2.3
7
- Stable tag: 0.9.98.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,12 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
194
  = 0.9.98.13 (27th SEPTEMBER 2019) =
195
  * Improvements: Need to create an option to clear the cache in tree shaking #3680
196
  * Improvements: Only get the required dashicons for Admin Toolbar #3707
@@ -199,29 +205,5 @@ You can contact us from [here](https://ampforwp.com/contact/)
199
  * Fixed: Menu Auto closing when # in the url #3633
200
  * Fixed: Facebook Like script not loading #3633
201
 
202
- = 0.9.98.12 (25th SEPTEMBER 2019) =
203
- * Improvements: User wants Wordpress admin toolbar in the AMP area #3450
204
- * Improvements: we want the amp menu showing from left or right side both. #3095
205
- * Improvements: Add feature to increase width for facebook like button and also add feature of data-action="recommend" #3241
206
- * Improvements: Improvements in Design 1 2 and 3 option panel in Header section #3642
207
- * Fixed: Update Stops Google Analytics tracking #3690
208
- * Fixed: Lightbox not working for single images #3683
209
- * Fixed: Language of Menu not changing when changing website language #3522
210
- * Fixed: We need to allow people to turn off the social section fully #3613
211
- * Fixed: Ui Design issues #3616
212
- * Fixed: Dropcap option should only be enabled on the posts, not from pages. #3614
213
- * Fixed: Social share position is not working in single design 2#3627
214
- * Fixed: AMP text module is not working in Widget area #3644
215
- * Fixed: Social media icons and comments should be below the post content on pages #3647
216
- * Fixed: Breadcrumbs are breaking after enabling ""Post title on Breadcrumb" option #3648
217
- * Fixed: line share link is getting added when sharing on telegram#3666
218
- * Fixed: In social sharing Twitter Handle and Pretty Permalinks for Twitter Share? need to display child option of Twitter#3656
219
- * Fixed: Extension license dashboard improvements #3654
220
- * Fixed: Make the chat bubble into a email box for faster input #405
221
- * Fixed: Option to specify certain taxonomy only in Instant Article Feeds #1489
222
- * Fixed: Need to remove Legacy Pagebuilder option Safely #3609
223
- * Fixed: Default heading tag should load if no option is selected in Header Module #3651
224
- * Fixed: Pretty Permalinks for Twitter Share? option is not working #3662
225
-
226
 
227
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.3
7
+ Stable tag: 0.9.98.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 0.9.98.14 (7th OCTOBER 2019) =
195
+ * Fixed: Value Attribute Stripping out from the forms added in the content. #3689
196
+ * Fixed: Remove AAWP from extension list #3735
197
+ * Fixed: Data is not saving while Importing options from the json file #3667
198
+ * Fixed: Debug warning #3723, #3729, #3730, #3731
199
+
200
  = 0.9.98.13 (27th SEPTEMBER 2019) =
201
  * Improvements: Need to create an option to clear the cache in tree shaking #3680
202
  * Improvements: Only get the required dashicons for Admin Toolbar #3707
205
  * Fixed: Menu Auto closing when # in the url #3633
206
  * Fixed: Facebook Like script not loading #3633
207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -576,7 +576,6 @@ function ampforwp_new_dir( $dir ) {
576
  function ampforwp_the_content_filter( $content ) {
577
  $content = preg_replace('/property=[^>]*/', '', $content);
578
  $content = preg_replace('/vocab=[^>]*/', '', $content);
579
- $content = preg_replace('/(<[^>]+) value=[^>]*/', '$1', $content);
580
  $content = preg_replace('/noshade=[^>]*/', '', $content);
581
  $content = preg_replace('/contenteditable=[^>]*/', '', $content);
582
  $content = preg_replace('/non-refundable=[^>]*/', '', $content);
@@ -4915,7 +4914,7 @@ if( ! function_exists( 'ampforwp_view_amp_admin_bar' ) ) {
4915
  $current_access = current_user_can('edit_posts',$current_user );
4916
  }
4917
  // Check for Screen base, user ability to read and visibility
4918
- if ($current_access && current_user_can('read_post', $post->ID )
4919
  && ( $wp_post_types[$post->post_type]->public )
4920
  && ( $wp_post_types[$post->post_type]->show_in_admin_bar ) ) {
4921
  // Check if current post type is AMPed or not
@@ -5770,10 +5769,12 @@ function ampforwp_remove_ahref_lightbox_in_amp( $content ) {
5770
  if( count($matches[3])){
5771
  for( $i=0;$i<count($matches[3]);$i++){
5772
  $href_url = $matches[3][$i];
5773
- $href_url = explode('/', $href_url);
5774
- $href_url = end($href_url);
5775
- $href_url = pathinfo($href_url, PATHINFO_FILENAME);
5776
- if($matches[3][$i] == $matches[6][$i] || strpos($matches[6][$i], $href_url) !== false){
 
 
5777
  $href = $matches[3][$i];
5778
  $src = $matches[6][$i];
5779
  $href_src = str_replace( '/', '\/', esc_url($href));
576
  function ampforwp_the_content_filter( $content ) {
577
  $content = preg_replace('/property=[^>]*/', '', $content);
578
  $content = preg_replace('/vocab=[^>]*/', '', $content);
 
579
  $content = preg_replace('/noshade=[^>]*/', '', $content);
580
  $content = preg_replace('/contenteditable=[^>]*/', '', $content);
581
  $content = preg_replace('/non-refundable=[^>]*/', '', $content);
4914
  $current_access = current_user_can('edit_posts',$current_user );
4915
  }
4916
  // Check for Screen base, user ability to read and visibility
4917
+ if ($current_access && (isset($post->ID) && current_user_can('read_post', $post->ID ))
4918
  && ( $wp_post_types[$post->post_type]->public )
4919
  && ( $wp_post_types[$post->post_type]->show_in_admin_bar ) ) {
4920
  // Check if current post type is AMPed or not
5769
  if( count($matches[3])){
5770
  for( $i=0;$i<count($matches[3]);$i++){
5771
  $href_url = $matches[3][$i];
5772
+ if (!empty($href_url)) {
5773
+ $href_url = explode('/', $href_url);
5774
+ $href_url = end($href_url);
5775
+ $href_url = pathinfo($href_url, PATHINFO_FILENAME);
5776
+ }
5777
+ if($matches[3][$i] == $matches[6][$i] || (!empty($href_url) && strpos($matches[6][$i], $href_url) !== false)){
5778
  $href = $matches[3][$i];
5779
  $src = $matches[6][$i];
5780
  $href_src = str_replace( '/', '\/', esc_url($href));