AMP for WP – Accelerated Mobile Pages - Version 1.0.27

Version Description

(16th February 2020) = * Fixed: Bugs in Imagify plugin #3908 * Fixed: GDPR popup not blocking header #4155 * Fixed: Save button dissappers when clicked on setup settings #4169 * Fixed: Alignment issue when there is no caption on featured image #4171 * Fixed: Whitelisted Picture tag #4051 * Fixed: Show/Hide Slider or Icon module in AMP Pagebuilder is not clickable #4153 * Fixed: Debug warning when empty item added in Slider module in AMP pagebuilder #4152 * Fixed: Empty link in facebook share in sticky bar #4154 * Fixed: AMP Options panel UI bugs #4122 #4162

Download this release

Release Info

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

Code changes from version 1.0.26 to 1.0.27

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.3.2
7
- Stable tag: 1.0.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,10 +194,21 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
197
- = 1.0.26 (12th February 2020) =
198
- * Improvement: import/export option improved
199
- * Fixed: Added option to show/hide featured image on AMP pagebuilder
200
- * Fixed: AMP Options panel UI bug
 
 
 
 
 
 
 
 
 
 
 
201
 
202
  = 1.0.25 (12th February 2020) =
203
  * Fixed: Title issue #4138
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.3.2
7
+ Stable tag: 1.0.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
194
 
195
  == Changelog ==
196
 
197
+ = 1.0.27 (16th February 2020) =
198
+ * Fixed: Bugs in Imagify plugin #3908
199
+ * Fixed: GDPR popup not blocking header #4155
200
+ * Fixed: Save button dissappers when clicked on setup settings #4169
201
+ * Fixed: Alignment issue when there is no caption on featured image #4171
202
+ * Fixed: Whitelisted Picture tag #4051
203
+ * Fixed: Show/Hide Slider or Icon module in AMP Pagebuilder is not clickable #4153
204
+ * Fixed: Debug warning when empty item added in Slider module in AMP pagebuilder #4152
205
+ * Fixed: Empty link in facebook share in sticky bar #4154
206
+ * Fixed: AMP Options panel UI bugs #4122 #4162
207
+
208
+ = 1.0.26 (13th February 2020) =
209
+ * Improvement: import/export option improved #4089
210
+ * Fixed: Added option to show/hide featured image on AMP pagebuilder #4131
211
+ * Fixed: AMP Options panel UI bug #4122
212
 
213
  = 1.0.25 (12th February 2020) =
214
  * Fixed: Title issue #4138
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.26
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.26');
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.27
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.27');
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,9 +1,20 @@
1
  == Changelog ==
2
 
3
- = 1.0.26 (12th February 2020) =
4
- * Improvement: import/export option improved
5
- * Fixed: Added option to show/hide featured image on AMP pagebuilder
6
- * Fixed: AMP Options panel UI bug
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  = 1.0.25 (12th February 2020) =
9
  * Fixed: Title issue #4138
1
  == Changelog ==
2
 
3
+ = 1.0.27 (16th February 2020) =
4
+ * Fixed: Bugs in Imagify plugin #3908
5
+ * Fixed: GDPR popup not blocking header #4155
6
+ * Fixed: Save button dissappers when clicked on setup settings #4169
7
+ * Fixed: Alignment issue when there is no caption on featured image #4171
8
+ * Fixed: Whitelisted Picture tag #4051
9
+ * Fixed: Show/Hide Slider or Icon module in AMP Pagebuilder is not clickable #4153
10
+ * Fixed: Debug warning when empty item added in Slider module in AMP pagebuilder #4152
11
+ * Fixed: Empty link in facebook share in sticky bar #4154
12
+ * Fixed: AMP Options panel UI bugs #4122 #4162
13
+
14
+ = 1.0.26 (13th February 2020) =
15
+ * Improvement: import/export option improved #4089
16
+ * Fixed: Added option to show/hide featured image on AMP pagebuilder #4131
17
+ * Fixed: AMP Options panel UI bug #4122
18
 
19
  = 1.0.25 (12th February 2020) =
20
  * Fixed: Title issue #4138
components/gdpr/gdpr.php CHANGED
@@ -133,7 +133,7 @@ function ampforwp_gdpr_css(){
133
  bottom: 0;
134
  left: 0;
135
  right: 0;
136
- position: fixed;
137
  }
138
  @media(max-width:768px){
139
  .gdpr_w{width: 85%;margin:0 auto;padding:1.5rem;}
@@ -249,8 +249,8 @@ function ampforwp_gdpr_css(){
249
  }
250
  <?php
251
  } ?>
252
- amp-consent.amp-active{
253
- z-index:0;
254
  position: inherit;
255
  }
256
  <?php }
133
  bottom: 0;
134
  left: 0;
135
  right: 0;
136
+ position: relative;
137
  }
138
  @media(max-width:768px){
139
  .gdpr_w{width: 85%;margin:0 auto;padding:1.5rem;}
249
  }
250
  <?php
251
  } ?>
252
+ footer amp-consent.amp-active {
253
+ z-index:9999;
254
  position: inherit;
255
  }
256
  <?php }
components/loop/loop.php CHANGED
@@ -513,6 +513,9 @@ function amp_loop_image( $data=array() ) {
513
  $imageClass = $changesInImageData["image_class"];
514
  $imageLink = $changesInImageData["image_link"];
515
  }
 
 
 
516
  echo '<'.esc_attr($tag).' class="loop-img '.esc_attr($tag_class).'">';
517
  echo '<a href="'.esc_url($imageLink).'" title="'.esc_html(get_the_title()).'">';
518
  $img_content = '<amp-img src="'. esc_url($thumb_url) .'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" '. esc_attr($layout_responsive) .' class="'.esc_attr($imageClass).'" alt="'. esc_html(get_the_title()) .'"></amp-img>';
513
  $imageClass = $changesInImageData["image_class"];
514
  $imageLink = $changesInImageData["image_link"];
515
  }
516
+ if(function_exists('ampforwp_check_image_existance')){
517
+ $thumb_url = ampforwp_check_image_existance($thumb_url);
518
+ }
519
  echo '<'.esc_attr($tag).' class="loop-img '.esc_attr($tag_class).'">';
520
  echo '<a href="'.esc_url($imageLink).'" title="'.esc_html(get_the_title()).'">';
521
  $img_content = '<amp-img src="'. esc_url($thumb_url) .'" width="'.esc_attr($thumb_width).'" height="'.esc_attr($thumb_height).'" '. esc_attr($layout_responsive) .' class="'.esc_attr($imageClass).'" alt="'. esc_html(get_the_title()) .'"></amp-img>';
includes/admin-script.js CHANGED
@@ -952,12 +952,11 @@ jQuery(document).ready(function($) {
952
  }
953
  },10);
954
  $(".redux-group-tab-link-li").click(function(){
955
- var this_c_val = $(this).children('a').children('span.group_title').html();
956
  if($(this).hasClass('ampforwp-new-ux')){
957
  $('#redux-footer-sticky').hide();
958
  $('#redux-footer-sticky #redux-footer').addClass("hide");
959
  }else{
960
- if(this_c_val=="Settings" || this_c_val=="Design"){
961
  if($('#redux-footer-sticky #redux-footer').hasClass('hide')){
962
  $('#redux-footer-sticky').show();
963
  $('#redux-footer-sticky #redux-footer').removeClass("hide");
@@ -2177,10 +2176,10 @@ function Drawer(drawerElem) {
2177
  var opt_type = 0;
2178
  if(id=='amp-opt-easy-view' || id=='radio-c'){
2179
  opt_type = 1;
2180
- $(".amp-full-view-options").slideUp();
2181
  }else if(id=='amp-opt-full-view' || id=='radio-d'){
2182
  opt_type = 2;
2183
- $(".amp-full-view-options").slideDown();
2184
  }
2185
  amp_left_sub_menu_opt_hs(opt_type)
2186
  $.ajax({
952
  }
953
  },10);
954
  $(".redux-group-tab-link-li").click(function(){
 
955
  if($(this).hasClass('ampforwp-new-ux')){
956
  $('#redux-footer-sticky').hide();
957
  $('#redux-footer-sticky #redux-footer').addClass("hide");
958
  }else{
959
+ if($(this).hasClass('amp-opt-settings') || $(this).hasClass('amp-opt-design')){
960
  if($('#redux-footer-sticky #redux-footer').hasClass('hide')){
961
  $('#redux-footer-sticky').show();
962
  $('#redux-footer-sticky #redux-footer').removeClass("hide");
2176
  var opt_type = 0;
2177
  if(id=='amp-opt-easy-view' || id=='radio-c'){
2178
  opt_type = 1;
2179
+ $(".amp-full-view-options").slideUp(0);
2180
  }else if(id=='amp-opt-full-view' || id=='radio-d'){
2181
  opt_type = 2;
2182
+ $(".amp-full-view-options").slideDown(0);
2183
  }
2184
  amp_left_sub_menu_opt_hs(opt_type)
2185
  $.ajax({
includes/admin-style.css CHANGED
@@ -2035,4 +2035,7 @@ div#section-ampforwp-ux-section::after,div#section-ampforwp-ux-section-right::af
2035
  }
2036
  .redux-container-import_export h4{
2037
  margin-bottom:10px;
2038
- }
 
 
 
2035
  }
2036
  .redux-container-import_export h4{
2037
  margin-bottom:10px;
2038
+ }
2039
+ .redux-container-import_export #redux-export-code-dl{
2040
+ display: inline-block;
2041
+ }
includes/features/performance/performance-functions.php CHANGED
@@ -9,6 +9,8 @@ function ampforwp_minify_html_output($content_buffer){
9
  //Removed trbidi attribute #3687
10
  $content_buffer = str_replace('trbidi="on"', '', $content_buffer);
11
  $content_buffer = str_replace("trbidi='on'", '', $content_buffer);
 
 
12
  if(class_exists('SiteOrigin_Widgets_Bundle')){
13
  $content_buffer = preg_replace('/<amp-video id="sow-player(.*?)" class="(.*?)"(.*?)<\/amp-video>/', '<amp-video id="sow-player$1" class="$2" autoplay $3</amp-video>', $content_buffer);
14
  }
9
  //Removed trbidi attribute #3687
10
  $content_buffer = str_replace('trbidi="on"', '', $content_buffer);
11
  $content_buffer = str_replace("trbidi='on'", '', $content_buffer);
12
+ //Picture-tag is not working in AMP #4051
13
+ $content_buffer = preg_replace('/<picture(.*?)<amp-img(.*?)><\/amp-img>(.*?)<\/picture>/s', '<noscript><picture$1</picture></noscript><amp-img$2></amp-img>$3', $content_buffer);
14
  if(class_exists('SiteOrigin_Widgets_Bundle')){
15
  $content_buffer = preg_replace('/<amp-video id="sow-player(.*?)" class="(.*?)"(.*?)<\/amp-video>/', '<amp-video id="sow-player$1" class="$2" autoplay $3</amp-video>', $content_buffer);
16
  }
includes/options/admin-config.php CHANGED
@@ -1479,7 +1479,8 @@ Redux::setArgs( "redux_builder_amp", $args );
1479
  'title' => esc_html__( 'Settings', 'accelerated-mobile-pages' ),
1480
  'id' => 'basic',
1481
  'icon' => 'el el-cogs',
1482
- 'desc' => ''
 
1483
  ));
1484
 
1485
  function ampforwp_default_logo_settings($param=""){
@@ -3330,8 +3331,8 @@ $e_commerce_support[] = array(
3330
  Redux::setSection( $opt_name, array(
3331
  'title' => esc_html__( 'Design', 'accelerated-mobile-pages' ),
3332
  'icon' => 'el el-adjust-alt',
3333
- 'desc' => ''
3334
-
3335
  ));
3336
 
3337
  //get All design
@@ -5413,7 +5414,9 @@ $single_page_options = array(
5413
  'type' => 'switch',
5414
  'title' => esc_html__( 'Author Name', 'accelerated-mobile-pages' ),
5415
  'default' => '1',
5416
- 'required' => array(
 
 
5417
  array('amp-design-selector' , '=' , '4'),
5418
  )
5419
  ),
@@ -5536,7 +5539,7 @@ $single_page_options = array(
5536
  'title' => esc_html__( 'Author Name', 'accelerated-mobile-pages' ),
5537
  'default' => '1',
5538
  'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
5539
- esc_html__('Enable this option to show author name in AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-show-author-name-in-single-page/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
5540
  'required' => array(
5541
  array('amp-design-selector' , '=' , '4'),
5542
  array('amp-author-description' , '=' , '1'),
1479
  'title' => esc_html__( 'Settings', 'accelerated-mobile-pages' ),
1480
  'id' => 'basic',
1481
  'icon' => 'el el-cogs',
1482
+ 'desc' => '',
1483
+ 'class' =>'amp-opt-settings',
1484
  ));
1485
 
1486
  function ampforwp_default_logo_settings($param=""){
3331
  Redux::setSection( $opt_name, array(
3332
  'title' => esc_html__( 'Design', 'accelerated-mobile-pages' ),
3333
  'icon' => 'el el-adjust-alt',
3334
+ 'desc' => '',
3335
+ 'class' =>'amp-opt-design',
3336
  ));
3337
 
3338
  //get All design
5414
  'type' => 'switch',
5415
  'title' => esc_html__( 'Author Name', 'accelerated-mobile-pages' ),
5416
  'default' => '1',
5417
+ 'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
5418
+ esc_html__('Enable this option to show author name in AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-show-author-name-in-single-page/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
5419
+ 'required' => array(
5420
  array('amp-design-selector' , '=' , '4'),
5421
  )
5422
  ),
5539
  'title' => esc_html__( 'Author Name', 'accelerated-mobile-pages' ),
5540
  'default' => '1',
5541
  'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
5542
+ esc_html__('Enable this option to show author name in author bio and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-author-name-in-author-bio-section/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
5543
  'required' => array(
5544
  array('amp-design-selector' , '=' , '4'),
5545
  array('amp-author-description' , '=' , '1'),
includes/options/redux-core/framework.php CHANGED
@@ -3227,7 +3227,7 @@
3227
  $enabledOptions = array_map('strtolower', $enabledOptions);
3228
  if(!in_array($section['id'], $enabledOptions)){
3229
  $addClass = 'otherSectionFields';
3230
- $style="style='display:none;'";
3231
  }
3232
  }
3233
 
@@ -3241,7 +3241,7 @@
3241
  $opt_visible = '';
3242
  $opt_visible_class = "";
3243
  }
3244
- $string .= '<li '.esc_html($opt_visible).' id="' . esc_attr( $k . $suffix ) . '_section_group_li" class="'.esc_attr($opt_visible_class).' redux-group-tab-link-li '.esc_attr($addClass).'' . esc_attr( $hide_section ) . esc_attr( $section['class'] ) . esc_attr( $subsectionsClass ) . ' ' . strtolower( wp_kses_post( $section['id'] )) . '" '.ampforwp_css_sanitizer($style).'>';
3245
  $string .= '<a href="javascript:void(0);" id="' . esc_attr( $k . $suffix ) . '_section_group_li_a" class="redux-group-tab-link-a" data-key="' . esc_attr( $k ) . '" data-rel="' . esc_attr( $k . $suffix ) . '">' . $extra_icon . $icon . '<span class="group_title">' . wp_kses_post( $section['title'] ) . '</span></a>';
3246
 
3247
  $nextK = $k;
3227
  $enabledOptions = array_map('strtolower', $enabledOptions);
3228
  if(!in_array($section['id'], $enabledOptions)){
3229
  $addClass = 'otherSectionFields';
3230
+ $style="style=display:none;";
3231
  }
3232
  }
3233
 
3241
  $opt_visible = '';
3242
  $opt_visible_class = "";
3243
  }
3244
+ $string .= '<li '.esc_html($opt_visible).' id="' . esc_attr( $k . $suffix ) . '_section_group_li" class="'.esc_attr($opt_visible_class).' redux-group-tab-link-li '.esc_attr($addClass).'' . esc_attr( $hide_section ) . esc_attr( $section['class'] ) . esc_attr( $subsectionsClass ) . ' ' . strtolower( wp_kses_post( $section['id'] )) . '" '.esc_html($style).'>';
3245
  $string .= '<a href="javascript:void(0);" id="' . esc_attr( $k . $suffix ) . '_section_group_li_a" class="redux-group-tab-link-a" data-key="' . esc_attr( $k ) . '" data-rel="' . esc_attr( $k . $suffix ) . '">' . $extra_icon . $icon . '<span class="group_title">' . wp_kses_post( $section['title'] ) . '</span></a>';
3246
 
3247
  $nextK = $k;
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -82,6 +82,7 @@ class AMP_Allowed_Tags_Generated {
82
  'tag_spec' => array(),
83
  ),
84
  ),
 
85
  'acronym' => array(
86
  array(
87
  'attr_spec_list' => array(),
82
  'tag_spec' => array(),
83
  ),
84
  ),
85
+ 'picture' => array(),
86
  'acronym' => array(
87
  array(
88
  'attr_spec_list' => array(),
includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php CHANGED
@@ -295,7 +295,6 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
295
  'select',
296
  'option',
297
  'link',
298
- 'picture',
299
  'canvas',
300
 
301
  // Sanitizers run after embed handlers, so if anything wasn't matched, it needs to be removed.
295
  'select',
296
  'option',
297
  'link',
 
298
  'canvas',
299
 
300
  // Sanitizers run after embed handlers, so if anything wasn't matched, it needs to be removed.
includes/vendor/vendor-changelog.txt CHANGED
@@ -93,4 +93,5 @@ Reason: To extend the functionality of sidebars and Pagebuilder
93
  63. Need to remove width from inline style on amp images #3741
94
  64. Fixed Instagram video (tv) rendering issue #3812
95
  65. Needs to redirect to 301, not in 302 #3767
96
- 66. Whitelisted label and input tags #4054
 
93
  63. Need to remove width from inline style on amp images #3741
94
  64. Fixed Instagram video (tv) rendering issue #3812
95
  65. Needs to redirect to 301, not in 302 #3767
96
+ 66. Whitelisted label and input tags #4054
97
+ 67. Whitelisted Picture tag #4051
pagebuilder/components/modulePopupTemplate.php CHANGED
@@ -64,7 +64,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; ?>
64
  <div class="amp-accordion-head amppb_accordion__panel" v-on:click="repeaterAcoordian($event);">
65
  <span class="amppb-repeaterfields-handle dashicons dashicons-move"></span>
66
  <span class="repeater_num">{{key+1}}</span> {{modalcontent.label}} Field
67
- <span class="amp-accordion-label"> {{(key==0)? '(Hide)': '(Show)'}}</span>
68
  <div class="right"
69
  v-on:click="removeRepeaterSection(key, modalcontent.repeater.showFields)">Remove</div>
70
  </div>
64
  <div class="amp-accordion-head amppb_accordion__panel" v-on:click="repeaterAcoordian($event);">
65
  <span class="amppb-repeaterfields-handle dashicons dashicons-move"></span>
66
  <span class="repeater_num">{{key+1}}</span> {{modalcontent.label}} Field
67
+ <span class="amp-accordion-label" v-on:click="showhideAccordian($event);"> {{(key==0)? '(Hide)': '(Show)'}}</span>
68
  <div class="right"
69
  v-on:click="removeRepeaterSection(key, modalcontent.repeater.showFields)">Remove</div>
70
  </div>
pagebuilder/inc/admin-amp-page-builder.js CHANGED
@@ -192,6 +192,9 @@ Vue.component('amp-pagebuilder-module-modal', {
192
  repeatHead.html('(Hide)');
193
  }
194
  },
 
 
 
195
  hideModulePopUp: function(event){
196
  app.showmoduleModal = false;
197
  },
192
  repeatHead.html('(Hide)');
193
  }
194
  },
195
+ showhideAccordian:function(event){
196
+ jQuery(event.target).parent(".amp-accordion-head").click();
197
+ },
198
  hideModulePopUp: function(event){
199
  app.showmoduleModal = false;
200
  },
pagebuilder/inc/viewShowFrontData.php CHANGED
@@ -744,7 +744,7 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
744
  $imageUrl,
745
  $repeaterFrontTemplate
746
  );
747
- if(strpos($repeaterFrontTemplate, '{{'.$moduleField['name'].'-thumbnail}}')!==false){
748
  $imageDetails = ampforwp_get_attachment_id( $replace[0], 'thumbnail');
749
  $imageUrl = isset($imageDetails[0])? $imageDetails[0] : '';
750
  $repeaterFrontTemplate = str_replace(
744
  $imageUrl,
745
  $repeaterFrontTemplate
746
  );
747
+ if(strpos($repeaterFrontTemplate, '{{'.$moduleField['name'].'-thumbnail}}')!==false && isset($replace[0])){
748
  $imageDetails = ampforwp_get_attachment_id( $replace[0], 'thumbnail');
749
  $imageUrl = isset($imageDetails[0])? $imageDetails[0] : '';
750
  $repeaterFrontTemplate = str_replace(
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.3.2
7
- Stable tag: 1.0.26
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,10 +191,21 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
194
- = 1.0.26 (12th February 2020) =
195
- * Improvement: import/export option improved
196
- * Fixed: Added option to show/hide featured image on AMP pagebuilder
197
- * Fixed: AMP Options panel UI bug
 
 
 
 
 
 
 
 
 
 
 
198
 
199
  = 1.0.25 (12th February 2020) =
200
  * Fixed: Title issue #4138
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.3.2
7
+ Stable tag: 1.0.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 1.0.27 (16th February 2020) =
195
+ * Fixed: Bugs in Imagify plugin #3908
196
+ * Fixed: GDPR popup not blocking header #4155
197
+ * Fixed: Save button dissappers when clicked on setup settings #4169
198
+ * Fixed: Alignment issue when there is no caption on featured image #4171
199
+ * Fixed: Whitelisted Picture tag #4051
200
+ * Fixed: Show/Hide Slider or Icon module in AMP Pagebuilder is not clickable #4153
201
+ * Fixed: Debug warning when empty item added in Slider module in AMP pagebuilder #4152
202
+ * Fixed: Empty link in facebook share in sticky bar #4154
203
+ * Fixed: AMP Options panel UI bugs #4122 #4162
204
+
205
+ = 1.0.26 (13th February 2020) =
206
+ * Improvement: import/export option improved #4089
207
+ * Fixed: Added option to show/hide featured image on AMP pagebuilder #4131
208
+ * Fixed: AMP Options panel UI bug #4122
209
 
210
  = 1.0.25 (12th February 2020) =
211
  * Fixed: Title issue #4138
templates/design-manager/design-1/elements/social-icons.php CHANGED
@@ -51,7 +51,7 @@ if(true == ampforwp_get_setting('ampforwp-social-share')){ ?>
51
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
52
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
53
  <?php } ?>
54
- <?php if ( true == ampforwp_get_setting('enable-single-facebook-share-messenger') ) { ?>
55
  <a title="facebookmessenger share" <?php ampforwp_nofollow_social_links(); ?> href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>" target="_blank" aria-label="facebookmessenger share">
56
  <div class="amp-social-icon amp-social-facebookmessenger">
57
  <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
51
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
52
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
53
  <?php } ?>
54
+ <?php if ( true == ampforwp_get_setting('enable-single-facebook-share-messenger') && $amp_permalink_fb_messenger!='') { ?>
55
  <a title="facebookmessenger share" <?php ampforwp_nofollow_social_links(); ?> href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>" target="_blank" aria-label="facebookmessenger share">
56
  <div class="amp-social-icon amp-social-facebookmessenger">
57
  <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
templates/design-manager/design-2/elements/social-icons.php CHANGED
@@ -52,7 +52,7 @@ if(true == ampforwp_get_setting('ampforwp-social-share')){ ?>
52
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
53
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
54
  <?php } ?>
55
- <?php if ( true == ampforwp_get_setting('enable-single-facebook-share-messenger') ) { ?>
56
  <a title="facebookmessenger share" <?php ampforwp_nofollow_social_links(); ?> href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>" target="_blank" aria-label="facebookmessenger share">
57
  <div class="amp-social-icon amp-social-facebookmessenger">
58
  <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
52
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
53
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
54
  <?php } ?>
55
+ <?php if ( true == ampforwp_get_setting('enable-single-facebook-share-messenger') && $amp_permalink_fb_messenger!='') { ?>
56
  <a title="facebookmessenger share" <?php ampforwp_nofollow_social_links(); ?> href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>" target="_blank" aria-label="facebookmessenger share">
57
  <div class="amp-social-icon amp-social-facebookmessenger">
58
  <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
templates/design-manager/swift/footer.php CHANGED
@@ -110,7 +110,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
110
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
111
  </li>
112
  <?php } ?>
113
- <?php if(true == ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
114
  <li>
115
  <a title="facebook share messenger" <?php ampforwp_nofollow_social_links(); ?> target="_blank" href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>">
116
  <div class="amp-social-icon amp-social-facebookmessenger">
110
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
111
  </li>
112
  <?php } ?>
113
+ <?php if(true == ampforwp_get_setting('enable-single-facebook-share-messenger') && $amp_permalink_fb_messenger!=''){?>
114
  <li>
115
  <a title="facebook share messenger" <?php ampforwp_nofollow_social_links(); ?> target="_blank" href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>">
116
  <div class="amp-social-icon amp-social-facebookmessenger">
templates/design-manager/swift/page.php CHANGED
@@ -14,6 +14,7 @@ amp_header(); ?>
14
  <?php amp_title(); ?>
15
  <?php } ?>
16
  <?php } // Level up Condition ends here?>
 
17
  <?php if ( true == ampforwp_get_setting('featured_image_swift_page') && ampforwp_has_post_thumbnail() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
18
  <div class="sf-img">
19
  <?php amp_featured_image();?>
@@ -23,6 +24,7 @@ amp_header(); ?>
23
  <?php amp_featured_image();?>
24
  </div>
25
  <?php } ?>
 
26
  <div class="pg">
27
  <?php if ( is_page() && true == ampforwp_get_setting('ampforwp-page-social') && 'above-content' == ampforwp_get_setting('swift-social-position') ){
28
  ampforwp_swift_social_icons();
14
  <?php amp_title(); ?>
15
  <?php } ?>
16
  <?php } // Level up Condition ends here?>
17
+ </div>
18
  <?php if ( true == ampforwp_get_setting('featured_image_swift_page') && ampforwp_has_post_thumbnail() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
19
  <div class="sf-img">
20
  <?php amp_featured_image();?>
24
  <?php amp_featured_image();?>
25
  </div>
26
  <?php } ?>
27
+ <div <?php if(!checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){ ?>class="cntr"<?php } ?>>
28
  <div class="pg">
29
  <?php if ( is_page() && true == ampforwp_get_setting('ampforwp-page-social') && 'above-content' == ampforwp_get_setting('swift-social-position') ){
30
  ampforwp_swift_social_icons();
templates/design-manager/swift/style.php CHANGED
@@ -2337,4 +2337,7 @@ if(ampforwp_get_setting('ampforwp-gallery-design-type')==3){?>
2337
  .artl-cnt a,.cntn-wrp a{
2338
  text-decoration: underline;
2339
  }
2340
- <?php } // Underline CSS Ends?>
 
 
 
2337
  .artl-cnt a,.cntn-wrp a{
2338
  text-decoration: underline;
2339
  }
2340
+ <?php } // Underline CSS Ends?>
2341
+ figure.amp-featured-image {
2342
+ margin: 10px 0;
2343
+ }
templates/features.php CHANGED
@@ -1220,7 +1220,7 @@ function ampforwp_sticky_social_icons(){
1220
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28"></amp-social-share>
1221
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
1222
  <?php } ?>
1223
- <?php if(true == ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
1224
  <a title="facebook share messenger" <?php ampforwp_nofollow_social_links(); ?> target="_blank" href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>">
1225
  <div class="amp-social-icon amp-social-facebookmessenger">
1226
  <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
@@ -7107,14 +7107,13 @@ function ampforwp_webp_featured_image() {
7107
  }
7108
  $alt = convert_chars( stripslashes( $alt ) );
7109
  $image_output = "<amp-img src='".esc_url($image[0])."' width='".esc_attr($image[1])."' height='".esc_attr($image[2])."' layout='responsive' alt='".esc_attr($alt)."' ></amp-img>";?>
7110
- <figure class="amp-wp-article-featured-image">
7111
  <?php
7112
- if(1 == ampforwp_get_setting('amp-design-selector') || 2 == ampforwp_get_setting('amp-design-selector') || 3 == ampforwp_get_setting('amp-design-selector')){
7113
- echo $image_output; // escaped above
7114
- }
7115
- ?>
7116
- </figure>
7117
- <?php
7118
  }
7119
  }
7120
 
@@ -7966,4 +7965,28 @@ function ampforwp_seo_selection_notice() {
7966
  if(!empty($seo)){
7967
  echo sprintf(('<div class="notice notice-error"><p>%s <a href="%s">%s</a></p></div>'), esc_html__('The configuration of AMPforWP and '.esc_html($seo).' plugin is seems incorrect. Please go to AMPforWP plugin settings and select '.esc_html($seo).' from SEO Plugin Integration or ','accelerated-mobile-pages'),esc_url(admin_url('admin.php?page=amp_options&tab=5')),esc_html__('Click Here','accelerated-mobile-pages'));
7968
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7969
  }
1220
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28"></amp-social-share>
1221
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
1222
  <?php } ?>
1223
+ <?php if(true == ampforwp_get_setting('enable-single-facebook-share-messenger') && $amp_permalink_fb_messenger!=''){?>
1224
  <a title="facebook share messenger" <?php ampforwp_nofollow_social_links(); ?> target="_blank" href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>">
1225
  <div class="amp-social-icon amp-social-facebookmessenger">
1226
  <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
7107
  }
7108
  $alt = convert_chars( stripslashes( $alt ) );
7109
  $image_output = "<amp-img src='".esc_url($image[0])."' width='".esc_attr($image[1])."' height='".esc_attr($image[2])."' layout='responsive' alt='".esc_attr($alt)."' ></amp-img>";?>
 
7110
  <?php
7111
+ if(1 == ampforwp_get_setting('amp-design-selector') || 2 == ampforwp_get_setting('amp-design-selector') || 3 == ampforwp_get_setting('amp-design-selector')){?>
7112
+ <figure class="amp-wp-article-featured-image">
7113
+ <?php echo $image_output; // escaped above
7114
+ ?>
7115
+ </figure>
7116
+ <?php }
7117
  }
7118
  }
7119
 
7965
  if(!empty($seo)){
7966
  echo sprintf(('<div class="notice notice-error"><p>%s <a href="%s">%s</a></p></div>'), esc_html__('The configuration of AMPforWP and '.esc_html($seo).' plugin is seems incorrect. Please go to AMPforWP plugin settings and select '.esc_html($seo).' from SEO Plugin Integration or ','accelerated-mobile-pages'),esc_url(admin_url('admin.php?page=amp_options&tab=5')),esc_html__('Click Here','accelerated-mobile-pages'));
7967
  }
7968
+ }
7969
+
7970
+ if(!function_exists('ampforwp_check_image_existance')){
7971
+ function ampforwp_check_image_existance($image){
7972
+ if(preg_match('/wp-content\/uploads/', $image)){
7973
+ $img_arr = explode('wp-content', $image);
7974
+ if(!empty($img_arr) && isset($img_arr[1])){
7975
+ $img = WP_CONTENT_DIR.$img_arr[1];
7976
+ if(!file_exists($img)){
7977
+ if(preg_match('/\d+x\d+/', $image,$ma)){
7978
+ $t_sizes = explode('x', $ma[0]);
7979
+ $width = $t_sizes[0];
7980
+ $height = $t_sizes[1];
7981
+ $image = preg_replace('/-\d+x\d+/','', $image);
7982
+ $resize = ampforwp_aq_resize( $image, $width , $height , true, false, true );
7983
+ if(isset($resize[0])){
7984
+ $image = $resize[0];
7985
+ }
7986
+ }
7987
+ }
7988
+ }
7989
+ }
7990
+ return $image;
7991
+ }
7992
  }