AMP for WP – Accelerated Mobile Pages - Version 0.8.5.2

Version Description

  • Canonical issue fixed for FrontPage
Download this release

Release Info

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

Code changes from version 0.8.5.1 to 0.8.5.2

README.md CHANGED
@@ -1,12 +1,12 @@
1
- #AMP Toolbox - Accelerated Mobile Pages
2
  The Must have AMP plugin for WordPress. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. More details on https://wordpress.org/plugins/accelerated-mobile-pages/ & http://AMPforWP.com
3
 
4
- === AMP Toolbox - Accelerated Mobile Pages ===
5
  Contributors: mohammed_kaludi, ahmedkaludi
6
- Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google
7
  Requires at least: 3.0
8
  Tested up to: 4.6.1
9
- Stable tag: 0.8.5.1
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -112,6 +112,9 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
112
 
113
 
114
  == Changelog ==
 
 
 
115
  = 0.8.5.1 =
116
  * Proper Details at http://ampforwp.com/new/
117
  * Validation issue fixed: 'Value' tag
1
+ #AMP for WP - Accelerated Mobile Pages
2
  The Must have AMP plugin for WordPress. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. More details on https://wordpress.org/plugins/accelerated-mobile-pages/ & http://AMPforWP.com
3
 
4
+ === AMP for WP - Accelerated Mobile Pages ===
5
  Contributors: mohammed_kaludi, ahmedkaludi
6
+ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin
7
  Requires at least: 3.0
8
  Tested up to: 4.6.1
9
+ Stable tag: 0.8.5.2
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
112
 
113
 
114
  == Changelog ==
115
+ = 0.8.5.2 =
116
+ * Canonical issue fixed for FrontPage
117
+
118
  = 0.8.5.1 =
119
  * Proper Details at http://ampforwp.com/new/
120
  * Validation issue fixed: 'Value' tag
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 Toolbox - Accelerated Mobile Pages for WordPress
6
- Version: 0.8.5.1
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://ampforwp.com/
9
  License: GPL2
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP Toolbox - Accelerated Mobile Pages for WordPress
6
+ Version: 0.8.5.2
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://ampforwp.com/
9
  License: GPL2
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === AMP Toolbox - Accelerated Mobile Pages ===
2
  Contributors: mohammed_kaludi, ahmedkaludi
3
- Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google
4
  Requires at least: 3.0
5
  Tested up to: 4.6.1
6
- Stable tag: 0.8.5.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -109,6 +109,9 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
109
 
110
 
111
  == Changelog ==
 
 
 
112
  = 0.8.5.1 =
113
  * Proper Details at http://ampforwp.com/new/
114
  * Validation issue fixed: 'Value' tag
1
+ === AMP for WP - Accelerated Mobile Pages ===
2
  Contributors: mohammed_kaludi, ahmedkaludi
3
+ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin
4
  Requires at least: 3.0
5
  Tested up to: 4.6.1
6
+ Stable tag: 0.8.5.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
109
 
110
 
111
  == Changelog ==
112
+ = 0.8.5.2 =
113
+ * Canonical issue fixed for FrontPage
114
+
115
  = 0.8.5.1 =
116
  * Proper Details at http://ampforwp.com/new/
117
  * Validation issue fixed: 'Value' tag
templates/features.php CHANGED
@@ -568,7 +568,7 @@ add_action( 'amp_post_template_head', 'ampforwp_rel_canonical_archive' );
568
 
569
  // 18. Custom Canonical for Homepage
570
  function ampforwp_rel_canonical() {
571
- if ( !is_home() || !is_front_page() )
572
  return;
573
  // $link = esc_url( get_permalink( $id ) . AMP_QUERY_VAR . '/' );
574
  $homelink = get_home_url();
@@ -576,6 +576,16 @@ function ampforwp_rel_canonical() {
576
  }
577
  add_action( 'amp_post_template_head', 'ampforwp_rel_canonical' );
578
 
 
 
 
 
 
 
 
 
 
 
579
  // 19. Remove Canonical tags
580
  function ampforwp_amp_remove_actions() {
581
  if ( is_home() || is_front_page() || is_archive() ) {
568
 
569
  // 18. Custom Canonical for Homepage
570
  function ampforwp_rel_canonical() {
571
+ if ( !is_home() )
572
  return;
573
  // $link = esc_url( get_permalink( $id ) . AMP_QUERY_VAR . '/' );
574
  $homelink = get_home_url();
576
  }
577
  add_action( 'amp_post_template_head', 'ampforwp_rel_canonical' );
578
 
579
+ // 18.5. Custom Canonical for Frontpage
580
+ function ampforwp_rel_canonical_frontpage() {
581
+ if ( is_home() || is_front_page() )
582
+ return;
583
+ // $link = esc_url( get_permalink( $id ) . AMP_QUERY_VAR . '/' );
584
+ $homelink = get_home_url();
585
+ echo "<link rel='canonical' href='$homelink' />\n";
586
+ }
587
+ add_action( 'amp_post_template_head', 'ampforwp_rel_canonical_frontpage' );
588
+
589
  // 19. Remove Canonical tags
590
  function ampforwp_amp_remove_actions() {
591
  if ( is_home() || is_front_page() || is_archive() ) {