AMP for WP – Accelerated Mobile Pages - Version 1.0.60

Version Description

(27th July 2020) = * Improvement: Added below the related post hook #4653 * Fixed: Validation errors caused by Autoptimize for logged in users #4586 * Fixed: Styling issues with Reactions plugin by Vicomi #4637 * Fixed: If category name has special characters AMP Pagebuilder was not working #4610 * Fixed: autoplay attribute not working in the amp-vimeo tag #4648 * Fixed: incorrect width and height of logo in AMP #4650 * Fixed: Styling issues with AdsforWP section #4658 * Fixed: Code improvements for options panel #4647 * Fixed: Recent post appearing on pages as well in design 3 #4651

Download this release

Release Info

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

Code changes from version 1.0.59 to 1.0.60

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.59
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,17 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
 
 
196
  = 1.0.59 (23rd July 2020) =
197
  * Improvement: Added noreferrer noopener attributes on social links #4509
198
  * Improvement: Added webmaster tools meta tags when AMP takeover is enabled #4602
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.60
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.60 (27th July 2020) =
197
+ * Improvement: Added below the related post hook #4653
198
+ * Fixed: Validation errors caused by Autoptimize for logged in users #4586
199
+ * Fixed: Styling issues with Reactions plugin by Vicomi #4637
200
+ * Fixed: If category name has special characters AMP Pagebuilder was not working #4610
201
+ * Fixed: autoplay attribute not working in the amp-vimeo tag #4648
202
+ * Fixed: incorrect width and height of logo in AMP #4650
203
+ * Fixed: Styling issues with AdsforWP section #4658
204
+ * Fixed: Code improvements for options panel #4647
205
+ * Fixed: Recent post appearing on pages as well in design 3 #4651
206
+
207
  = 1.0.59 (23rd July 2020) =
208
  * Improvement: Added noreferrer noopener attributes on social links #4509
209
  * Improvement: Added webmaster tools meta tags when AMP takeover is enabled #4602
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.59
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.59');
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.60
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.60');
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,16 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.59 (23rd July 2020) =
4
  * Improvement: Added noreferrer noopener attributes on social links #4509
5
  * Improvement: Added webmaster tools meta tags when AMP takeover is enabled #4602
1
  == Changelog ==
2
 
3
+ = 1.0.60 (27th July 2020) =
4
+ * Improvement: Added below the related post hook #4653
5
+ * Fixed: Validation errors caused by Autoptimize for logged in users #4586
6
+ * Fixed: Styling issues with Reactions plugin by Vicomi #4637
7
+ * Fixed: If category name has special characters AMP Pagebuilder was not working #4610
8
+ * Fixed: autoplay attribute not working in the amp-vimeo tag #4648
9
+ * Fixed: incorrect width and height of logo in AMP #4650
10
+ * Fixed: Styling issues with AdsforWP section #4658
11
+ * Fixed: Code improvements for options panel #4647
12
+ * Fixed: Recent post appearing on pages as well in design 3 #4651
13
+
14
  = 1.0.59 (23rd July 2020) =
15
  * Improvement: Added noreferrer noopener attributes on social links #4509
16
  * Improvement: Added webmaster tools meta tags when AMP takeover is enabled #4602
includes/admin-style.css CHANGED
@@ -1149,6 +1149,10 @@ div#section-ampforwp-ads-section h3:before{
1149
  }
1150
  div#section-amp-ads_1, table#section-table-amp-ads_1{
1151
  max-width: 73%;
 
 
 
 
1152
  }
1153
  div#section-ampforwp-ads-section, table#section-table-ampforwp-ads-section{
1154
  max-width: 26%;
1149
  }
1150
  div#section-amp-ads_1, table#section-table-amp-ads_1{
1151
  max-width: 73%;
1152
+ float: left;
1153
+ }
1154
+ #section-amp-ads_2 {
1155
+ display: inline-block;
1156
  }
1157
  div#section-ampforwp-ads-section, table#section-table-ampforwp-ads-section{
1158
  max-width: 26%;
includes/options/redux-core/inc/fields/multitext_repeater/field_multitext_repeater.php CHANGED
@@ -73,7 +73,7 @@ if ( ! class_exists( 'ReduxFramework_multitext_repeater' ) ) {
73
  echo '<option value="'.esc_attr($ok).'" '.esc_attr($select).'>'.esc_attr($ov).'</option>';
74
  }
75
  echo '</select>';
76
- echo '<a href="javascript:void(0);" class="button button-default redux-multitext_repeater-add" data-add_number="' . $this->field['add_number'] . '" data-id="' . $this->field['id'] . '-ul" data-name="' . $this->field['name'] . $this->field['name_suffix'] . '[]">' . $this->add_text . '</a><br/>';
77
  echo '</div>';
78
  echo '<ul id="' . esc_attr($this->field['id']) . '-ul" class="redux-multitext_repeater">';
79
  if ( isset( $this->value ) && is_array( $this->value ) ) {
@@ -141,9 +141,9 @@ if ( ! class_exists( 'ReduxFramework_multitext_repeater' ) ) {
141
  }
142
  echo '<li>';
143
  echo '<span class="tool_tip afw-tooltip"><i class="el el-question-sign "></i>
144
- <span class="afw-help-subtitle"><a href="'.$docs_link.'" target="_blank">Click Here</a> for more info on '.$goal_title.'</span>
145
- </span><div class="element-fields multitext_repeater-fields '.$hide.' '.$resetclass.'">';
146
- echo '<span class="goals-count">Goals #'.$row_count.' '.$goal_title.'</span>';
147
 
148
  foreach ($this->field['repeat-fields'] as $rk => $rv) {
149
  if(is_array($rv)){
@@ -164,11 +164,11 @@ if ( ! class_exists( 'ReduxFramework_multitext_repeater' ) ) {
164
  }else{
165
 
166
  $form_class = "form_select_opt";
167
- $span = '<div class="main_form_select"><span>'.$rv['title'].'</span>';
168
  $div_cls = '</div>';
169
  }
170
  echo $span;
171
- echo '<select '.$hide.' id="' . esc_attr($this->field['id']).'-'.esc_attr($rv['id']).'" name="' . esc_attr($this->field['name']) . '['.esc_attr($rv['id']).']['.esc_attr($rv1).']' . '[]' . '" class = "indi_option '.$form_class.'" value="">';
172
  foreach ($rv['options'] as $ok => $ov) {
173
  $select = '';
174
  if($val == $ok){
@@ -212,8 +212,8 @@ if ( ! class_exists( 'ReduxFramework_multitext_repeater' ) ) {
212
  $main_id_class = 'main_id_class';
213
  }
214
  }
215
- echo '<div class="form_sel_div '.$hide_class.' '.$hide_class_id.' '.$main_id_class.'">';
216
- echo '<span class="multi-title '.$class.'">'.$rv['title'].'</span>';
217
  echo '<input type="text" id="' . esc_attr($this->field['id']).'-'.esc_attr($rv['id']).'" name="' . esc_attr($this->field['name']) . '['.esc_attr($rv['id']).']['.$rv1.']' . '[]' . '" value="'.esc_attr($val).'" class="regular-text multi-text' . esc_attr($this->field['class']) . '" placeholder ="'.esc_attr($rv['placeholder']).'" />';
218
  echo '</div>';
219
  }
73
  echo '<option value="'.esc_attr($ok).'" '.esc_attr($select).'>'.esc_attr($ov).'</option>';
74
  }
75
  echo '</select>';
76
+ echo '<a href="javascript:void(0);" class="button button-default redux-multitext_repeater-add" data-add_number="' . $this->field['add_number'] . '" data-id="' . esc_attr($this->field['id']) . '-ul" data-name="' . esc_attr($this->field['name']) . esc_attr($this->field['name_suffix']) . '[]">' . esc_attr($this->add_text) . '</a><br/>';
77
  echo '</div>';
78
  echo '<ul id="' . esc_attr($this->field['id']) . '-ul" class="redux-multitext_repeater">';
79
  if ( isset( $this->value ) && is_array( $this->value ) ) {
141
  }
142
  echo '<li>';
143
  echo '<span class="tool_tip afw-tooltip"><i class="el el-question-sign "></i>
144
+ <span class="afw-help-subtitle"><a href="'.esc_url($docs_link).'" target="_blank">Click Here</a> for more info on '.esc_html($goal_title).'</span>
145
+ </span><div class="element-fields multitext_repeater-fields '.esc_attr($hide).' '.esc_attr($resetclass).'">';
146
+ echo '<span class="goals-count">Goals #'.esc_attr($row_count).' '.esc_html($goal_title).'</span>';
147
 
148
  foreach ($this->field['repeat-fields'] as $rk => $rv) {
149
  if(is_array($rv)){
164
  }else{
165
 
166
  $form_class = "form_select_opt";
167
+ $span = '<div class="main_form_select"><span>'.esc_html($rv['title']).'</span>';
168
  $div_cls = '</div>';
169
  }
170
  echo $span;
171
+ echo '<select '.$hide.' id="' . esc_attr($this->field['id']).'-'.esc_attr($rv['id']).'" name="' . esc_attr($this->field['name']) . '['.esc_attr($rv['id']).']['.esc_attr($rv1).']' . '[]' . '" class = "indi_option '.esc_attr($form_class).'" value="">';
172
  foreach ($rv['options'] as $ok => $ov) {
173
  $select = '';
174
  if($val == $ok){
212
  $main_id_class = 'main_id_class';
213
  }
214
  }
215
+ echo '<div class="form_sel_div '.esc_attr($hide_class).' '.esc_attr($hide_class_id).' '.esc_attr($main_id_class).'">';
216
+ echo '<span class="multi-title '.esc_attr($class).'">'.esc_html($rv['title']).'</span>';
217
  echo '<input type="text" id="' . esc_attr($this->field['id']).'-'.esc_attr($rv['id']).'" name="' . esc_attr($this->field['name']) . '['.esc_attr($rv['id']).']['.$rv1.']' . '[]' . '" value="'.esc_attr($val).'" class="regular-text multi-text' . esc_attr($this->field['class']) . '" placeholder ="'.esc_attr($rv['placeholder']).'" />';
218
  echo '</div>';
219
  }
includes/thirdparty-compatibility.php CHANGED
@@ -65,6 +65,9 @@ function ampforwp_thirdparty_compatibility(){
65
  if(class_exists('gdlr_core_page_builder')){
66
  add_filter('the_content','ampforwp_gdlr_core_page_builder_content',12);
67
  }
 
 
 
68
  $yoast_canonical = $yoast_canonical_post = $yoast_canonical_page = '';
69
  $yoast_canonical = get_option( 'wpseo_titles' );
70
  if(isset($yoast_canonical['noindex-post'])){
65
  if(class_exists('gdlr_core_page_builder')){
66
  add_filter('the_content','ampforwp_gdlr_core_page_builder_content',12);
67
  }
68
+ if(function_exists('vicomi_feelbacks_template')){
69
+ remove_action('the_content', 'vicomi_feelbacks_template');
70
+ }
71
  $yoast_canonical = $yoast_canonical_post = $yoast_canonical_page = '';
72
  $yoast_canonical = get_option( 'wpseo_titles' );
73
  if(isset($yoast_canonical['noindex-post'])){
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -2752,6 +2752,7 @@ class AMP_Allowed_Tags_Generated {
2752
  'value_regex' => '[0-9]+',
2753
  ),
2754
  'media' => array(),
 
2755
  'noloading' => array(
2756
  'value' => '',
2757
  ),
2752
  'value_regex' => '[0-9]+',
2753
  ),
2754
  'media' => array(),
2755
+ 'autoplay' => array(),
2756
  'noloading' => array(
2757
  'value' => '',
2758
  ),
pagebuilder/modules/contents-module.php CHANGED
@@ -135,7 +135,7 @@ if ( is_admin() ) {
135
  ) );
136
  $categoriesArray = array('recent_option'=>'Recent Posts');
137
  foreach($categories as $category){
138
- $categoryName = htmlspecialchars($category->name, ENT_QUOTES);
139
  $categoriesArray[$category->term_id] = $categoryName;
140
  $options.= '<option value="'.esc_attr($category->term_id).'">'.esc_html($categoryName).'</option>';
141
  }
135
  ) );
136
  $categoriesArray = array('recent_option'=>'Recent Posts');
137
  foreach($categories as $category){
138
+ $categoryName = htmlspecialchars(esc_html($category->name), ENT_QUOTES);
139
  $categoriesArray[$category->term_id] = $categoryName;
140
  $options.= '<option value="'.esc_attr($category->term_id).'">'.esc_html($categoryName).'</option>';
141
  }
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.59
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,17 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
 
 
 
193
  = 1.0.59 (23rd July 2020) =
194
  * Improvement: Added noreferrer noopener attributes on social links #4509
195
  * Improvement: Added webmaster tools meta tags when AMP takeover is enabled #4602
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.60
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.60 (27th July 2020) =
194
+ * Improvement: Added below the related post hook #4653
195
+ * Fixed: Validation errors caused by Autoptimize for logged in users #4586
196
+ * Fixed: Styling issues with Reactions plugin by Vicomi #4637
197
+ * Fixed: If category name has special characters AMP Pagebuilder was not working #4610
198
+ * Fixed: autoplay attribute not working in the amp-vimeo tag #4648
199
+ * Fixed: incorrect width and height of logo in AMP #4650
200
+ * Fixed: Styling issues with AdsforWP section #4658
201
+ * Fixed: Code improvements for options panel #4647
202
+ * Fixed: Recent post appearing on pages as well in design 3 #4651
203
+
204
  = 1.0.59 (23rd July 2020) =
205
  * Improvement: Added noreferrer noopener attributes on social links #4509
206
  * Improvement: Added webmaster tools meta tags when AMP takeover is enabled #4602
templates/design-manager/design-3/single.php CHANGED
@@ -31,7 +31,7 @@ if ( ! defined( 'ABSPATH' ) ) {
31
  <?php do_action('ampforwp_post_before_design_elements') ?>
32
  <?php $this->load_parts( apply_filters( 'ampforwp_design_elements', array( 'empty-filter' ) ) ); ?>
33
  <?php do_action('ampforwp_post_after_design_elements') ?>
34
- <?php if(true==ampforwp_get_setting('ampforwp-design3-recent-posts') && !checkAMPforPageBuilderStatus(get_the_ID()) ) {?>
35
  <div class="amp-wp-content relatedpost recentpost">
36
  <div class="rp">
37
  <span class="related-title"><?php echo esc_attr(ampforwp_translation(ampforwp_get_setting('amp-translator-recent-text'), 'Recent Posts' )); ?></span>
31
  <?php do_action('ampforwp_post_before_design_elements') ?>
32
  <?php $this->load_parts( apply_filters( 'ampforwp_design_elements', array( 'empty-filter' ) ) ); ?>
33
  <?php do_action('ampforwp_post_after_design_elements') ?>
34
+ <?php if(true==ampforwp_get_setting('ampforwp-design3-recent-posts') && !checkAMPforPageBuilderStatus(get_the_ID()) && is_single() ) {?>
35
  <div class="amp-wp-content relatedpost recentpost">
36
  <div class="rp">
37
  <span class="related-title"><?php echo esc_attr(ampforwp_translation(ampforwp_get_setting('amp-translator-recent-text'), 'Recent Posts' )); ?></span>
templates/design-manager/swift/single.php CHANGED
@@ -147,6 +147,7 @@ global $redux_builder_amp; ?>
147
  } ?>
148
  </ul>
149
  </div>
 
150
  <?php wp_reset_postdata(); } ?>
151
  </div>
152
  <?php } ?>
@@ -200,6 +201,7 @@ do_action("ampforwp_single_design_type_handle_d1");
200
  } ?>
201
  </ul>
202
  </div>
 
203
  </div>
204
  <?php wp_reset_postdata(); } } ?>
205
  <?php if( ampforwp_get_setting('single-design-type') == '1' && ampforwp_get_setting('rp_design_type') == '3'){
@@ -250,6 +252,7 @@ do_action("ampforwp_single_design_type_handle_d1");
250
  </amp-carousel>
251
  </div>
252
  </div>
 
253
  <?php wp_reset_postdata(); } } ?>
254
  <?php if(ampforwp_get_setting('single-design-type') == true && ampforwp_get_setting('ampforwp-swift-recent-posts')=='1' && !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
255
  <div class="r-pf">
147
  } ?>
148
  </ul>
149
  </div>
150
+ <?php do_action('ampforwp_below_related_post'); ?>
151
  <?php wp_reset_postdata(); } ?>
152
  </div>
153
  <?php } ?>
201
  } ?>
202
  </ul>
203
  </div>
204
+ <?php do_action('ampforwp_below_related_post'); ?>
205
  </div>
206
  <?php wp_reset_postdata(); } } ?>
207
  <?php if( ampforwp_get_setting('single-design-type') == '1' && ampforwp_get_setting('rp_design_type') == '3'){
252
  </amp-carousel>
253
  </div>
254
  </div>
255
+ <?php do_action('ampforwp_below_related_post'); ?>
256
  <?php wp_reset_postdata(); } } ?>
257
  <?php if(ampforwp_get_setting('single-design-type') == true && ampforwp_get_setting('ampforwp-swift-recent-posts')=='1' && !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
258
  <div class="r-pf">
templates/features.php CHANGED
@@ -5517,9 +5517,13 @@ function ampforwp_default_logo_data() {
5517
  return false;
5518
  }
5519
 
5520
- if( ! wp_attachment_is( 'image', $logo_id ) ) {
5521
- $logo_url = $redux_builder_amp['opt-media']['url'];
5522
- $image = @getimagesize( $logo_url );
 
 
 
 
5523
  } else {
5524
  $imageDetail = wp_get_attachment_image_src( $logo_id , 'full');
5525
  $logo_url = $imageDetail[0];
@@ -7753,6 +7757,9 @@ function ampforwp_head_css(){
7753
  'title' => "SEO"
7754
  ) );
7755
  $wp_admin_bar->remove_menu( 'ampforwp-view-amp' );
 
 
 
7756
  $url = ampforwp_get_non_amp_url();
7757
  $wp_admin_bar->add_node(array(
7758
  'id' => 'ampforwp-view-non-amp',
5517
  return false;
5518
  }
5519
 
5520
+ if( ! wp_attachment_is( 'image', $logo_id ) || ampforwp_get_setting('opt-media','url') ) {
5521
+ $logo_url = ampforwp_get_setting('opt-media','url');
5522
+ $image[0] = ampforwp_get_setting('opt-media','width');
5523
+ $image[1] = ampforwp_get_setting('opt-media','height');
5524
+ if(empty($image)){
5525
+ $image = @getimagesize( $logo_url );
5526
+ }
5527
  } else {
5528
  $imageDetail = wp_get_attachment_image_src( $logo_id , 'full');
5529
  $logo_url = $imageDetail[0];
7757
  'title' => "SEO"
7758
  ) );
7759
  $wp_admin_bar->remove_menu( 'ampforwp-view-amp' );
7760
+ if(function_exists('autoptimize_autoload')){
7761
+ $wp_admin_bar->remove_menu( 'autoptimize' );
7762
+ }
7763
  $url = ampforwp_get_non_amp_url();
7764
  $wp_admin_bar->add_node(array(
7765
  'id' => 'ampforwp-view-non-amp',