AMP for WP – Accelerated Mobile Pages - Version 1.0.30

Version Description

(24th February 2020) = * Improvement: Added Autoplay in Image Gallery #3705 * Fixed: Jetpack lazy loading not working due to our AMPforWP plugin #4183 * Fixed: Amp comments Bug with update 1.0.28 #4209 * Fixed: Removed Table styles when AMP Pagebuilder compatibility plugin is active #4185 * Fixed: Debug warning fixed #4204 #4212

Download this release

Release Info

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

Code changes from version 1.0.29 to 1.0.30

Files changed (30) hide show
  1. README.md +8 -1
  2. accelerated-moblie-pages.php +2 -2
  3. changelog.txt +7 -0
  4. classes/class-ampforwp-photo-gallery-embed.php +1 -1
  5. classes/class-ampforwp-rev-slider.php +3 -1
  6. classes/class-ampforwp-slide-anything-embed.php +3 -1
  7. includes/redirect.php +1 -1
  8. includes/vendor/amp/includes/amp-post-template-actions.php +1 -0
  9. includes/vendor/amp/includes/embeds/class-amp-gallery-embed.php +3 -1
  10. includes/vendor/amp/includes/sanitizers/class-amp-gallery-block-sanitizer.php +4 -0
  11. includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php +4 -1
  12. pagebuilder/modules/slider-mod-module.php +1 -1
  13. readme.txt +8 -1
  14. templates/design-manager/design-1/elements/comments.php +1 -1
  15. templates/design-manager/design-1/footer.php +1 -0
  16. templates/design-manager/design-1/style.php +10 -1
  17. templates/design-manager/design-2/elements/comments.php +1 -1
  18. templates/design-manager/design-2/footer.php +1 -0
  19. templates/design-manager/design-2/style.php +11 -1
  20. templates/design-manager/design-3/elements/comments.php +1 -1
  21. templates/design-manager/design-3/footer.php +1 -0
  22. templates/design-manager/design-3/functions.php +1 -1
  23. templates/design-manager/design-3/style.php +10 -1
  24. templates/design-manager/swift/archive.php +1 -0
  25. templates/design-manager/swift/footer.php +1 -0
  26. templates/design-manager/swift/index.php +1 -0
  27. templates/design-manager/swift/page.php +2 -0
  28. templates/design-manager/swift/search.php +1 -0
  29. templates/design-manager/swift/single.php +1 -0
  30. templates/features.php +10 -7
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.29
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,13 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
197
  = 1.0.29 (21th February 2020) =
198
  * Improvement: Created an option for entering URLs to prefetch. #3997
199
  * Fixed: Admin bar css is not loaded on amp pages #4130
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.30
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.30 (24th February 2020) =
198
+ * Improvement: Added Autoplay in Image Gallery #3705
199
+ * Fixed: Jetpack lazy loading not working due to our AMPforWP plugin #4183
200
+ * Fixed: Amp comments Bug with update 1.0.28 #4209
201
+ * Fixed: Removed Table styles when AMP Pagebuilder compatibility plugin is active #4185
202
+ * Fixed: Debug warning fixed #4204 #4212
203
+
204
  = 1.0.29 (21th February 2020) =
205
  * Improvement: Created an option for entering URLs to prefetch. #3997
206
  * Fixed: Admin bar css is not loaded on amp pages #4130
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.29
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.29');
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.30
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.30');
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,12 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
3
  = 1.0.29 (21th February 2020) =
4
  * Improvement: Created an option for entering URLs to prefetch. #3997
5
  * Fixed: Admin bar css is not loaded on amp pages #4130
1
  == Changelog ==
2
 
3
+ = 1.0.30 (24th February 2020) =
4
+ * Improvement: Added Autoplay in Image Gallery #3705
5
+ * Fixed: Jetpack lazy loading not working due to our AMPforWP plugin #4183
6
+ * Fixed: Amp comments Bug with update 1.0.28 #4209
7
+ * Fixed: Removed Table styles when AMP Pagebuilder compatibility plugin is active #4185
8
+ * Fixed: Debug warning fixed #4204 #4212
9
+
10
  = 1.0.29 (21th February 2020) =
11
  * Improvement: Created an option for entering URLs to prefetch. #3997
12
  * Fixed: Admin bar css is not loaded on amp pages #4130
classes/class-ampforwp-photo-gallery-embed.php CHANGED
@@ -9,7 +9,7 @@ require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handle
9
 
10
  class AMPforWP_Photo_Gallery_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
11
  private static $script_slug = 'amp-carousel';
12
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
13
 
14
  public function register_embed() {
15
  add_shortcode( 'Best_Wordpress_Gallery', array( $this, 'shortcode' ) );
9
 
10
  class AMPforWP_Photo_Gallery_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
11
  private static $script_slug = 'amp-carousel';
12
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.2.js';
13
 
14
  public function register_embed() {
15
  add_shortcode( 'Best_Wordpress_Gallery', array( $this, 'shortcode' ) );
classes/class-ampforwp-rev-slider.php CHANGED
@@ -9,7 +9,7 @@ require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handle
9
 
10
  class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
11
  private static $script_slug = 'amp-carousel';
12
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
13
 
14
  public function register_embed() {
15
  add_shortcode( 'rev_slider', array( $this, 'shortcode' ) );
@@ -346,6 +346,8 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
346
  'width' => $this->args['width'],
347
  'height' => $this->args['height'],
348
  'type' => 'slides',
 
 
349
  'layout' => 'responsive',
350
  'class' => 'collapsible-captions',
351
  'id' => 'carousel-with-carousel-preview-'.$r
9
 
10
  class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
11
  private static $script_slug = 'amp-carousel';
12
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.2.js';
13
 
14
  public function register_embed() {
15
  add_shortcode( 'rev_slider', array( $this, 'shortcode' ) );
346
  'width' => $this->args['width'],
347
  'height' => $this->args['height'],
348
  'type' => 'slides',
349
+ 'loop' =>'',
350
+ 'autoplay' =>'',
351
  'layout' => 'responsive',
352
  'class' => 'collapsible-captions',
353
  'id' => 'carousel-with-carousel-preview-'.$r
classes/class-ampforwp-slide-anything-embed.php CHANGED
@@ -6,7 +6,7 @@ require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handle
6
 
7
  class AMPFORWP_Slide_Anything_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
8
  private static $script_slug = 'amp-carousel';
9
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
10
 
11
  public function register_embed() {
12
  add_shortcode( 'slide-anything', array( $this, 'shortcode' ) );
@@ -258,6 +258,8 @@ class AMPFORWP_Slide_Anything_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_
258
  'width' => $this->args['width'],
259
  'height' => $this->args['height'],
260
  'type' => 'slides',
 
 
261
  'layout' => 'responsive',
262
  'class' => 'collapsible-captions',
263
  'id' => 'carousel-with-carousel-preview-'.$r
6
 
7
  class AMPFORWP_Slide_Anything_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Handler {
8
  private static $script_slug = 'amp-carousel';
9
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.2.js';
10
 
11
  public function register_embed() {
12
  add_shortcode( 'slide-anything', array( $this, 'shortcode' ) );
258
  'width' => $this->args['width'],
259
  'height' => $this->args['height'],
260
  'type' => 'slides',
261
+ 'loop' =>'',
262
+ 'autoplay' =>'',
263
  'layout' => 'responsive',
264
  'class' => 'collapsible-captions',
265
  'id' => 'carousel-with-carousel-preview-'.$r
includes/redirect.php CHANGED
@@ -168,7 +168,7 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
168
  $redirection_location = get_the_permalink();
169
  }
170
  $ampforwp_amp_post_on_off_meta = "";
171
- $ampforwp_amp_post_on_off_meta = get_post_meta( $post_id,'ampforwp-amp-on-off',true);
172
  if(false == $ampforwp_amp_post_on_off_meta){
173
  return;
174
  }
168
  $redirection_location = get_the_permalink();
169
  }
170
  $ampforwp_amp_post_on_off_meta = "";
171
+ $ampforwp_amp_post_on_off_meta = get_post_meta( ampforwp_get_the_ID(),'ampforwp-amp-on-off',true);
172
  if(false == $ampforwp_amp_post_on_off_meta){
173
  return;
174
  }
includes/vendor/amp/includes/amp-post-template-actions.php CHANGED
@@ -62,6 +62,7 @@ function amp_post_template_add_cached_link($amp_template) {
62
  add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_scripts' );
63
  function amp_post_template_add_scripts( $amp_template ) {
64
  $scripts = $amp_template->get( 'amp_component_scripts', array() );
 
65
  foreach ( $scripts as $element => $script ) :
66
  $custom_type = ($element == 'amp-mustache') ? 'template' : 'element'; ?>
67
  <script custom-<?php echo esc_attr( $custom_type ); ?>="<?php echo esc_attr( $element ); ?>" src="<?php echo esc_url( $script ); ?>" async></script>
62
  add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_scripts' );
63
  function amp_post_template_add_scripts( $amp_template ) {
64
  $scripts = $amp_template->get( 'amp_component_scripts', array() );
65
+ $scripts = apply_filters('ampforwp_set_amp_custom_type_script',$scripts);
66
  foreach ( $scripts as $element => $script ) :
67
  $custom_type = ($element == 'amp-mustache') ? 'template' : 'element'; ?>
68
  <script custom-<?php echo esc_attr( $custom_type ); ?>="<?php echo esc_attr( $element ); ?>" src="<?php echo esc_url( $script ); ?>" async></script>
includes/vendor/amp/includes/embeds/class-amp-gallery-embed.php CHANGED
@@ -7,7 +7,7 @@ require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-base-embed-handle
7
 
8
  class AMP_Gallery_Embed_Handler extends AMP_Base_Embed_Handler {
9
  private static $script_slug = 'amp-carousel';
10
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
11
 
12
  public function register_embed() {
13
  add_shortcode( 'gallery', array( $this, 'shortcode' ) );
@@ -253,6 +253,8 @@ class AMP_Gallery_Embed_Handler extends AMP_Base_Embed_Handler {
253
  'width' => $this->args['width'],
254
  'height' => $this->args['height'],
255
  'type' => 'slides',
 
 
256
  'controls' =>'',
257
  'layout' => 'responsive',
258
  'class' => 'collapsible-captions',
7
 
8
  class AMP_Gallery_Embed_Handler extends AMP_Base_Embed_Handler {
9
  private static $script_slug = 'amp-carousel';
10
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-carousel-0.2.js';
11
 
12
  public function register_embed() {
13
  add_shortcode( 'gallery', array( $this, 'shortcode' ) );
253
  'width' => $this->args['width'],
254
  'height' => $this->args['height'],
255
  'type' => 'slides',
256
+ 'loop' =>'',
257
+ 'autoplay' =>'',
258
  'controls' =>'',
259
  'layout' => 'responsive',
260
  'class' => 'collapsible-captions',
includes/vendor/amp/includes/sanitizers/class-amp-gallery-block-sanitizer.php CHANGED
@@ -330,6 +330,8 @@ class AMP_Gallery_Block_Sanitizer extends AMP_Base_Sanitizer {
330
  'width' => 600,
331
  'height' => 480,
332
  'type' => 'slides',
 
 
333
  'layout' => 'responsive',
334
  'class' => 'collapsible-captions',
335
  'id' => 'carousel-with-carousel-preview-'.$r
@@ -349,6 +351,8 @@ class AMP_Gallery_Block_Sanitizer extends AMP_Base_Sanitizer {
349
  'width' => 'auto',
350
  'height' => 48,
351
  'type' => 'carousel',
 
 
352
  'layout' => 'fixed-height',
353
  'class' => 'carousel-preview'
354
  )
330
  'width' => 600,
331
  'height' => 480,
332
  'type' => 'slides',
333
+ 'loop' => '',
334
+ 'autoplay' => '',
335
  'layout' => 'responsive',
336
  'class' => 'collapsible-captions',
337
  'id' => 'carousel-with-carousel-preview-'.$r
351
  'width' => 'auto',
352
  'height' => 48,
353
  'type' => 'carousel',
354
+ 'loop' => '',
355
+ 'autoplay' => '',
356
  'layout' => 'fixed-height',
357
  'class' => 'carousel-preview'
358
  )
includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php CHANGED
@@ -208,9 +208,12 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
208
  $scriptArray = array_fill_keys( $this->script_components, true );
209
  foreach ( $scriptArray as $ext_key=>$ext_value ) {
210
  $version = 'latest';
211
- if ( 'amp-carousel' == $ext_key || 'amp-auto-ads' == $ext_key || 'amp-ad' == $ext_key ) {
212
  $version = '0.1';
213
  }
 
 
 
214
  $scriptArray[$ext_key] = sprintf(
215
  'https://cdn.ampproject.org/v0/%s-%s.js',
216
  $ext_key,
208
  $scriptArray = array_fill_keys( $this->script_components, true );
209
  foreach ( $scriptArray as $ext_key=>$ext_value ) {
210
  $version = 'latest';
211
+ if ('amp-auto-ads' == $ext_key || 'amp-ad' == $ext_key ) {
212
  $version = '0.1';
213
  }
214
+ if ( 'amp-carousel' == $ext_key){
215
+ $version = '0.2';
216
+ }
217
  $scriptArray[$ext_key] = sprintf(
218
  'https://cdn.ampproject.org/v0/%s-%s.js',
219
  $ext_key,
pagebuilder/modules/slider-mod-module.php CHANGED
@@ -190,7 +190,7 @@ return array(
190
  'type' =>'require_script',
191
  'name' =>"carousel_script",
192
  'label' =>'amp-carousel',
193
- 'default' =>'https://cdn.ampproject.org/v0/amp-carousel-0.1.js',
194
  'content_type'=>'js',
195
  ),
196
  array(
190
  'type' =>'require_script',
191
  'name' =>"carousel_script",
192
  'label' =>'amp-carousel',
193
+ 'default' =>'https://cdn.ampproject.org/v0/amp-carousel-0.2.js',
194
  'content_type'=>'js',
195
  ),
196
  array(
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.29
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,13 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
194
  = 1.0.29 (21th February 2020) =
195
  * Improvement: Created an option for entering URLs to prefetch. #3997
196
  * Fixed: Admin bar css is not loaded on amp pages #4130
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.30
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.30 (24th February 2020) =
195
+ * Improvement: Added Autoplay in Image Gallery #3705
196
+ * Fixed: Jetpack lazy loading not working due to our AMPforWP plugin #4183
197
+ * Fixed: Amp comments Bug with update 1.0.28 #4209
198
+ * Fixed: Removed Table styles when AMP Pagebuilder compatibility plugin is active #4185
199
+ * Fixed: Debug warning fixed #4204 #4212
200
+
201
  = 1.0.29 (21th February 2020) =
202
  * Improvement: Created an option for entering URLs to prefetch. #3997
203
  * Fixed: Admin bar css is not loaded on amp pages #4130
templates/design-manager/design-1/elements/comments.php CHANGED
@@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
25
  $comment_nums = get_comments_number();
26
  $comment_nums = " ($comment_nums) " ?>
27
 
28
- <div class="amp-wp-content cmts_list">
29
  <h3><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'] , 'View Comments' )). esc_attr($comment_nums)?></h3>
30
  <ul> <?php // Display the list of comments
31
  function ampforwp_custom_translated_comment($comment, $args, $depth){
25
  $comment_nums = get_comments_number();
26
  $comment_nums = " ($comment_nums) " ?>
27
 
28
+ <div class="amp-wp-content comments_list cmts_list">
29
  <h3><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'] , 'View Comments' )). esc_attr($comment_nums)?></h3>
30
  <ul> <?php // Display the list of comments
31
  function ampforwp_custom_translated_comment($comment, $args, $depth){
templates/design-manager/design-1/footer.php CHANGED
@@ -10,6 +10,7 @@ wp_reset_postdata(); ?>
10
  <div class="f-w-blk">
11
  <div class="d3f-w">
12
  <?php
 
13
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-footer-widget-area');
14
  if ( $sanitized_sidebar) {
15
  $sidebar_output = $sanitized_sidebar->get_amp_content();
10
  <div class="f-w-blk">
11
  <div class="d3f-w">
12
  <?php
13
+ $sidebar_output = '';
14
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-footer-widget-area');
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
templates/design-manager/design-1/style.php CHANGED
@@ -722,4 +722,13 @@ amp-facebook-like{
722
  top: 0px;
723
  right: 0;
724
  cursor:pointer;
725
- }
 
 
 
 
 
 
 
 
 
722
  top: 0px;
723
  right: 0;
724
  cursor:pointer;
725
+ }
726
+ <?php if(ampforwp_get_setting('ampforwp-gallery-design-type')==3){?>
727
+ .ampforwp-gallery-item.amp-carousel-containerd3 {
728
+ float: left;
729
+ }
730
+ .amp-carousel-containerd3 figcaption {
731
+ max-width: 150px;
732
+ border:none;
733
+ }
734
+ <?php } ?>
templates/design-manager/design-2/elements/comments.php CHANGED
@@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
25
  $comment_nums = get_comments_number();
26
  $comment_nums = " ($comment_nums) " ?>
27
 
28
- <div class="amp-wp-content cmts_list">
29
  <h3><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'] , 'View Comments' )). $comment_nums?></h3>
30
  <ul> <?php // Display the list of comments
31
  function ampforwp_custom_translated_comment($comment, $args, $depth){
25
  $comment_nums = get_comments_number();
26
  $comment_nums = " ($comment_nums) " ?>
27
 
28
+ <div class="amp-wp-content comments_list cmts_list">
29
  <h3><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'] , 'View Comments' )). $comment_nums?></h3>
30
  <ul> <?php // Display the list of comments
31
  function ampforwp_custom_translated_comment($comment, $args, $depth){
templates/design-manager/design-2/footer.php CHANGED
@@ -10,6 +10,7 @@ global $redux_builder_amp;
10
  <div class="f-w-blk">
11
  <div class="d3f-w">
12
  <?php
 
13
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-footer-widget-area');
14
  if ( $sanitized_sidebar) {
15
  $sidebar_output = $sanitized_sidebar->get_amp_content();
10
  <div class="f-w-blk">
11
  <div class="d3f-w">
12
  <?php
13
+ $sidebar_output = '';
14
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-footer-widget-area');
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
templates/design-manager/design-2/style.php CHANGED
@@ -833,4 +833,14 @@ if(true == ampforwp_get_setting('ampforwp-single-related-posts-excerpt')){?>
833
  }
834
  .ampforwp-blocks-gallery-caption{
835
  font-size: 16px;
836
- }
 
 
 
 
 
 
 
 
 
 
833
  }
834
  .ampforwp-blocks-gallery-caption{
835
  font-size: 16px;
836
+ }
837
+
838
+ <?php if(ampforwp_get_setting('ampforwp-gallery-design-type')==3){?>
839
+ .ampforwp-gallery-item.amp-carousel-containerd3 {
840
+ float: left;
841
+ }
842
+ .amp-carousel-containerd3 figcaption {
843
+ max-width: 150px;
844
+ border:none;
845
+ }
846
+ <?php } ?>
templates/design-manager/design-3/elements/comments.php CHANGED
@@ -25,7 +25,7 @@ do_action('ampforwp_before_comment_hook',$this);
25
  $comment_nums = get_comments_number();
26
  $comment_nums = " ($comment_nums) " ?>
27
 
28
- <div class="amp-wp-content cmts_list">
29
  <h3><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'] , 'View Comments' )). $comment_nums?></h3>
30
  <ul> <?php // Display the list of comments
31
  function ampforwp_custom_translated_comment($comment, $args, $depth){
25
  $comment_nums = get_comments_number();
26
  $comment_nums = " ($comment_nums) " ?>
27
 
28
+ <div class="amp-wp-content comments_list cmts_list">
29
  <h3><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'] , 'View Comments' )). $comment_nums?></h3>
30
  <ul> <?php // Display the list of comments
31
  function ampforwp_custom_translated_comment($comment, $args, $depth){
templates/design-manager/design-3/footer.php CHANGED
@@ -10,6 +10,7 @@ global $redux_builder_amp;
10
  <div class="f-w-blk">
11
  <div class="d3f-w">
12
  <?php
 
13
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-footer-widget-area');
14
  if ( $sanitized_sidebar) {
15
  $sidebar_output = $sanitized_sidebar->get_amp_content();
10
  <div class="f-w-blk">
11
  <div class="d3f-w">
12
  <?php
13
+ $sidebar_output = '';
14
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-footer-widget-area');
15
  if ( $sanitized_sidebar) {
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
templates/design-manager/design-3/functions.php CHANGED
@@ -26,7 +26,7 @@ function ampforwp_add_design3_required_scripts( $data ) {
26
  if ( $redux_builder_amp['amp-design-3-featured-slider'] == 1 && $redux_builder_amp['amp-design-selector'] == 3 && $redux_builder_amp['amp-frontpage-select-option'] == 0 && get_query_var('paged') <= 1 || get_option( 'page_for_posts' ) && get_query_var('paged') <= 1 && in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) {
27
 
28
  if ( empty( $data['amp_component_scripts']['amp-carousel'] ) ) {
29
- $data['amp_component_scripts']['amp-carousel'] = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
30
  }
31
  }
32
  }
26
  if ( $redux_builder_amp['amp-design-3-featured-slider'] == 1 && $redux_builder_amp['amp-design-selector'] == 3 && $redux_builder_amp['amp-frontpage-select-option'] == 0 && get_query_var('paged') <= 1 || get_option( 'page_for_posts' ) && get_query_var('paged') <= 1 && in_array( ampforwp_name_blog_page() , $current_url_in_pieces ) ) {
27
 
28
  if ( empty( $data['amp_component_scripts']['amp-carousel'] ) ) {
29
+ $data['amp_component_scripts']['amp-carousel'] = 'https://cdn.ampproject.org/v0/amp-carousel-0.2.js';
30
  }
31
  }
32
  }
templates/design-manager/design-3/style.php CHANGED
@@ -1069,4 +1069,13 @@ if(true == ampforwp_get_setting('ampforwp-single-related-posts-excerpt')){?>
1069
  }
1070
  .ampforwp-blocks-gallery-caption{
1071
  font-size: 16px;
1072
- }
 
 
 
 
 
 
 
 
 
1069
  }
1070
  .ampforwp-blocks-gallery-caption{
1071
  font-size: 16px;
1072
+ }
1073
+ <?php if(ampforwp_get_setting('ampforwp-gallery-design-type')==3){?>
1074
+ .ampforwp-gallery-item.amp-carousel-containerd3 {
1075
+ float: left;
1076
+ }
1077
+ .amp-carousel-containerd3 figcaption {
1078
+ max-width: 150px;
1079
+ border:none;
1080
+ }
1081
+ <?php } ?>
templates/design-manager/swift/archive.php CHANGED
@@ -18,6 +18,7 @@ amp_header() ?>
18
  if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
19
  <div class="sdbr-right">
20
  <?php
 
21
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
22
  if ( $sanitized_sidebar) {
23
  $sidebar_output = $sanitized_sidebar->get_amp_content();
18
  if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
19
  <div class="sdbr-right">
20
  <?php
21
+ $sidebar_output = '';
22
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
23
  if ( $sanitized_sidebar) {
24
  $sidebar_output = $sanitized_sidebar->get_amp_content();
templates/design-manager/swift/footer.php CHANGED
@@ -15,6 +15,7 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
15
  <div class="cntr">
16
  <div class="f-w">
17
  <?php
 
18
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-footer-widget-area');
19
  if ( $sanitized_sidebar) {
20
  $sidebar_output = $sanitized_sidebar->get_amp_content();
15
  <div class="cntr">
16
  <div class="f-w">
17
  <?php
18
+ $sidebar_output = '';
19
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-footer-widget-area');
20
  if ( $sanitized_sidebar) {
21
  $sidebar_output = $sanitized_sidebar->get_amp_content();
templates/design-manager/swift/index.php CHANGED
@@ -81,6 +81,7 @@ global $redux_builder_amp; ?>
81
  <?php if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
82
  <div class="sdbr-right">
83
  <?php
 
84
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
85
  if ( $sanitized_sidebar) {
86
  $sidebar_output = $sanitized_sidebar->get_amp_content();
81
  <?php if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
82
  <div class="sdbr-right">
83
  <?php
84
+ $sidebar_output = '';
85
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
86
  if ( $sanitized_sidebar) {
87
  $sidebar_output = $sanitized_sidebar->get_amp_content();
templates/design-manager/swift/page.php CHANGED
@@ -61,6 +61,7 @@ amp_header(); ?>
61
  <?php if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
62
  <div class="sdbr-right"> <?php
63
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
 
64
  if ( $sanitized_sidebar) {
65
  $sidebar_output = $sanitized_sidebar->get_amp_content();
66
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
@@ -75,6 +76,7 @@ amp_header(); ?>
75
  <div class="sdbr-right" style="float: right;" >
76
  <?php
77
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
 
78
  if ( $sanitized_sidebar) {
79
  $sidebar_output = $sanitized_sidebar->get_amp_content();
80
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
61
  <?php if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
62
  <div class="sdbr-right"> <?php
63
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
64
+ $sidebar_output = '';
65
  if ( $sanitized_sidebar) {
66
  $sidebar_output = $sanitized_sidebar->get_amp_content();
67
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
76
  <div class="sdbr-right" style="float: right;" >
77
  <?php
78
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
79
+ $sidebar_output = '';
80
  if ( $sanitized_sidebar) {
81
  $sidebar_output = $sanitized_sidebar->get_amp_content();
82
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
templates/design-manager/swift/search.php CHANGED
@@ -29,6 +29,7 @@ amp_header() ?>
29
  <?php if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
30
  <div class="sdbr-right">
31
  <?php
 
32
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
33
  if ( $sanitized_sidebar) {
34
  $sidebar_output = $sanitized_sidebar->get_amp_content();
29
  <?php if(isset($redux_builder_amp['gbl-sidebar']) && $redux_builder_amp['gbl-sidebar'] == '1'){ ?>
30
  <div class="sdbr-right">
31
  <?php
32
+ $sidebar_output = '';
33
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
34
  if ( $sanitized_sidebar) {
35
  $sidebar_output = $sanitized_sidebar->get_amp_content();
templates/design-manager/swift/single.php CHANGED
@@ -471,6 +471,7 @@ do_action("ampforwp_single_design_type_handle_d1");
471
  <div class="sdbr-right">
472
  <?php
473
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
 
474
  if ( $sanitized_sidebar) {
475
  $sidebar_output = $sanitized_sidebar->get_amp_content();
476
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
471
  <div class="sdbr-right">
472
  <?php
473
  $sanitized_sidebar = ampforwp_sidebar_content_sanitizer('swift-sidebar');
474
+ $sidebar_output = '';
475
  if ( $sanitized_sidebar) {
476
  $sidebar_output = $sanitized_sidebar->get_amp_content();
477
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
templates/features.php CHANGED
@@ -2055,9 +2055,6 @@ function ampforwp_lazy_loading_plugins_compatibility() {
2055
  remove_filter( 'widget_text', array( $lazyloadxt, 'filter_html' ) );
2056
  remove_filter( 'post_thumbnail_html', array( $lazyloadxt, 'filter_html' ) );
2057
  remove_filter( 'get_avatar', array( $lazyloadxt, 'filter_html' ) );
2058
-
2059
- // Lazy Load
2060
- add_filter( 'lazyload_is_enabled', '__return_false', PHP_INT_MAX );
2061
  }
2062
 
2063
  //Removing bj loading for amp
@@ -3404,7 +3401,7 @@ function ampforwp_frontpage_comments() {
3404
  $comment_button_url = get_permalink( $post_id );
3405
  $comment_button_url = apply_filters('ampforwp_frontpage_comments_url',$comment_button_url );
3406
  if ( $comments ) { ?>
3407
- <div class="amp-wp-content cmts_list">
3408
  <h3><?php global $redux_builder_amp; echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'] , 'View Comments' ))?></h3>
3409
  <ul>
3410
  <?php
@@ -6757,7 +6754,7 @@ function ampforwp_add_global_scripts($data){
6757
  //Appearance option for Related Posts #1545
6758
  if ( true == ampforwp_get_setting('ampforwp-single-related-posts-switch') && ampforwp_get_setting('rp_design_type') == '3') {
6759
  if ( empty( $data['amp_component_scripts']['amp-carousel'] ) ) {
6760
- $data['amp_component_scripts']['amp-carousel'] = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
6761
  }
6762
  }
6763
  return $data;
@@ -7978,8 +7975,14 @@ if(!function_exists('ampforwp_imagify_webp_compatibility')){
7978
  if(function_exists('_imagify_init')){
7979
  preg_match_all('/src="(.*?)"/', $content,$src);
7980
  $imageify_opt = get_option( 'imagify_settings' );
7981
- $convert_to_webp = $imageify_opt['convert_to_webp'];
7982
- $display_webp = $imageify_opt['display_webp'];
 
 
 
 
 
 
7983
  if($convert_to_webp && $display_webp){
7984
  $img_url = esc_url($src[1][0]);
7985
  if(!preg_match('/\.webp/', $img_url)){
2055
  remove_filter( 'widget_text', array( $lazyloadxt, 'filter_html' ) );
2056
  remove_filter( 'post_thumbnail_html', array( $lazyloadxt, 'filter_html' ) );
2057
  remove_filter( 'get_avatar', array( $lazyloadxt, 'filter_html' ) );
 
 
 
2058
  }
2059
 
2060
  //Removing bj loading for amp
3401
  $comment_button_url = get_permalink( $post_id );
3402
  $comment_button_url = apply_filters('ampforwp_frontpage_comments_url',$comment_button_url );
3403
  if ( $comments ) { ?>
3404
+ <div class="amp-wp-content comments_list cmts_list">
3405
  <h3><?php global $redux_builder_amp; echo esc_html(ampforwp_translation($redux_builder_amp['amp-translator-view-comments-text'] , 'View Comments' ))?></h3>
3406
  <ul>
3407
  <?php
6754
  //Appearance option for Related Posts #1545
6755
  if ( true == ampforwp_get_setting('ampforwp-single-related-posts-switch') && ampforwp_get_setting('rp_design_type') == '3') {
6756
  if ( empty( $data['amp_component_scripts']['amp-carousel'] ) ) {
6757
+ $data['amp_component_scripts']['amp-carousel'] = 'https://cdn.ampproject.org/v0/amp-carousel-0.2.js';
6758
  }
6759
  }
6760
  return $data;
7975
  if(function_exists('_imagify_init')){
7976
  preg_match_all('/src="(.*?)"/', $content,$src);
7977
  $imageify_opt = get_option( 'imagify_settings' );
7978
+ $convert_to_webp = false;
7979
+ if(isset($imageify_opt['convert_to_webp'])){
7980
+ $convert_to_webp = $imageify_opt['convert_to_webp'];
7981
+ }
7982
+ $display_webp = false;
7983
+ if(isset($imageify_opt['display_webp'])){
7984
+ $display_webp = $imageify_opt['display_webp'];
7985
+ }
7986
  if($convert_to_webp && $display_webp){
7987
  $img_url = esc_url($src[1][0]);
7988
  if(!preg_match('/\.webp/', $img_url)){