AMP for WP – Accelerated Mobile Pages - Version 1.0.36

Version Description

(26th March 2020) = * Improvement: Added filter to modify role based access #4303 * Improvement: Added "srcset" on featured images #4257 * Improvement: Added option to resize the author images in author bio #4297 * Fixed: AMP child theme not working after update #4310 * Fixed: amp-fx-collection script was not loading #4275 * Fixed: Minify HTML & Query Monitor not working on some pages in AMP #4301 * Fixed: Related posts doesn't show more than 3-4 #4300 * Fixed: Incorrect alignment of Edit in twenty twenty WP theme #4246 * Fixed: Social Icons are out of alignment in Design 2 #4305

Download this release

Release Info

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

Code changes from version 1.0.35 to 1.0.36

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.35
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,17 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
 
 
 
 
197
  = 1.0.35 (23th March 2020) =
198
  * Fixed: Related post images not having alt attribute #4282
199
  * Fixed: iframes are not working with WP optimize premium #4290
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.36
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.36 (26th March 2020) =
198
+ * Improvement: Added filter to modify role based access #4303
199
+ * Improvement: Added "srcset" on featured images #4257
200
+ * Improvement: Added option to resize the author images in author bio #4297
201
+ * Fixed: AMP child theme not working after update #4310
202
+ * Fixed: amp-fx-collection script was not loading #4275
203
+ * Fixed: Minify HTML & Query Monitor not working on some pages in AMP #4301
204
+ * Fixed: Related posts doesn't show more than 3-4 #4300
205
+ * Fixed: Incorrect alignment of Edit in twenty twenty WP theme #4246
206
+ * Fixed: Social Icons are out of alignment in Design 2 #4305
207
+
208
  = 1.0.35 (23th March 2020) =
209
  * Fixed: Related post images not having alt attribute #4282
210
  * Fixed: iframes are not working with WP optimize premium #4290
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.35
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.35');
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.36
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.36');
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.35 (23th March 2020) =
4
  * Fixed: Related post images not having alt attribute #4282
5
  * Fixed: iframes are not working with WP optimize premium #4290
1
  == Changelog ==
2
 
3
+ = 1.0.36 (26th March 2020) =
4
+ * Improvement: Added filter to modify role based access #4303
5
+ * Improvement: Added "srcset" on featured images #4257
6
+ * Improvement: Added option to resize the author images in author bio #4297
7
+ * Fixed: AMP child theme not working after update #4310
8
+ * Fixed: amp-fx-collection script was not loading #4275
9
+ * Fixed: Minify HTML & Query Monitor not working on some pages in AMP #4301
10
+ * Fixed: Related posts doesn't show more than 3-4 #4300
11
+ * Fixed: Incorrect alignment of Edit in twenty twenty WP theme #4246
12
+ * Fixed: Social Icons are out of alignment in Design 2 #4305
13
+
14
  = 1.0.35 (23th March 2020) =
15
  * Fixed: Related post images not having alt attribute #4282
16
  * Fixed: iframes are not working with WP optimize premium #4290
components/author-box/author-box.php CHANGED
@@ -22,6 +22,7 @@ $show_date = false;
22
  $show_time = false;
23
  $author_name = $post_author->display_name;
24
  $and_text = '';
 
25
  $and_text = ampforwp_translation($redux_builder_amp['amp-translator-and-text'], 'and' );
26
  if ( function_exists('coauthors') ) {
27
  $author_name = coauthors($and_text,$and_text,null,null,false);
@@ -40,7 +41,18 @@ if ( isset($args['avatar']) ) {
40
  $avatar = $args['avatar'];
41
  }
42
  if ( isset($args['avatar_size']) ) {
43
- $avatar_size = $args['avatar_size'];
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
  if ( isset($args['class']) ) {
46
  $class = $args['class'];
@@ -74,13 +86,13 @@ if ( isset($args['show_time']) ) {
74
 
75
  ?>
76
  <div class="amp-author <?php echo esc_attr($class); ?>">
77
- <?php if ( $avatar ) {
78
  $author_avatar_url = ampforwp_get_wp_user_avatar();
79
  if( null == $author_avatar_url ){
80
  $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
81
  } ?>
82
  <div class="amp-author-image <?php echo esc_attr($author_image_wrapper); ?>">
83
- <amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo esc_attr($avatar_size); ?>" height="<?php echo esc_attr($avatar_size); ?>" layout="fixed"></amp-img>
84
  </div>
85
  <?php } ?>
86
  <?php echo '<div class="author-details '. esc_attr($author_wrapper_class) .'">';
22
  $show_time = false;
23
  $author_name = $post_author->display_name;
24
  $and_text = '';
25
+ $avatar_size_weight = $avatar_size_height = '';
26
  $and_text = ampforwp_translation($redux_builder_amp['amp-translator-and-text'], 'and' );
27
  if ( function_exists('coauthors') ) {
28
  $author_name = coauthors($and_text,$and_text,null,null,false);
41
  $avatar = $args['avatar'];
42
  }
43
  if ( isset($args['avatar_size']) ) {
44
+ $avatar_size = ampforwp_get_setting('amp-author-bio-image-width');
45
+ $avatar_size_width = ampforwp_get_setting('amp-author-bio-image-width');
46
+ $avatar_size_height = ampforwp_get_setting('amp-author-bio-image-height');
47
+ if (empty($avatar_size_width)) {
48
+ $avatar_size_width = 60;
49
+ }
50
+ if (empty($avatar_size_height)) {
51
+ $avatar_size_height = 60;
52
+ }
53
+ if (empty($avatar_size)) {
54
+ $avatar_size_width = 60;
55
+ }
56
  }
57
  if ( isset($args['class']) ) {
58
  $class = $args['class'];
86
 
87
  ?>
88
  <div class="amp-author <?php echo esc_attr($class); ?>">
89
+ <?php if ( $avatar && true == ampforwp_get_setting('amp-author-bio-image')) {
90
  $author_avatar_url = ampforwp_get_wp_user_avatar();
91
  if( null == $author_avatar_url ){
92
  $author_avatar_url = get_avatar_url( $post_author->ID, array( 'size' => $avatar_size ) );
93
  } ?>
94
  <div class="amp-author-image <?php echo esc_attr($author_image_wrapper); ?>">
95
+ <amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?>src="<?php echo esc_url($author_avatar_url); ?>" width="<?php echo esc_attr($avatar_size_width); ?>" height="<?php echo esc_attr($avatar_size_height); ?>" layout="fixed"></amp-img>
96
  </div>
97
  <?php } ?>
98
  <?php echo '<div class="author-details '. esc_attr($author_wrapper_class) .'">';
components/components-core.php CHANGED
@@ -790,7 +790,7 @@ function ampforwp_addThis_support(){
790
  $addthisWidth = 320;
791
  }
792
  if( ampforwp_get_setting('addthis-inline-share') == true){
793
- $amp_addthis .= '<amp-addthis width="'.$addthisWidth.'" height="92" data-pub-id="'.esc_attr($data_pub_id).'" data-widget-id="'. esc_attr($data_widget_id).'"></amp-addthis>';
794
  }
795
 
796
  do_action('ampforwp_before_social_icons_hook');
790
  $addthisWidth = 320;
791
  }
792
  if( ampforwp_get_setting('addthis-inline-share') == true){
793
+ $amp_addthis .= '<div class="amp-wp-content"><amp-addthis width="'.$addthisWidth.'" height="92" data-pub-id="'.esc_attr($data_pub_id).'" data-widget-id="'. esc_attr($data_widget_id).'"></amp-addthis></div>';
794
  }
795
 
796
  do_action('ampforwp_before_social_icons_hook');
components/related-posts/related-posts.php CHANGED
@@ -65,9 +65,14 @@ function ampforwp_related_post_loop_query(){
65
  'post_status'=> 'publish',
66
  'no_found_rows' => true,
67
  'meta_query' => array(
 
68
  array(
69
  'key' => 'ampforwp-amp-on-off',
70
  'value' => 'default',
 
 
 
 
71
  ))
72
  );
73
  if($redux_builder_amp['ampforwp-single-select-type-of-related']==2 && 'post' == $post->post_type ){
65
  'post_status'=> 'publish',
66
  'no_found_rows' => true,
67
  'meta_query' => array(
68
+ 'relation' => 'OR',
69
  array(
70
  'key' => 'ampforwp-amp-on-off',
71
  'value' => 'default',
72
+ ),
73
+ array(
74
+ 'key' => 'ampforwp-amp-on-off',
75
+ 'compare' => 'NOT EXISTS',
76
  ))
77
  );
78
  if($redux_builder_amp['ampforwp-single-select-type-of-related']==2 && 'post' == $post->post_type ){
includes/features/functions.php CHANGED
@@ -1196,14 +1196,17 @@ if( ! function_exists( 'ampforwp_additional_style_carousel_caption' ) ){
1196
  }
1197
 
1198
  function ampforwp_role_based_access_options(){
 
 
1199
  $currentUser = wp_get_current_user();
1200
  $amp_roles = ampforwp_get_setting('ampforwp-role-based-access');
1201
  $currentuserrole = (array) $currentUser->roles;
1202
  $hasrole = array_intersect( $currentuserrole, $amp_roles );
1203
  if( empty($hasrole)){
1204
- return false;
1205
  }
1206
- return true;
 
1207
  }
1208
  if(!function_exists('ampforwp_sassy_share_icons')){
1209
  function ampforwp_sassy_share_icons($ampforwp_the_content) {
1196
  }
1197
 
1198
  function ampforwp_role_based_access_options(){
1199
+ $user_role = '';
1200
+ $user_role = true;
1201
  $currentUser = wp_get_current_user();
1202
  $amp_roles = ampforwp_get_setting('ampforwp-role-based-access');
1203
  $currentuserrole = (array) $currentUser->roles;
1204
  $hasrole = array_intersect( $currentuserrole, $amp_roles );
1205
  if( empty($hasrole)){
1206
+ $user_role = false;
1207
  }
1208
+ $user_role = apply_filters('ampforwp_modify_user_access_role', $user_role, $currentUser, $amp_roles, $hasrole );
1209
+ return $user_role;
1210
  }
1211
  if(!function_exists('ampforwp_sassy_share_icons')){
1212
  function ampforwp_sassy_share_icons($ampforwp_the_content) {
includes/features/performance/performance-functions.php CHANGED
@@ -85,7 +85,14 @@ function ampforwp_minify_html_output($content_buffer){
85
  $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('> ', ' <', ' '), $process);
86
  }
87
  }else{
88
- $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('> ', ' <', ' '), $process);
 
 
 
 
 
 
 
89
  }
90
 
91
  if ( $minify_html_comments != 'no' )
85
  $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('> ', ' <', ' '), $process);
86
  }
87
  }else{
88
+ if( is_user_logged_in() && class_exists('QM_Plugin') && ampforwp_get_setting('ampforwp-query-monitor')){
89
+ $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
90
+ if($pref==="true"){
91
+ $process = preg_replace('/\>[^\S ]+' . $mod, '> ', $process);
92
+ }
93
+ }else{
94
+ $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('> ', ' <', ' '), $process);
95
+ }
96
  }
97
 
98
  if ( $minify_html_comments != 'no' )
includes/options/admin-config.php CHANGED
@@ -5660,6 +5660,38 @@ $single_page_options = array(
5660
  array('amp-author-description' , '=' , '1'),
5661
  )
5662
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5663
  // Author description
5664
  array(
5665
  'id' => 'amp-author-box-description',
5660
  array('amp-author-description' , '=' , '1'),
5661
  )
5662
  ),
5663
+ // Author Image
5664
+ array(
5665
+ 'id' => 'amp-author-bio-image',
5666
+ 'class' => 'child_opt child_opt_arrow',
5667
+ 'type' => 'switch',
5668
+ 'title' => esc_html__( 'Author Image', 'accelerated-mobile-pages' ),
5669
+ 'default' => '1',
5670
+ 'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
5671
+ esc_html__('Enable this option to show author image in author bio and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-author-image-in-author-bio-section/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
5672
+ 'required' => array(
5673
+ array('amp-design-selector' , '=' , '4'),
5674
+ array('amp-author-description' , '=' , '1'),
5675
+ )
5676
+ ),
5677
+ array(
5678
+ 'id' => 'amp-author-bio-image-width',
5679
+ 'type' => 'text',
5680
+ 'class' => 'child_opt child_opt_arrow',
5681
+ 'title' => esc_html__('Width', 'accelerated-mobile-pages'),
5682
+ 'validate' => 'numeric',
5683
+ 'default' => '60',
5684
+ 'required' => array('amp-author-bio-image' , '=' , '1'),
5685
+ ),
5686
+ array(
5687
+ 'id' => 'amp-author-bio-image-height',
5688
+ 'type' => 'text',
5689
+ 'class' => 'child_opt child_opt_arrow',
5690
+ 'title' => esc_html__('Height', 'accelerated-mobile-pages'),
5691
+ 'validate' => 'numeric',
5692
+ 'default' => '60',
5693
+ 'required' => array('amp-author-bio-image' , '=' , '1'),
5694
+ ),
5695
  // Author description
5696
  array(
5697
  'id' => 'amp-author-box-description',
includes/thirdparty-compatibility.php CHANGED
@@ -84,7 +84,7 @@ require_once AMPFORWP_PLUGIN_DIR . '/includes/updater/update.php';
84
 
85
  // Custom Template Files
86
  function ampforwp_child_designing_custom_template( $file, $type, $post ) {
87
- if(!is_page_template()){
88
  return $file;
89
  }
90
  global $redux_builder_amp;
84
 
85
  // Custom Template Files
86
  function ampforwp_child_designing_custom_template( $file, $type, $post ) {
87
+ if(is_page() && !is_page_template()){
88
  return $file;
89
  }
90
  global $redux_builder_amp;
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.35
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,17 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
 
194
  = 1.0.35 (23th March 2020) =
195
  * Fixed: Related post images not having alt attribute #4282
196
  * Fixed: iframes are not working with WP optimize premium #4290
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.36
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.36 (26th March 2020) =
195
+ * Improvement: Added filter to modify role based access #4303
196
+ * Improvement: Added "srcset" on featured images #4257
197
+ * Improvement: Added option to resize the author images in author bio #4297
198
+ * Fixed: AMP child theme not working after update #4310
199
+ * Fixed: amp-fx-collection script was not loading #4275
200
+ * Fixed: Minify HTML & Query Monitor not working on some pages in AMP #4301
201
+ * Fixed: Related posts doesn't show more than 3-4 #4300
202
+ * Fixed: Incorrect alignment of Edit in twenty twenty WP theme #4246
203
+ * Fixed: Social Icons are out of alignment in Design 2 #4305
204
+
205
  = 1.0.35 (23th March 2020) =
206
  * Fixed: Related post images not having alt attribute #4282
207
  * Fixed: iframes are not working with WP optimize premium #4290
templates/design-manager/design-1/elements/featured-image.php CHANGED
@@ -52,6 +52,9 @@ if($featured_image || ( ampforwp_is_custom_field_featured_image() && ampforwp_cf
52
  if(function_exists('ampforwp_add_fallback_element')){
53
  $amp_html = ampforwp_add_fallback_element($amp_html,'amp-img');
54
  }
 
 
 
55
  echo $amp_html; // amphtml content; no kses ?>
56
  <?php if ( $caption ) : ?>
57
  <p class="wp-caption-text">
52
  if(function_exists('ampforwp_add_fallback_element')){
53
  $amp_html = ampforwp_add_fallback_element($amp_html,'amp-img');
54
  }
55
+ if(preg_match('/<amp-img(.*?)srcset="(.*?)"(.*?)<\/amp-img>/', $amp_html) == 0){
56
+ $amp_html = preg_replace('/<amp-img(.*?) src="(.*?)"(.*?)<\/amp-img>/', '<amp-img$1 src="$2" srcset="$2" $3</amp-img>', $amp_html);
57
+ }
58
  echo $amp_html; // amphtml content; no kses ?>
59
  <?php if ( $caption ) : ?>
60
  <p class="wp-caption-text">
templates/design-manager/design-1/elements/related-posts.php CHANGED
@@ -51,9 +51,14 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2) {
51
  'orderby' => $orderby,
52
  'no_found_rows' => true,
53
  'meta_query' => array(
 
54
  array(
55
  'key' => 'ampforwp-amp-on-off',
56
  'value' => 'default',
 
 
 
 
57
  ))
58
  );
59
  }
51
  'orderby' => $orderby,
52
  'no_found_rows' => true,
53
  'meta_query' => array(
54
+ 'relation' => 'OR',
55
  array(
56
  'key' => 'ampforwp-amp-on-off',
57
  'value' => 'default',
58
+ ),
59
+ array(
60
+ 'key' => 'ampforwp-amp-on-off',
61
+ 'compare' => 'NOT EXISTS',
62
  ))
63
  );
64
  }
templates/design-manager/design-2/elements/featured-image.php CHANGED
@@ -51,6 +51,9 @@ if( $featured_image || ( ampforwp_is_custom_field_featured_image() && ampforwp_c
51
  <?php if(function_exists('ampforwp_add_fallback_element')){
52
  $amp_html = ampforwp_add_fallback_element($amp_html,'amp-img');
53
  }
 
 
 
54
  echo $amp_html; // amphtml content; no kses ?>
55
  <?php if ( $caption ) : ?>
56
  <p class="wp-caption-text">
51
  <?php if(function_exists('ampforwp_add_fallback_element')){
52
  $amp_html = ampforwp_add_fallback_element($amp_html,'amp-img');
53
  }
54
+ if(preg_match('/<amp-img(.*?)srcset="(.*?)"(.*?)<\/amp-img>/', $amp_html) == 0){
55
+ $amp_html = preg_replace('/<amp-img(.*?) src="(.*?)"(.*?)<\/amp-img>/', '<amp-img$1 src="$2" srcset="$2" $3</amp-img>', $amp_html);
56
+ }
57
  echo $amp_html; // amphtml content; no kses ?>
58
  <?php if ( $caption ) : ?>
59
  <p class="wp-caption-text">
templates/design-manager/design-2/elements/related-posts.php CHANGED
@@ -51,9 +51,14 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
51
  'orderby' => $orderby,
52
  'no_found_rows' => true,
53
  'meta_query' => array(
 
54
  array(
55
  'key' => 'ampforwp-amp-on-off',
56
  'value' => 'default',
 
 
 
 
57
  ))
58
  );
59
  }
51
  'orderby' => $orderby,
52
  'no_found_rows' => true,
53
  'meta_query' => array(
54
+ 'relation' => 'OR',
55
  array(
56
  'key' => 'ampforwp-amp-on-off',
57
  'value' => 'default',
58
+ ),
59
+ array(
60
+ 'key' => 'ampforwp-amp-on-off',
61
+ 'compare' => 'NOT EXISTS',
62
  ))
63
  );
64
  }
templates/design-manager/design-2/style.php CHANGED
@@ -337,7 +337,7 @@ h1.amp-wp-title , h2.amp-wp-title{ text-align: center; margin: 0.7em 0px 0.6em 0
337
  .amp-wp-content.post-title-meta, .amp-wp-content.post-pagination-meta{ background: none; padding: 0; box-shadow:none }
338
  .post-pagination-meta{ min-height:75px }
339
  .single-post .post-pagination-meta{ min-height:auto }
340
- .single-post .ampforwp-social-icons{ display:inline-block }
341
  .post-pagination-meta .amp-wp-tax-category, .post-title-meta .amp-wp-tax-tag{ display : none; }
342
  .amp-meta-wrapper{ border-bottom: 1px solid #DADADA; padding-bottom:10px; display:inline-block; width:100%; margin-bottom:0 }
343
  .amp-wp-meta{ padding-left: 0; }
@@ -364,7 +364,7 @@ main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bot
364
  .amp-wp-article-featured-image amp-img {margin: 0 auto;}
365
  .amp-wp-article-featured-image.wp-caption .wp-caption-text, .ampforwp-gallery-item .wp-caption-text{color: #696969; font-size: 11px; line-height: 15px; background: #eee; margin: 0; padding: .66em .75em; text-align: center;}
366
  .ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
367
- .amp-wp-content.post-pagination-meta{ max-width: 1030px; }
368
  .single-post .ampforwp-social-icons.ampforwp-social-icons-wrapper{ margin: 0.9em auto 0.9em auto ; max-width: 1030px; }
369
  .amp-wp-article-header.amp-wp-article-category.ampforwp-meta-taxonomy{ margin: 10px auto; max-width: 1030px; } .ampforwp_single_excerpt { margin-bottom:15px; font-size: 15px; text-align:center}
370
  .single-post .amp_author_area amp-img{ margin: 0; float: left; margin-right: 12px; border-radius: 60px; }
337
  .amp-wp-content.post-title-meta, .amp-wp-content.post-pagination-meta{ background: none; padding: 0; box-shadow:none }
338
  .post-pagination-meta{ min-height:75px }
339
  .single-post .post-pagination-meta{ min-height:auto }
340
+ .single-post .ampforwp-social-icons{ display:block }
341
  .post-pagination-meta .amp-wp-tax-category, .post-title-meta .amp-wp-tax-tag{ display : none; }
342
  .amp-meta-wrapper{ border-bottom: 1px solid #DADADA; padding-bottom:10px; display:inline-block; width:100%; margin-bottom:0 }
343
  .amp-wp-meta{ padding-left: 0; }
364
  .amp-wp-article-featured-image amp-img {margin: 0 auto;}
365
  .amp-wp-article-featured-image.wp-caption .wp-caption-text, .ampforwp-gallery-item .wp-caption-text{color: #696969; font-size: 11px; line-height: 15px; background: #eee; margin: 0; padding: .66em .75em; text-align: center;}
366
  .ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
367
+ .amp-wp-content.post-pagination-meta{ max-width: 1030px;margin:0 auto; }
368
  .single-post .ampforwp-social-icons.ampforwp-social-icons-wrapper{ margin: 0.9em auto 0.9em auto ; max-width: 1030px; }
369
  .amp-wp-article-header.amp-wp-article-category.ampforwp-meta-taxonomy{ margin: 10px auto; max-width: 1030px; } .ampforwp_single_excerpt { margin-bottom:15px; font-size: 15px; text-align:center}
370
  .single-post .amp_author_area amp-img{ margin: 0; float: left; margin-right: 12px; border-radius: 60px; }
templates/design-manager/design-3/elements/featured-image.php CHANGED
@@ -53,6 +53,9 @@ if($featured_image || ( ampforwp_is_custom_field_featured_image() && ampforwp_cf
53
  <?php if(function_exists('ampforwp_add_fallback_element')){
54
  $amp_html = ampforwp_add_fallback_element($amp_html,'amp-img');
55
  }
 
 
 
56
  echo $amp_html; // amphtml content; no kses ?>
57
  <?php if ( $caption ) : ?>
58
  <p class="wp-caption-text">
53
  <?php if(function_exists('ampforwp_add_fallback_element')){
54
  $amp_html = ampforwp_add_fallback_element($amp_html,'amp-img');
55
  }
56
+ if(preg_match('/<amp-img(.*?)srcset="(.*?)"(.*?)<\/amp-img>/', $amp_html) == 0){
57
+ $amp_html = preg_replace('/<amp-img(.*?) src="(.*?)"(.*?)<\/amp-img>/', '<amp-img$1 src="$2" srcset="$2" $3</amp-img>', $amp_html);
58
+ }
59
  echo $amp_html; // amphtml content; no kses ?>
60
  <?php if ( $caption ) : ?>
61
  <p class="wp-caption-text">
templates/design-manager/design-3/elements/related-posts.php CHANGED
@@ -52,9 +52,14 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
52
  'no_found_rows' => true,
53
  'orderby' => $orderby,
54
  'meta_query' => array(
 
55
  array(
56
  'key' => 'ampforwp-amp-on-off',
57
  'value' => 'default',
 
 
 
 
58
  ))
59
  );
60
  }
52
  'no_found_rows' => true,
53
  'orderby' => $orderby,
54
  'meta_query' => array(
55
+ 'relation' => 'OR',
56
  array(
57
  'key' => 'ampforwp-amp-on-off',
58
  'value' => 'default',
59
+ ),
60
+ array(
61
+ 'key' => 'ampforwp-amp-on-off',
62
+ 'compare' => 'NOT EXISTS',
63
  ))
64
  );
65
  }
templates/design-manager/swift/style.php CHANGED
@@ -2333,4 +2333,16 @@ if(ampforwp_get_setting('ampforwp-gallery-design-type')==3){?>
2333
  <?php } // Underline CSS Ends?>
2334
  figure.amp-featured-image {
2335
  margin: 10px 0;
2336
- }
 
 
 
 
 
 
 
 
 
 
 
 
2333
  <?php } // Underline CSS Ends?>
2334
  figure.amp-featured-image {
2335
  margin: 10px 0;
2336
+ }
2337
+ <?php if(function_exists('twentytwenty_theme_support')){?>
2338
+ .post-meta-edit-link-wrapper ul.post-meta{
2339
+ float: right;
2340
+ margin-top: -16px;
2341
+ }
2342
+ .post-meta-edit-link-wrapper ul.post-meta li{
2343
+ list-style-type: none;
2344
+ }
2345
+ .post-meta-edit-link-wrapper ul.post-meta li .meta-text{
2346
+ margin-left:5px;
2347
+ }
2348
+ <?php } ?>
templates/features.php CHANGED
@@ -7969,14 +7969,14 @@ function ampforwp_include_required_scripts($content){
7969
  }
7970
  }
7971
  //OTHER COMPONENT CHECK
7972
- $other_comp_arr = array('amp-mustache'=>'amp-mustache','form'=>'amp-form','amp-access'=>'amp-access');
7973
  foreach ($other_comp_arr as $key => $value) {
7974
  $ocomp = $value;
7975
  $celem = 'element';
7976
  if($ocomp=='amp-mustache'){
7977
  $celem = 'template';
7978
  }
7979
- if(preg_match('/(type|template|id)="('.$ocomp.')"/', $content) || preg_match("/<\/$key>/", $content)){
7980
  if(!preg_match('/<script(\s|\sasync\s)custom-'.esc_attr($celem).'="'.esc_attr($ocomp).'"(.*?)>(.*?)<\/script>/s', $content)){
7981
  $o_comp_url = 'https://cdn.ampproject.org/v0/'.esc_attr($ocomp).'-'.esc_attr($script_ver).'.js';
7982
  $script_tag = '<head><script custom-'.esc_attr($celem).'="'.esc_attr($ocomp).'" src="'.esc_url($o_comp_url).'" async></script>';
7969
  }
7970
  }
7971
  //OTHER COMPONENT CHECK
7972
+ $other_comp_arr = array('amp-mustache'=>'amp-mustache','form'=>'amp-form','amp-access'=>'amp-access','amp-fx'=>'amp-fx-collection');
7973
  foreach ($other_comp_arr as $key => $value) {
7974
  $ocomp = $value;
7975
  $celem = 'element';
7976
  if($ocomp=='amp-mustache'){
7977
  $celem = 'template';
7978
  }
7979
+ if(preg_match('/(type|template|id)="('.$ocomp.')"/', $content) || preg_match("/<\/$key>/", $content) || preg_match("/amp-fx/", $content)){
7980
  if(!preg_match('/<script(\s|\sasync\s)custom-'.esc_attr($celem).'="'.esc_attr($ocomp).'"(.*?)>(.*?)<\/script>/s', $content)){
7981
  $o_comp_url = 'https://cdn.ampproject.org/v0/'.esc_attr($ocomp).'-'.esc_attr($script_ver).'.js';
7982
  $script_tag = '<head><script custom-'.esc_attr($celem).'="'.esc_attr($ocomp).'" src="'.esc_url($o_comp_url).'" async></script>';