AMP for WP – Accelerated Mobile Pages - Version 1.0.77.2

Version Description

(20th May 2021) = * Fixed: Some issues with style on normal version after update #3844

Download this release

Release Info

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

Code changes from version 1.0.77.1 to 1.0.77.2

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.7
7
- Stable tag: 1.0.77.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,9 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
196
  = 1.0.77.1 (19th May 2021) =
197
  * Improvements: Added a filter from which user can control Mobile redirection #4488
198
  * Improvements: Implemented the Mobile redirection functionality using Javascript method #3844
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.7
7
+ Stable tag: 1.0.77.2
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.77.2 (20th May 2021) =
197
+ * Fixed: Some issues with style on normal version after update #3844
198
+
199
  = 1.0.77.1 (19th May 2021) =
200
  * Improvements: Added a filter from which user can control Mobile redirection #4488
201
  * Improvements: Implemented the Mobile redirection functionality using Javascript method #3844
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.1
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.1');
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.2
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.2');
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.1 (19th May 2021) =
4
  * Improvements: Added a filter from which user can control Mobile redirection #4488
5
  * Improvements: Implemented the Mobile redirection functionality using Javascript method #3844
1
  == Changelog ==
2
 
3
+ = 1.0.77.2 (20th May 2021) =
4
+ * Fixed: Some issues with style on normal version after update #3844
5
+
6
  = 1.0.77.1 (19th May 2021) =
7
  * Improvements: Added a filter from which user can control Mobile redirection #4488
8
  * Improvements: Implemented the Mobile redirection functionality using Javascript method #3844
includes/redirect.php CHANGED
@@ -393,9 +393,9 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
393
  }
394
  if (( ! isset($_SESSION['ampforwp_amp_mode']) || ! isset($_GET['nonamp'])) && !isset($_GET['nonamphead']) ) {
395
  $_SESSION['ampforwp_amp_mode'] = 'mobile-on';
396
- if ( $url_to_redirect ) { ?>
397
- <script>if(screen.width<769){window.location = "<?php echo esc_url($url_to_redirect); ?>";}</script>
398
- <?php }
399
  return;
400
  }
401
  }
393
  }
394
  if (( ! isset($_SESSION['ampforwp_amp_mode']) || ! isset($_GET['nonamp'])) && !isset($_GET['nonamphead']) ) {
395
  $_SESSION['ampforwp_amp_mode'] = 'mobile-on';
396
+ if ( $url_to_redirect ) {
397
+ add_action('wp_head', 'ampforwp_mobile_redirection_js');
398
+ }
399
  return;
400
  }
401
  }
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.7
7
- Stable tag: 1.0.77.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,9 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
193
  = 1.0.77.1 (19th May 2021) =
194
  * Improvements: Added a filter from which user can control Mobile redirection #4488
195
  * Improvements: Implemented the Mobile redirection functionality using Javascript method #3844
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.7
7
+ Stable tag: 1.0.77.2
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.77.2 (20th May 2021) =
194
+ * Fixed: Some issues with style on normal version after update #3844
195
+
196
  = 1.0.77.1 (19th May 2021) =
197
  * Improvements: Added a filter from which user can control Mobile redirection #4488
198
  * Improvements: Implemented the Mobile redirection functionality using Javascript method #3844
templates/features.php CHANGED
@@ -9540,4 +9540,12 @@ function ampforwp_wp_block_cover_image($content_buffer){
9540
  }
9541
  }
9542
  return $content_buffer;
9543
- }
 
 
 
 
 
 
 
 
9540
  }
9541
  }
9542
  return $content_buffer;
9543
+ }
9544
+ function ampforwp_mobile_redirection_js() {
9545
+ $url_to_redirect = ampforwp_amphtml_generator();?>
9546
+ <script>
9547
+ if(screen.width<769){
9548
+ window.location = "<?php echo esc_url($url_to_redirect); ?>";
9549
+ }
9550
+ </script>
9551
+ <?php }