AMP for WP – Accelerated Mobile Pages - Version 1.0.58.5

Version Description

(15th July 2020) = * Fixed: Duplicate title tag on non-amp #4631 * Fixed: Database deadlocks error #4618

Download this release

Release Info

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

Code changes from version 1.0.58.4 to 1.0.58.5

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.4.2
7
- Stable tag: 1.0.58.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,10 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
196
  = 1.0.58.4 (13th July 2020) =
197
  * Fixed: Website getting blank after 1.0.58 update
198
 
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.4.2
7
+ Stable tag: 1.0.58.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
193
 
194
  == Changelog ==
195
 
196
+ = 1.0.58.5 (15th July 2020) =
197
+ * Fixed: Duplicate title tag on non-amp #4631
198
+ * Fixed: Database deadlocks error #4618
199
+
200
  = 1.0.58.4 (13th July 2020) =
201
  * Fixed: Website getting blank after 1.0.58 update
202
 
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.58.4
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.58.4');
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.58.5
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.58.5');
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,9 @@
1
  == Changelog ==
2
 
 
 
 
 
3
  = 1.0.58.4 (13th July 2020) =
4
  * Fixed: Website getting blank after 1.0.58 update
5
 
1
  == Changelog ==
2
 
3
+ = 1.0.58.5 (15th July 2020) =
4
+ * Fixed: Duplicate title tag on non-amp #4631
5
+ * Fixed: Database deadlocks error #4618
6
+
7
  = 1.0.58.4 (13th July 2020) =
8
  * Fixed: Website getting blank after 1.0.58 update
9
 
includes/features/functions.php CHANGED
@@ -569,14 +569,6 @@ if(!function_exists('ampforwp_findInternalUrl')){
569
  }
570
  } // end ampforwp_findInternalUrl
571
 
572
- function ampforwp_is_amp_inURL($url){
573
- $urlArray = explode("/", $url);
574
- if( !in_array( AMPFORWP_AMP_QUERY_VAR , $urlArray ) ) {
575
- return false;
576
- }
577
- return true;
578
- }
579
-
580
  /* AMPforWP allowed html tags #1950
581
  * ampforwp_wp_kses_allowed_html()
582
  * This fucntion can be heavy for sanitizing items.
569
  }
570
  } // end ampforwp_findInternalUrl
571
 
 
 
 
 
 
 
 
 
572
  /* AMPforWP allowed html tags #1950
573
  * ampforwp_wp_kses_allowed_html()
574
  * This fucntion can be heavy for sanitizing items.
includes/features/structure-data/structured-data-functions.php CHANGED
@@ -438,12 +438,12 @@ function ampforwp_sd_sitenavigation(){
438
  }
439
  }
440
  if ( 'amp-menu' == $type ) {
441
- set_transient('ampforwp_header_sd_menu', true , 24*HOUR_IN_SECONDS );
442
  }
443
  if ( 'amp-footer-menu' == $type ) {
444
- set_transient('ampforwp_footer_sd_menu', true , 24*HOUR_IN_SECONDS );
445
  }
446
- set_transient('ampforwp_sd_menu', $navObj , 24*HOUR_IN_SECONDS );
447
  }
448
  }
449
  if($navObj){
438
  }
439
  }
440
  if ( 'amp-menu' == $type ) {
441
+ set_transient('ampforwp_header_sd_menu', true , 15*DAY_IN_SECONDS );
442
  }
443
  if ( 'amp-footer-menu' == $type ) {
444
+ set_transient('ampforwp_footer_sd_menu', true , 15*DAY_IN_SECONDS );
445
  }
446
+ set_transient('ampforwp_sd_menu', $navObj , 15*DAY_IN_SECONDS );
447
  }
448
  }
449
  if($navObj){
includes/thirdparty-compatibility.php CHANGED
@@ -1179,4 +1179,11 @@ function ampforwp_execute_amp_prior_marfeel(){
1179
  }
1180
  }
1181
  }
 
 
 
 
 
 
 
1182
  }
1179
  }
1180
  }
1181
  }
1182
+ }
1183
+ function ampforwp_is_amp_inURL($url){
1184
+ $urlArray = explode("/", $url);
1185
+ if( !in_array( AMPFORWP_AMP_QUERY_VAR , $urlArray ) ) {
1186
+ return false;
1187
+ }
1188
+ return true;
1189
  }
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.4.2
7
- Stable tag: 1.0.58.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,10 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
193
  = 1.0.58.4 (13th July 2020) =
194
  * Fixed: Website getting blank after 1.0.58 update
195
 
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.4.2
7
+ Stable tag: 1.0.58.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
190
 
191
  == Changelog ==
192
 
193
+ = 1.0.58.5 (15th July 2020) =
194
+ * Fixed: Duplicate title tag on non-amp #4631
195
+ * Fixed: Database deadlocks error #4618
196
+
197
  = 1.0.58.4 (13th July 2020) =
198
  * Fixed: Website getting blank after 1.0.58 update
199
 
templates/template-mode/template-mode.php CHANGED
@@ -677,7 +677,8 @@ Class AMPforWP_theme_mode{
677
  }//Class Closed
678
  add_action('after_setup_theme', 'ampforwp_template_mode_is_activate', 999);
679
  function ampforwp_template_mode_is_activate(){
680
- if(function_exists('td_wp_title')){
 
681
  add_theme_support( 'title-tag' );
682
  }
683
  if(get_theme_support('amp-template-mode') && !is_customize_preview()){
677
  }//Class Closed
678
  add_action('after_setup_theme', 'ampforwp_template_mode_is_activate', 999);
679
  function ampforwp_template_mode_is_activate(){
680
+ $url_path = trim(parse_url(add_query_arg(array()), PHP_URL_PATH),'/' );
681
+ if(function_exists('td_wp_title') && function_exists('ampforwp_is_amp_inURL') && ampforwp_is_amp_inURL($url_path)){
682
  add_theme_support( 'title-tag' );
683
  }
684
  if(get_theme_support('amp-template-mode') && !is_customize_preview()){