AMP for WP – Accelerated Mobile Pages - Version 1.0.77.5

Version Description

(10th June 2021) = * Fixed: Some issues found while refresh the individual extension from the Extension section #5056 * Fixed: Referenced AMP URL is self-canonical AMP when AMP takeover is enabled #5053 * Fixed: Remove AMP blocks from options panel for CWV #5052 * Fixed: Incorrect link in the Breadcrumb #5050 * Fixed: Blank taxonomy in option panel #5037 * Fixed: Featured image not working for specific usecase in amp #5058

Download this release

Release Info

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

Code changes from version 1.0.77.4 to 1.0.77.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.7
7
- Stable tag: 1.0.77.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,14 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
196
  = 1.0.77.4 (1st June 2021) =
197
  * Improvements: Added dynamic copyright code so that year changes automatically #5019
198
  * Improvements: Added Smart Sticky Header Extension #5001
@@ -216,7 +224,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
216
  * Fixed: Query Monitor not working on AMP pages #5025
217
  * Fixed: Full-size image is always preloaded for the featured image in Swift theme #5038
218
 
219
- = 1.0.77.2 (20th May 2021) =
220
- * Fixed: Some issues with style on normal version after update #3844
221
-
222
  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.7
7
+ Stable tag: 1.0.77.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.77.5 (10th June 2021) =
197
+ * Fixed: Some issues found while refresh the individual extension from the Extension section #5056
198
+ * Fixed: Referenced AMP URL is self-canonical AMP when AMP takeover is enabled #5053
199
+ * Fixed: Remove AMP blocks from options panel for CWV #5052
200
+ * Fixed: Incorrect link in the Breadcrumb #5050
201
+ * Fixed: Blank taxonomy in option panel #5037
202
+ * Fixed: Featured image not working for specific usecase in amp #5058
203
+
204
  = 1.0.77.4 (1st June 2021) =
205
  * Improvements: Added dynamic copyright code so that year changes automatically #5019
206
  * Improvements: Added Smart Sticky Header Extension #5001
224
  * Fixed: Query Monitor not working on AMP pages #5025
225
  * Fixed: Full-size image is always preloaded for the featured image in Swift theme #5038
226
 
 
 
 
227
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
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.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.77.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.77.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.77.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,13 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
3
  = 1.0.77.4 (1st June 2021) =
4
  * Improvements: Added dynamic copyright code so that year changes automatically #5019
5
  * Improvements: Added Smart Sticky Header Extension #5001
1
  == Changelog ==
2
 
3
+ = 1.0.77.5 (10th June 2021) =
4
+ * Fixed: Some issues found while refresh the individual extension from the Extension section #5056
5
+ * Fixed: Referenced AMP URL is self-canonical AMP when AMP takeover is enabled #5053
6
+ * Fixed: Remove AMP blocks from options panel for CWV #5052
7
+ * Fixed: Incorrect link in the Breadcrumb #5050
8
+ * Fixed: Blank taxonomy in option panel #5037
9
+ * Fixed: Featured image not working for specific usecase in amp #5058
10
+
11
  = 1.0.77.4 (1st June 2021) =
12
  * Improvements: Added dynamic copyright code so that year changes automatically #5019
13
  * Improvements: Added Smart Sticky Header Extension #5001
components/breadcrumb/breadcrumb.php CHANGED
@@ -133,7 +133,7 @@ function amp_breadcrumb_output(){
133
  $cat_display = '';
134
  foreach($cat_parents as $parents) {
135
  $categories = get_the_category();
136
- $cat_id = $categories[0]->cat_ID;
137
  if(class_exists( 'WPSEO_Options' ) && !empty($primary_cateogory)){
138
  $cat_id = $primary_cateogory;
139
  }
133
  $cat_display = '';
134
  foreach($cat_parents as $parents) {
135
  $categories = get_the_category();
136
+ $cat_id = end($categories)->cat_ID;
137
  if(class_exists( 'WPSEO_Options' ) && !empty($primary_cateogory)){
138
  $cat_id = $primary_cateogory;
139
  }
includes/admin-script.js CHANGED
@@ -864,7 +864,8 @@ function deactivatelicence(){
864
  $(".dashicons").addClass( 'spin' );
865
  setTimeout( function() {
866
  $(".dashicons").removeClass( 'spin' );}, 3000 );
867
-
 
868
  }
869
  });
870
  $(".redux-ampforwp-ext-deactivate").on("click", function(){
864
  $(".dashicons").addClass( 'spin' );
865
  setTimeout( function() {
866
  $(".dashicons").removeClass( 'spin' );}, 3000 );
867
+ lastcheck = Math.abs(lastcheck.getDate()+1)+'/'+Math.abs(lastcheck.getMonth()+1) +'/'+lastcheck.getFullYear()+' '+lastcheck.getHours()+':'+lastcheck.getMinutes()+':'+lastcheck.getSeconds();
868
+ alert('Please try after '+ lastcheck);
869
  }
870
  });
871
  $(".redux-ampforwp-ext-deactivate").on("click", function(){
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -1140,12 +1140,12 @@ background: linear-gradient(45deg, #E47B49 0%, #ea4c89 100%);
1140
  margin-top: 15px;
1141
  }
1142
 
1143
- .beta_tester {
1144
  float: left;
1145
  margin-top: 12px;
1146
  margin-left: 15px
1147
  }
1148
- .beta_tester a{
1149
  text-decoration: none;
1150
  background: #fff;
1151
  color: #4452a7;
@@ -1153,7 +1153,7 @@ background: #fff;
1153
  border-radius: 20px;
1154
  border: 1px solid #ddd;
1155
  }
1156
- .beta_tester a:hover{
1157
  text-decoration: underline;
1158
  }
1159
  @media(max-width:1366px){
1140
  margin-top: 15px;
1141
  }
1142
 
1143
+ .custom_url {
1144
  float: left;
1145
  margin-top: 12px;
1146
  margin-left: 15px
1147
  }
1148
+ .custom_url a{
1149
  text-decoration: none;
1150
  background: #fff;
1151
  color: #4452a7;
1153
  border-radius: 20px;
1154
  border: 1px solid #ddd;
1155
  }
1156
+ .custom_url a:hover{
1157
  text-decoration: underline;
1158
  }
1159
  @media(max-width:1366px){
includes/options/redux-core/inc/fields/select/field_select.php CHANGED
@@ -140,8 +140,6 @@ if ( ! class_exists( 'ReduxFramework_select' ) ) {
140
  }
141
  }
142
  }
143
-
144
- echo '<option></option>';
145
 
146
  foreach ( $this->field['options'] as $k => $v ) {
147
 
140
  }
141
  }
142
  }
 
 
143
 
144
  foreach ( $this->field['options'] as $k => $v ) {
145
 
includes/options/redux-core/templates/panel/footer.tpl.php CHANGED
@@ -52,8 +52,8 @@ if ( ! defined( 'ABSPATH' ) ) {
52
  <?php } ?>
53
 
54
  </div>
55
- <?php } $beta_test_url = 'https://wordpress.org/plugins/amp-blocks/';?>
56
- <div class='beta_tester'><a href="<?php echo esc_url($beta_test_url);?>" target="_blank"><?php echo "Just Launched: AMP Design Library" ?></a></div>
57
 
58
  <div class="redux-action_bar">
59
  <span class="spinner"></span>
52
  <?php } ?>
53
 
54
  </div>
55
+ <?php } $url = 'https://webvitalsdev.com/';?>
56
+ <div class='custom_url'><a href="<?php echo esc_url($url);?>" target="_blank"><?php echo "The New Core Web Vitals Project" ?></a></div>
57
 
58
  <div class="redux-action_bar">
59
  <span class="spinner"></span>
includes/updater/update.php CHANGED
@@ -28,6 +28,9 @@ function ampforwp_get_licence_activate_update(){
28
  $license = $selectedOption['amp-license'][$ampforwp_license_activate]['license'];
29
  $item_name = $selectedOption['amp-license'][$ampforwp_license_activate]['item_name'];
30
  $store_url = $selectedOption['amp-license'][$ampforwp_license_activate]['store_url'];
 
 
 
31
  }
32
  $status = 400;
33
  if($license==""){
@@ -136,8 +139,8 @@ function ampforwp_get_licence_activate_update(){
136
  $selectedOption['amp-license'][$ampforwp_license_activate]['status'] = $status;
137
  $selectedOption['amp-license'][$ampforwp_license_activate]['message'] = $message;
138
 
139
- update_option( 'redux_builder_amp', $selectedOption );
140
  if($status=='valid'){
 
141
  $status = "200";
142
  $message = "Plugin activated successfully";
143
  }else{
28
  $license = $selectedOption['amp-license'][$ampforwp_license_activate]['license'];
29
  $item_name = $selectedOption['amp-license'][$ampforwp_license_activate]['item_name'];
30
  $store_url = $selectedOption['amp-license'][$ampforwp_license_activate]['store_url'];
31
+ if($selectedOption['amp-license'][$ampforwp_license_activate]['item_name']=="" || $selectedOption['amp-license'][$ampforwp_license_activate]['item_name']==NULL){
32
+ $item_name = $selectedOption['amp-license'][$ampforwp_license_activate]['all_data']['item_name'];
33
+ }
34
  }
35
  $status = 400;
36
  if($license==""){
139
  $selectedOption['amp-license'][$ampforwp_license_activate]['status'] = $status;
140
  $selectedOption['amp-license'][$ampforwp_license_activate]['message'] = $message;
141
 
 
142
  if($status=='valid'){
143
+ update_option( 'redux_builder_amp', $selectedOption );
144
  $status = "200";
145
  $message = "Plugin activated successfully";
146
  }else{
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.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
193
  = 1.0.77.4 (1st June 2021) =
194
  * Improvements: Added dynamic copyright code so that year changes automatically #5019
195
  * Improvements: Added Smart Sticky Header Extension #5001
@@ -213,7 +221,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
213
  * Fixed: Query Monitor not working on AMP pages #5025
214
  * Fixed: Full-size image is always preloaded for the featured image in Swift theme #5038
215
 
216
- = 1.0.77.2 (20th May 2021) =
217
- * Fixed: Some issues with style on normal version after update #3844
218
-
219
  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.7
7
+ Stable tag: 1.0.77.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.77.5 (10th June 2021) =
194
+ * Fixed: Some issues found while refresh the individual extension from the Extension section #5056
195
+ * Fixed: Referenced AMP URL is self-canonical AMP when AMP takeover is enabled #5053
196
+ * Fixed: Remove AMP blocks from options panel for CWV #5052
197
+ * Fixed: Incorrect link in the Breadcrumb #5050
198
+ * Fixed: Blank taxonomy in option panel #5037
199
+ * Fixed: Featured image not working for specific usecase in amp #5058
200
+
201
  = 1.0.77.4 (1st June 2021) =
202
  * Improvements: Added dynamic copyright code so that year changes automatically #5019
203
  * Improvements: Added Smart Sticky Header Extension #5001
221
  * Fixed: Query Monitor not working on AMP pages #5025
222
  * Fixed: Full-size image is always preloaded for the featured image in Swift theme #5038
223
 
 
 
 
224
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/swift/single.php CHANGED
@@ -5,7 +5,8 @@ if ( ! defined( 'ABSPATH' ) ) {
5
  global $redux_builder_amp; ?>
6
  <?php amp_header();
7
  $paged = get_query_var( 'paged' );
8
- $page = get_query_var( 'page' ); ?>
 
9
  <?php if(ampforwp_get_setting('single-design-type') == '1'){?>
10
  <div class="sp sgl">
11
  <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
5
  global $redux_builder_amp; ?>
6
  <?php amp_header();
7
  $paged = get_query_var( 'paged' );
8
+ $page = get_query_var( 'page' );
9
+ $page = intval($page); ?>
10
  <?php if(ampforwp_get_setting('single-design-type') == '1'){?>
11
  <div class="sp sgl">
12
  <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
templates/features.php CHANGED
@@ -2510,18 +2510,6 @@ function ampforwp_header_html_output() {
2510
  if(function_exists('ampforwp_mobile_redirect_preseve_link')){
2511
  $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
2512
  }
2513
- // amphtml tag when AMP Takeover is enabled #2550
2514
- if(ampforwp_get_setting('ampforwp-amp-takeover') == true || $mob_pres_link == true){
2515
- $amp_url = "";
2516
- $amp_url = ampforwp_amphtml_generator();
2517
- $canonical_url = "";
2518
- $canonical_url = explode('/', $amp_url);
2519
- $canonical_url = array_flip($canonical_url);
2520
- unset($canonical_url['amp']);
2521
- $canonical_url = array_flip($canonical_url);
2522
- $canonical_url = implode('/' , $canonical_url);
2523
- printf('<link rel="amphtml" href="%s" />', user_trailingslashit(esc_url($canonical_url)));
2524
- }
2525
  }
2526
 
2527
  add_filter('amp_post_template_data','ampforwp_set_body_content_script', 20);
2510
  if(function_exists('ampforwp_mobile_redirect_preseve_link')){
2511
  $mob_pres_link = ampforwp_mobile_redirect_preseve_link();
2512
  }
 
 
 
 
 
 
 
 
 
 
 
 
2513
  }
2514
 
2515
  add_filter('amp_post_template_data','ampforwp_set_body_content_script', 20);