AMP for WP – Accelerated Mobile Pages - Version 1.0.76.10

Version Description

(9th April 2021) = * Improvements: Added the Compatibility with the Schema Pro FAQ #4956 * Improvements: Added the feature to track each author contribution to the website pageview #4952 * Improvements: Added an option to show published date and time below the title #4976 * Improvements: Added an option to automatic redirect AMP to non-amp when access through desktop #4975 * Improvements: Added the Compatibility for Add Widget After Content plugin #4949 * Improvements: Added Forminator for AMP Extension #4965 * Fixed: Search Close Button is hidden for the Google Cached AMP Pages #4977 * Fixed: Image is not showing when the post is shared on social network #4971

Download this release

Release Info

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

Code changes from version 1.0.76.9 to 1.0.76.10

README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.7
7
- Stable tag: 1.0.76.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,16 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
 
196
  = 1.0.76.9 (2nd April 2021) =
197
  * Fixed: Facebook videos embedding not working #4973
198
  * Fixed: The incorrect excerpt for the custom front page if user is using the Divi #4972
@@ -213,7 +223,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
213
  * Fixed: Mobile redirection not working for the front page when pages are disabled #4942
214
  * Fixed: Captions are not working on Slideshow Module by Jetpack Plugin #4950
215
 
216
- = 1.0.76.7 (15th March 2021) =
217
- * Fixed: WP_Scripts Debug Warnings when WordPress updated to v5.7 #4958
218
-
219
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.7
7
+ Stable tag: 1.0.76.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
193
 
194
  == Changelog ==
195
 
196
+ = 1.0.76.10 (9th April 2021) =
197
+ * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
198
+ * Improvements: Added the feature to track each author contribution to the website pageview #4952
199
+ * Improvements: Added an option to show published date and time below the title #4976
200
+ * Improvements: Added an option to automatic redirect AMP to non-amp when access through desktop #4975
201
+ * Improvements: Added the Compatibility for Add Widget After Content plugin #4949
202
+ * Improvements: Added Forminator for AMP Extension #4965
203
+ * Fixed: Search Close Button is hidden for the Google Cached AMP Pages #4977
204
+ * Fixed: Image is not showing when the post is shared on social network #4971
205
+
206
  = 1.0.76.9 (2nd April 2021) =
207
  * Fixed: Facebook videos embedding not working #4973
208
  * Fixed: The incorrect excerpt for the custom front page if user is using the Divi #4972
223
  * Fixed: Mobile redirection not working for the front page when pages are disabled #4942
224
  * Fixed: Captions are not working on Slideshow Module by Jetpack Plugin #4950
225
 
 
 
 
226
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 1.0.76.9
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.76.9');
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.76.10
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.76.10');
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,15 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.76.9 (2nd April 2021) =
4
  * Fixed: Facebook videos embedding not working #4973
5
  * Fixed: The incorrect excerpt for the custom front page if user is using the Divi #4972
1
  == Changelog ==
2
 
3
+ = 1.0.76.10 (9th April 2021) =
4
+ * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
5
+ * Improvements: Added the feature to track each author contribution to the website pageview #4952
6
+ * Improvements: Added an option to show published date and time below the title #4976
7
+ * Improvements: Added an option to automatic redirect AMP to non-amp when access through desktop #4975
8
+ * Improvements: Added the Compatibility for Add Widget After Content plugin #4949
9
+ * Improvements: Added Forminator for AMP Extension #4965
10
+ * Fixed: Search Close Button is hidden for the Google Cached AMP Pages #4977
11
+ * Fixed: Image is not showing when the post is shared on social network #4971
12
+
13
  = 1.0.76.9 (2nd April 2021) =
14
  * Fixed: Facebook videos embedding not working #4973
15
  * Fixed: The incorrect excerpt for the custom front page if user is using the Divi #4972
components/components-core.php CHANGED
@@ -755,6 +755,10 @@ function ampforwp_backtotop_global_css(){?>
755
  <?php if (class_exists('UAGB_Admin')) {?>
756
  .wp-block-uagb-faq svg {display: none;}
757
  <?php } ?>
 
 
 
 
758
  <?php if (class_exists('Jetpack_Gallery_Settings')) {?>
759
  .wp-block-jetpack-slideshow_container.swiper-container amp-selector {
760
  display: none;
755
  <?php if (class_exists('UAGB_Admin')) {?>
756
  .wp-block-uagb-faq svg {display: none;}
757
  <?php } ?>
758
+ <?php if (function_exists('on_bsf_aiosrs_pro_activate')) {?>
759
+ span.wpsp-icon.wpsp-faq-icon-wrap svg , span.wpsp-icon-active.wpsp-faq-icon-wrap svg{
760
+ display: none;}
761
+ <?php } ?>
762
  <?php if (class_exists('Jetpack_Gallery_Settings')) {?>
763
  .wp-block-jetpack-slideshow_container.swiper-container amp-selector {
764
  display: none;
images/forminator-for-amp.png ADDED
Binary file
includes/features/analytics/analytics-functions.php CHANGED
@@ -37,6 +37,12 @@ function ampforwp_analytics() {
37
  'enabled'=> true
38
  );
39
  }
 
 
 
 
 
 
40
  $ga_fields = apply_filters('ampforwp_google_analytics_fields', $ga_fields );
41
  $ampforwp_ga_fields = json_encode( $ga_fields);
42
  if( ampforwp_get_setting('ampforwp-ga-field-advance-switch') ){
37
  'enabled'=> true
38
  );
39
  }
40
+ if (ampforwp_get_setting('ampforwp-ga-field-author')) {
41
+ $author = ampforwp_get_setting('ampforwp-ga-field-author-index');
42
+ if ($author) {
43
+ $ga_fields['vars']['config'][$author] = get_the_author_meta('display_name');
44
+ }
45
+ }
46
  $ga_fields = apply_filters('ampforwp_google_analytics_fields', $ga_fields );
47
  $ampforwp_ga_fields = json_encode( $ga_fields);
48
  if( ampforwp_get_setting('ampforwp-ga-field-advance-switch') ){
includes/features/analytics/analytics-options.php CHANGED
@@ -101,6 +101,28 @@ function ampforwp_analytics_options($opt_name){
101
  esc_html__( 'for more details on AMP Linker','accelerated-mobile-pages' ) ),
102
  'default' => 0,
103
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  // Advance Tracking options for Google Analytics
105
  array(
106
  'class' => 'child_opt',
101
  esc_html__( 'for more details on AMP Linker','accelerated-mobile-pages' ) ),
102
  'default' => 0,
103
  ),
104
+ array(
105
+ 'class' => 'child_opt',
106
+ 'id' => 'ampforwp-ga-field-author',
107
+ 'type' => 'switch',
108
+ 'title' => esc_html__( 'Author Pageview', 'accelerated-mobile-pages' ),
109
+ 'required' => array('ampforwp-ga-switch', '=' , '1'),
110
+ 'tooltip-subtitle' => sprintf( '<a href="%s" target="_blank">%s</a> %s',
111
+ esc_url('https://ampforwp.com/tutorials/article/how-to-track-author-pageview-analytics-in-amp'),
112
+ esc_html__( 'Click Here','accelerated-mobile-pages' ),
113
+ esc_html__( 'for more details on Author Pageview','accelerated-mobile-pages' ) ),
114
+ 'default' => 0,
115
+ ),
116
+ array(
117
+ 'class'=>'child_opt child_opt_arrow',
118
+ 'id' =>'ampforwp-ga-field-author-index',
119
+ 'type' => 'text',
120
+ 'title' => esc_html__('Index of Author','accelerated-mobile-pages'),
121
+ 'default' => '',
122
+ 'tooltip-subtitle' => 'Index number of author in custom dimension section',
123
+ 'required' =>
124
+ array('ampforwp-ga-field-author', '=' , '1'),
125
+ ),
126
  // Advance Tracking options for Google Analytics
127
  array(
128
  'class' => 'child_opt',
includes/features/performance/performance-functions.php CHANGED
@@ -58,6 +58,9 @@ function ampforwp_minify_html_output($content_buffer){
58
  if ( class_exists( 'Jetpack' ) && preg_match('/<div(.*?)id="v-(.*?)-(.*?)"(.*?)class="video-player">(.*?)<\/div>/', $content_buffer)) {
59
  $content_buffer = preg_replace('/<div(.*?)id="v-(.*?)-(.*?)"(.*?)class="video-player">(.*?)<\/div>/', '<div$1id="v-$2-$3"$4class="video-player"><amp-iframe width="300" height="150" sandbox="allow-scripts allow-same-origin" layout="responsive" src="https://videopress.com/embed/$2"></amp-iframe></div>', $content_buffer);
60
  }
 
 
 
61
  global $redux_builder_amp;
62
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
63
  return $content_buffer;
58
  if ( class_exists( 'Jetpack' ) && preg_match('/<div(.*?)id="v-(.*?)-(.*?)"(.*?)class="video-player">(.*?)<\/div>/', $content_buffer)) {
59
  $content_buffer = preg_replace('/<div(.*?)id="v-(.*?)-(.*?)"(.*?)class="video-player">(.*?)<\/div>/', '<div$1id="v-$2-$3"$4class="video-player"><amp-iframe width="300" height="150" sandbox="allow-scripts allow-same-origin" layout="responsive" src="https://videopress.com/embed/$2"></amp-iframe></div>', $content_buffer);
60
  }
61
+ if (class_exists('AddWidgetAfterContent') && preg_match('/<form(.*?)><label(.*?)for="cat"(.*?)name="cat"(.*?)<\/form>/s', $content_buffer)) {
62
+ $content_buffer = preg_replace('/<form(.*?)><label(.*?)for="cat"(.*?)name="cat"(.*?)<\/form>/s', '<form$1 id="amp-wp-widget-categories-1" on="change:amp-wp-widget-categories-1.submit"><label$2for="cat"$3name="cat"$4</form>', $content_buffer);
63
+ }
64
  global $redux_builder_amp;
65
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
66
  return $content_buffer;
includes/options/admin-config.php CHANGED
@@ -687,6 +687,18 @@ $extension_listing_array = array(
687
  'store_url'=>'https://accounts.ampforwp.com',
688
  'is_activated'=>(is_plugin_active('ultimate-membership-pro-compatibility-for-amp/ultimate-membership-pro-compatibility-for-amp.php')? 1 : 2),
689
  ),
 
 
 
 
 
 
 
 
 
 
 
 
690
  array(
691
  'name'=>'Paid Memberships PRO for AMP',
692
  'class'=>'new-ext',
@@ -2914,6 +2926,14 @@ Redux::setSection( $opt_name, array(
2914
  'tooltip-subtitle' => esc_html__('Disable this option if you want your search pages in Non-AMP.','accelerated-mobile-pages'),
2915
  'default' => 1,
2916
  ),
 
 
 
 
 
 
 
 
2917
  array(
2918
  'id' => 'convert-internal-nonamplinks-to-amp',
2919
  'type' => 'switch',
@@ -5818,6 +5838,17 @@ $single_page_options = array(
5818
 
5819
  'required' => array( array('amp-design-selector', '=' , '4') ),
5820
  ),
 
 
 
 
 
 
 
 
 
 
 
5821
  //Breadcrumb ON/OFF
5822
  array(
5823
  'id' => 'ampforwp-bread-crumb',
687
  'store_url'=>'https://accounts.ampforwp.com',
688
  'is_activated'=>(is_plugin_active('ultimate-membership-pro-compatibility-for-amp/ultimate-membership-pro-compatibility-for-amp.php')? 1 : 2),
689
  ),
690
+ array(
691
+ 'name'=>'Forminator for AMP',
692
+ 'class'=>'new-ext',
693
+ 'desc'=>'Add Forminator forms Support in AMP',
694
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/forminator-for-amp.png',
695
+ 'price'=>'$39',
696
+ 'url_link'=>'https://ampforwp.com/addons/forminator-for-amp/',
697
+ 'plugin_active_path'=> 'forminator-for-amp/forminator-for-amp.php',
698
+ 'item_name'=>'Forminator for AMP',
699
+ 'store_url'=>'https://accounts.ampforwp.com',
700
+ 'is_activated'=>(is_plugin_active('forminator-for-amp/forminator-for-amp.php')? 1 : 2),
701
+ ),
702
  array(
703
  'name'=>'Paid Memberships PRO for AMP',
704
  'class'=>'new-ext',
2926
  'tooltip-subtitle' => esc_html__('Disable this option if you want your search pages in Non-AMP.','accelerated-mobile-pages'),
2927
  'default' => 1,
2928
  ),
2929
+ array(
2930
+ 'id' => 'amp-desktop-redirection',
2931
+ 'type' => 'switch',
2932
+ 'title' => esc_html__('Disable AMP on Desktop', 'accelerated-mobile-pages'),
2933
+ 'tooltip-subtitle' => esc_html__('
2934
+ Enable this option to give your visitors normal version on Desktop when accessing AMP','accelerated-mobile-pages'),
2935
+ 'default' => 0,
2936
+ ),
2937
  array(
2938
  'id' => 'convert-internal-nonamplinks-to-amp',
2939
  'type' => 'switch',
5838
 
5839
  'required' => array( array('amp-design-selector', '=' , '4') ),
5840
  ),
5841
+ array(
5842
+ 'id' => 'amp-published-date-display',
5843
+ 'type' => 'switch',
5844
+ 'class' => 'child_opt child_opt_arrow',
5845
+ 'title' => esc_html__( 'Below Title on Mobile', 'accelerated-mobile-pages' ),
5846
+ 'default' => 0,
5847
+ 'tooltip-subtitle' => esc_html__('Enable this option to show published date below the title in mobile view','accelerated-mobile-pages'),
5848
+ 'required' => array(
5849
+ array('swift-date' , '=' , '1'),
5850
+ )
5851
+ ),
5852
  //Breadcrumb ON/OFF
5853
  array(
5854
  'id' => 'ampforwp-bread-crumb',
includes/redirect.php CHANGED
@@ -61,7 +61,25 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
61
  }else{
62
  return;
63
  }
64
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  // Redirect ?nonamp=1 to normal url #3269
66
  $current_url = $check = '';
67
  $current_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ?
61
  }else{
62
  return;
63
  }
64
+ }
65
+ if (ampforwp_get_setting('amp-desktop-redirection')) {
66
+ require_once AMPFORWP_PLUGIN_DIR.'/includes/vendor/Mobile_Detect.php';
67
+ $mobile_detect = new AMPforWP_Mobile_Detect;
68
+ $isMobile = $mobile_detect->isMobile();
69
+ if (!$isMobile ) {
70
+ $current_url = home_url(add_query_arg(array($_GET), $wp->request));
71
+ $current_url = explode('/', $current_url);
72
+ $check = AMPFORWP_AMP_QUERY_VAR;
73
+ if (in_array( $check , $current_url ) ) {
74
+ $current_url = array_flip($current_url);
75
+ unset($current_url['amp']);
76
+ $current_url = array_flip($current_url);
77
+ $current_url = implode('/', $current_url);
78
+ wp_safe_redirect( $current_url );
79
+ exit;
80
+ }
81
+ }
82
+ }
83
  // Redirect ?nonamp=1 to normal url #3269
84
  $current_url = $check = '';
85
  $current_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ?
includes/thirdparty-compatibility.php CHANGED
@@ -799,8 +799,11 @@ function ampforwp_seopress_social(){
799
  if ( '' == $url && has_post_thumbnail() ) {
800
  $url = get_the_post_thumbnail_url();
801
  }
802
- if (function_exists('attachment_url_to_postid')) {
803
  $image_id = attachment_url_to_postid( $url );
 
 
 
804
  if ( !$image_id ){
805
  return;
806
  }
799
  if ( '' == $url && has_post_thumbnail() ) {
800
  $url = get_the_post_thumbnail_url();
801
  }
802
+ if (function_exists('attachment_url_to_postid') || has_post_thumbnail(ampforwp_get_the_ID()) ) {
803
  $image_id = attachment_url_to_postid( $url );
804
+ if(empty($image_id)){
805
+ $image_id = get_post_thumbnail_id( ampforwp_get_the_ID() );
806
+ }
807
  if ( !$image_id ){
808
  return;
809
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.7
7
- Stable tag: 1.0.76.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,16 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
 
 
193
  = 1.0.76.9 (2nd April 2021) =
194
  * Fixed: Facebook videos embedding not working #4973
195
  * Fixed: The incorrect excerpt for the custom front page if user is using the Divi #4972
@@ -210,7 +220,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
210
  * Fixed: Mobile redirection not working for the front page when pages are disabled #4942
211
  * Fixed: Captions are not working on Slideshow Module by Jetpack Plugin #4950
212
 
213
- = 1.0.76.7 (15th March 2021) =
214
- * Fixed: WP_Scripts Debug Warnings when WordPress updated to v5.7 #4958
215
-
216
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.7
7
+ Stable tag: 1.0.76.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
190
 
191
  == Changelog ==
192
 
193
+ = 1.0.76.10 (9th April 2021) =
194
+ * Improvements: Added the Compatibility with the Schema Pro FAQ #4956
195
+ * Improvements: Added the feature to track each author contribution to the website pageview #4952
196
+ * Improvements: Added an option to show published date and time below the title #4976
197
+ * Improvements: Added an option to automatic redirect AMP to non-amp when access through desktop #4975
198
+ * Improvements: Added the Compatibility for Add Widget After Content plugin #4949
199
+ * Improvements: Added Forminator for AMP Extension #4965
200
+ * Fixed: Search Close Button is hidden for the Google Cached AMP Pages #4977
201
+ * Fixed: Image is not showing when the post is shared on social network #4971
202
+
203
  = 1.0.76.9 (2nd April 2021) =
204
  * Fixed: Facebook videos embedding not working #4973
205
  * Fixed: The incorrect excerpt for the custom front page if user is using the Divi #4972
220
  * Fixed: Mobile redirection not working for the front page when pages are disabled #4942
221
  * Fixed: Captions are not working on Slideshow Module by Jetpack Plugin #4950
222
 
 
 
 
223
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/swift/single.php CHANGED
@@ -28,7 +28,13 @@ $page = get_query_var( 'page' ); ?>
28
  array('author_pub_name'=>true,'author_info'=>true)
29
  ); ?>
30
  </div>
31
- <?php } ?>
 
 
 
 
 
 
32
  </div>
33
  <?php
34
  if($paged==0 && $page==0){
@@ -119,7 +125,7 @@ $page = get_query_var( 'page' ); ?>
119
  </div>
120
  <?php }
121
  if( true == ampforwp_get_setting('swift-date') ) { ?>
122
- <div class="post-date">
123
  <?php amp_date(); ?><?php edit_post_link(); ?>
124
  </div>
125
  <?php do_action('ampforwp_post_views_ctr'); ?>
28
  array('author_pub_name'=>true,'author_info'=>true)
29
  ); ?>
30
  </div>
31
+ <?php }
32
+ if( true == ampforwp_get_setting('swift-date') && true == ampforwp_get_setting('amp-published-date-display')) { ?>
33
+ <div class="post-date mob-date">
34
+ <?php amp_date(); ?><?php edit_post_link(); ?>
35
+ </div>
36
+ <?php do_action('ampforwp_post_views_ctr'); ?>
37
+ <?php } ?>
38
  </div>
39
  <?php
40
  if($paged==0 && $page==0){
125
  </div>
126
  <?php }
127
  if( true == ampforwp_get_setting('swift-date') ) { ?>
128
+ <div class="post-date desk-date">
129
  <?php amp_date(); ?><?php edit_post_link(); ?>
130
  </div>
131
  <?php do_action('ampforwp_post_views_ctr'); ?>
templates/design-manager/swift/style.php CHANGED
@@ -287,7 +287,7 @@ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
287
  <?php } ?>
288
  <?php if(isset($redux_builder_amp['swift-element-overlay-color-control'] ['rgba']) && $redux_builder_amp['swift-element-overlay-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;<?php } ?>line-height: 0;display: block;text-indent: 1px;}
289
  .c-btn{float: right;padding: 15px 5px;}
290
- header[style] label.c-btn {margin-top: 30px;}
291
  .m-ctr{transition: margin 0.3s ease-in-out;}
292
  .m-ctr{<?php if(ampforwp_get_setting('header-overlay-width')){?>width:<?php echo esc_html(ampforwp_get_setting('header-overlay-width'))?>;<?php } ?>height:100%;position: absolute;z-index:99;padding: 2% 0% 100vh 0%;}
293
  .m-menu{display: inline-block;width: 100%;padding: 2px 20px 10px 20px;}
@@ -710,6 +710,14 @@ if ( ampforwp_get_setting('swift-featued-image-type') == 2) { ?>
710
  .post-date .post-edit-link{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;float: right;}
711
  .post-date .post-edit-link:hover{color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
712
  .sp-athr, .amp-tags, .post-date{margin-top:20px;}
 
 
 
 
 
 
 
 
713
  .sp-athr .author-details a, .sp-athr .author-details, .amp-tags span a, .amp-tag {font-size: 15px;color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;font-weight: 400;line-height: 1.5;}
714
  .amp-tags .amp-tag:after{content: "/";display: inline-block;padding: 0px 10px;position: relative;top: -1px;color: #ccc;font-size: 12px;}
715
  .amp-tags .amp-tag:last-child:after{display:none;}
287
  <?php } ?>
288
  <?php if(isset($redux_builder_amp['swift-element-overlay-color-control'] ['rgba']) && $redux_builder_amp['swift-element-overlay-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;<?php } ?>line-height: 0;display: block;text-indent: 1px;}
289
  .c-btn{float: right;padding: 15px 5px;}
290
+ header[style] label.c-btn , header[style] .lb-t:target a.lb-x {margin-top: 30px;}
291
  .m-ctr{transition: margin 0.3s ease-in-out;}
292
  .m-ctr{<?php if(ampforwp_get_setting('header-overlay-width')){?>width:<?php echo esc_html(ampforwp_get_setting('header-overlay-width'))?>;<?php } ?>height:100%;position: absolute;z-index:99;padding: 2% 0% 100vh 0%;}
293
  .m-menu{display: inline-block;width: 100%;padding: 2px 20px 10px 20px;}
710
  .post-date .post-edit-link{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;float: right;}
711
  .post-date .post-edit-link:hover{color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
712
  .sp-athr, .amp-tags, .post-date{margin-top:20px;}
713
+ <?php if( true == ampforwp_get_setting('swift-date') && true == ampforwp_get_setting('amp-published-date-display')) { ?>
714
+ @media(min-width:768px){
715
+ .post-date.mob-date {display: none;}
716
+ }
717
+ @media(max-width:768px){
718
+ .post-date.desk-date {display: none;}
719
+ }
720
+ <?php } ?>
721
  .sp-athr .author-details a, .sp-athr .author-details, .amp-tags span a, .amp-tag {font-size: 15px;color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;font-weight: 400;line-height: 1.5;}
722
  .amp-tags .amp-tag:after{content: "/";display: inline-block;padding: 0px 10px;position: relative;top: -1px;color: #ccc;font-size: 12px;}
723
  .amp-tags .amp-tag:last-child:after{display:none;}
templates/features.php CHANGED
@@ -1128,6 +1128,9 @@ function ampforwp_remove_schema_data() {
1128
  if(defined('EZOIC__PLUGIN_NAME')){
1129
  ampforwp_remove_filters_for_class( 'shutdown', 'Ezoic_Namespace\Ezoic_Integration_Public', 'ez_buffer_end', 0 );
1130
  }
 
 
 
1131
  // Yoast Schema Compatibility #3332
1132
  if( ampforwp_get_setting('ampforwp-seo-selection') != "yoast"){
1133
  ampforwp_remove_filters_for_class( 'amp_post_template_head', 'WPSEO_Schema', 'json_ld', 9 );
@@ -5794,6 +5797,16 @@ if ( ! function_exists('ampforwp_allowed_tags') ) {
5794
  add_action('ampforwp_after_post_content', 'ampforwp_list_subpages');
5795
  if ( ! function_exists('ampforwp_list_subpages') ) {
5796
  function ampforwp_list_subpages() {
 
 
 
 
 
 
 
 
 
 
5797
  global $post, $redux_builder_amp;
5798
  if ( is_page() && true == $redux_builder_amp['ampforwp_subpages_list'] ) {
5799
  $pages = '';
1128
  if(defined('EZOIC__PLUGIN_NAME')){
1129
  ampforwp_remove_filters_for_class( 'shutdown', 'Ezoic_Namespace\Ezoic_Integration_Public', 'ez_buffer_end', 0 );
1130
  }
1131
+ if (class_exists('AddWidgetAfterContent')) {
1132
+ ampforwp_remove_filters_for_class( 'the_content', 'AddWidgetAfterContent', 'insert_after_content', 10 );
1133
+ }
1134
  // Yoast Schema Compatibility #3332
1135
  if( ampforwp_get_setting('ampforwp-seo-selection') != "yoast"){
1136
  ampforwp_remove_filters_for_class( 'amp_post_template_head', 'WPSEO_Schema', 'json_ld', 9 );
5797
  add_action('ampforwp_after_post_content', 'ampforwp_list_subpages');
5798
  if ( ! function_exists('ampforwp_list_subpages') ) {
5799
  function ampforwp_list_subpages() {
5800
+ if (class_exists('AddWidgetAfterContent')) {
5801
+ $sanitized_output = '';
5802
+ $sanitized_output = ampforwp_sidebar_content_sanitizer('add-widget-after-content');
5803
+ if ( $sanitized_output) {
5804
+ $sanitized_output = $sanitized_output->get_amp_content();?>
5805
+ <div class="amp-add-widget-after-content">
5806
+ <?php echo do_shortcode($sanitized_output); ?>
5807
+ </div>
5808
+ <?php }
5809
+ }
5810
  global $post, $redux_builder_amp;
5811
  if ( is_page() && true == $redux_builder_amp['ampforwp_subpages_list'] ) {
5812
  $pages = '';