AMP for WP – Accelerated Mobile Pages - Version 1.0.77.54.1

Version Description

(22nd November 2022) = * Fixed: PHP Fatal error: Uncaught Value Error #5339

Download this release

Release Info

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

Code changes from version 1.0.77.54 to 1.0.77.54.1

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: 6.1
7
- Stable tag: 1.0.77.54
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,6 +197,10 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
 
 
 
 
200
  = 1.0.77.54 (21st November 2022) =
201
  * Fixed: Tested compatibility with wp 6.1 #5331
202
  * Fixed: Removed deprecated warning in php 8.1.10 #5333
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 6.1
7
+ Stable tag: 1.0.77.54.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
197
 
198
  == Changelog ==
199
 
200
+
201
+ = 1.0.77.54.1 (22nd November 2022) =
202
+ * Fixed: PHP Fatal error: Uncaught Value Error #5339
203
+
204
  = 1.0.77.54 (21st November 2022) =
205
  * Fixed: Tested compatibility with wp 6.1 #5331
206
  * Fixed: Removed deprecated warning in php 8.1.10 #5333
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: 1.0.77.54
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','1.0.77.54');
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: 1.0.77.54.1
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','1.0.77.54.1');
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,8 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 1.0.77.54 (21st November 2022) =
4
  * Fixed: Tested compatibility with wp 6.1 #5331
5
  * Fixed: Removed deprecated warning in php 8.1.10 #5333
1
  == Changelog ==
2
 
3
+ = 1.0.77.54.1 (22nd November 2022) =
4
+ * Fixed: PHP Fatal error: Uncaught Value Error #5339
5
+
6
  = 1.0.77.54 (21st November 2022) =
7
  * Fixed: Tested compatibility with wp 6.1 #5331
8
  * Fixed: Removed deprecated warning in php 8.1.10 #5333
includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php CHANGED
@@ -1091,7 +1091,8 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
1091
  * Check 'value_casei' - case insensitive
1092
  */
1093
  if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ] ) ) {
1094
- $rule_value = strtolower( $attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ] );
 
1095
  if ( $node->hasAttribute( $attr_name ) ) {
1096
  $attr_value = strtolower( $node->getAttribute( $attr_name ) );
1097
  if ( $attr_value === (string) $rule_value ) {
1091
  * Check 'value_casei' - case insensitive
1092
  */
1093
  if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ] ) ) {
1094
+
1095
+ $rule_value = !is_array($attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ])?strtolower( $attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ] ):$attr_spec_rule[ AMP_Rule_Spec::VALUE_CASEI ];
1096
  if ( $node->hasAttribute( $attr_name ) ) {
1097
  $attr_value = strtolower( $node->getAttribute( $attr_name ) );
1098
  if ( $attr_value === (string) $rule_value ) {
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: 6.1
7
- Stable tag: 1.0.77.54
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,9 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
197
  = 1.0.77.54 (21st November 2022) =
198
  * Fixed: Tested compatibility with wp 6.1 #5331
199
  * Fixed: Removed deprecated warning in php 8.1.10 #5333
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 6.1
7
+ Stable tag: 1.0.77.54.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
194
 
195
  == Changelog ==
196
 
197
+ = 1.0.77.54.1 (22nd November 2022) =
198
+ * Fixed: PHP Fatal error: Uncaught Value Error #5339
199
+
200
  = 1.0.77.54 (21st November 2022) =
201
  * Fixed: Tested compatibility with wp 6.1 #5331
202
  * Fixed: Removed deprecated warning in php 8.1.10 #5333
tests/bootstrap.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- // Exit if accessed directly
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
- $_tests_dir = getenv( 'WP_TESTS_DIR' );
7
- if ( ! $_tests_dir ) {
8
- $_tests_dir = '/tmp/wordpress-tests-lib';
9
- }
10
- define('PLUGIN_NAME','accelerated-mobile-pages');
11
- define('PLUGIN_FOLDER',basename(dirname( __DIR__ )));
12
- define('PLUGIN_PATH',PLUGIN_FOLDER.'/'.PLUGIN_NAME);
13
- // Activates this plugin in WordPress so it can be tested.
14
- $GLOBALS['wp_tests_options'] = array(
15
- 'active_plugins' => array( PLUGIN_PATH ),
16
- );
17
- require_once $_tests_dir . '/includes/functions.php';
18
- function _manually_load_plugin() {
19
- require dirname( __DIR__ ) . '/'.PLUGIN_NAME;
20
- }
21
- tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
22
- require $_tests_dir . '/includes/bootstrap.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/test-plugin.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- // Exit if accessed directly
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
- class PluginTest extends WP_UnitTestCase {
7
- // Check that that activation doesn't break
8
- function test_plugin_activated() {
9
- $this->assertTrue( is_plugin_active( PLUGIN_PATH ) );
10
- }
11
- }