Version Description
(20th May 2020) = * Improvement: Added option to display the GDPR bar at top or bottom #4409 * Improvement: Added option to enable/disable the AMP from the categories or product or any custom taxonomy #4326 * Improvement: Added Hooks in Instant Article #4417 * Improvement: Added Polls for AMP Extension #4451 * Fixed: View Non-AMP link in the footer does not redirect to Non-AMP #3884 * Fixed: Banner notice not looking good in reading settings #4414 * Fixed: Lightbox for images appearing even after disabling #4442 * Fixed: Last modified date showing wrong in header #4456 * Fixed: WPRocket CDN is not working properly in the AMP pages #4342 * Fixed: Lighthouse issues #4443 * Fixed: Thumbnail images in category module not showing in RTL #4459 * Fixed: Blank screen when alt added in images with short pixel plugin #4452 * Fixed: invalid value defer onload with The Business News theme #4465 * Fixed: Text links are not working in mobile #4462 * Fixed: PHP Notice Undefined variable thumb_alt #4460
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.50 |
Comparing to | |
See all releases |
Code changes from version 1.0.49 to 1.0.50
- README.md +18 -17
- accelerated-moblie-pages.php +2 -2
- changelog.txt +17 -0
- components/gdpr/gdpr.php +4 -2
- components/related-posts/related-posts.php +1 -1
- components/search/search.php +3 -1
- images/polls-for-amp.png +0 -0
- includes/admin-script.js +14 -1
- includes/admin-style.css +8 -1
- includes/features/functions.php +30 -0
- includes/features/notice-bar/notice-bar-options.php +14 -0
- includes/options/admin-config.php +21 -1
- includes/redirect.php +34 -1
- includes/thirdparty-compatibility.php +3 -0
- includes/vendor/amp/amp.php +1 -1
- pagebuilder/modules/cta-mod-module.php +1 -6
- readme.txt +18 -17
- templates/design-manager/design-1/single.php +6 -3
- templates/design-manager/design-2/single.php +6 -1
- templates/design-manager/design-3/single.php +6 -2
- templates/design-manager/swift/footer.php +2 -2
- templates/design-manager/swift/style.php +4 -1
- templates/features.php +131 -2
- templates/instant-articles/instant-article.php +3 -3
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.4
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -194,6 +194,23 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
= 1.0.49 (11th May 2020) =
|
198 |
* Fixed: Background color of the row is not working in the AMP Page Builder #4398
|
199 |
|
@@ -210,20 +227,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
210 |
* Fixed: Notice added when category based is removed from Yoast #4437
|
211 |
* Fixed: Debug notices on the AMP pages #4440
|
212 |
|
213 |
-
= 1.0.47 (5th May 2020) =
|
214 |
-
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
215 |
-
|
216 |
-
= 1.0.46 (4th May 2020) =
|
217 |
-
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
218 |
-
* Fixed: Text not displaying in One signal notification #4413
|
219 |
-
* Fixed: Wrong amphtml in ?amp endpoint in category pages #4393
|
220 |
-
* Fixed: Open graph tags not loading from the SEO framework #4399
|
221 |
-
* Fixed: Blank class in archives loop and loop on homepage #4390
|
222 |
-
* Fixed: Pagination of category module going to top of the page #4401
|
223 |
-
* Fixed: Fatal error in customizer in trucking theme #4391
|
224 |
-
* Fixed: Auto Add AMP in Menu option not working in subdomain #4423
|
225 |
-
* Fixed: Showing entities instead of UTF-8 in footer json #4395
|
226 |
-
* Fixed: Ninja Tables plugin css was hiding due to class drawer #4428
|
227 |
-
* Fixed: AMP Option panel improvements #4408
|
228 |
-
|
229 |
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.4
|
7 |
+
Stable tag: 1.0.50
|
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.50 (20th May 2020) =
|
198 |
+
* Improvement: Added option to display the GDPR bar at top or bottom #4409
|
199 |
+
* Improvement: Added option to enable/disable the AMP from the categories or product or any custom taxonomy #4326
|
200 |
+
* Improvement: Added Hooks in Instant Article #4417
|
201 |
+
* Improvement: Added Polls for AMP Extension #4451
|
202 |
+
* Fixed: View Non-AMP link in the footer does not redirect to Non-AMP #3884
|
203 |
+
* Fixed: Banner notice not looking good in reading settings #4414
|
204 |
+
* Fixed: Lightbox for images appearing even after disabling #4442
|
205 |
+
* Fixed: Last modified date showing wrong in header #4456
|
206 |
+
* Fixed: WPRocket CDN is not working properly in the AMP pages #4342
|
207 |
+
* Fixed: Lighthouse issues #4443
|
208 |
+
* Fixed: Thumbnail images in category module not showing in RTL #4459
|
209 |
+
* Fixed: Blank screen when alt added in images with short pixel plugin #4452
|
210 |
+
* Fixed: invalid value defer onload with The Business News theme #4465
|
211 |
+
* Fixed: Text links are not working in mobile #4462
|
212 |
+
* Fixed: PHP Notice Undefined variable thumb_alt #4460
|
213 |
+
|
214 |
= 1.0.49 (11th May 2020) =
|
215 |
* Fixed: Background color of the row is not working in the AMP Page Builder #4398
|
216 |
|
227 |
* Fixed: Notice added when category based is removed from Yoast #4437
|
228 |
* Fixed: Debug notices on the AMP pages #4440
|
229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -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.
|
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.
|
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.50
|
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.50');
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
@@ -1,5 +1,22 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.49 (11th May 2020) =
|
4 |
* Fixed: Background color of the row is not working in the AMP Page Builder #4398
|
5 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.50 (20th May 2020) =
|
4 |
+
* Improvement: Added option to display the GDPR bar at top or bottom #4409
|
5 |
+
* Improvement: Added option to enable/disable the AMP from the categories or product or any custom taxonomy #4326
|
6 |
+
* Improvement: Added Hooks in Instant Article #4417
|
7 |
+
* Improvement: Added Polls for AMP Extension #4451
|
8 |
+
* Fixed: View Non-AMP link in the footer does not redirect to Non-AMP #3884
|
9 |
+
* Fixed: Banner notice not looking good in reading settings #4414
|
10 |
+
* Fixed: Lightbox for images appearing even after disabling #4442
|
11 |
+
* Fixed: Last modified date showing wrong in header #4456
|
12 |
+
* Fixed: WPRocket CDN is not working properly in the AMP pages #4342
|
13 |
+
* Fixed: Lighthouse issues #4443
|
14 |
+
* Fixed: Thumbnail images in category module not showing in RTL #4459
|
15 |
+
* Fixed: Blank screen when alt added in images with short pixel plugin #4452
|
16 |
+
* Fixed: invalid value defer onload with The Business News theme #4465
|
17 |
+
* Fixed: Text links are not working in mobile #4462
|
18 |
+
* Fixed: PHP Notice Undefined variable thumb_alt #4460
|
19 |
+
|
20 |
= 1.0.49 (11th May 2020) =
|
21 |
* Fixed: Background color of the row is not working in the AMP Page Builder #4398
|
22 |
|
@@ -138,8 +138,10 @@ function ampforwp_gdpr_css(){
|
|
138 |
}<?php
|
139 |
} // GDPR Type 1 End
|
140 |
// GDPR Notice bar
|
141 |
-
if($redux_builder_amp['gdpr-type'] == '2'){
|
142 |
-
|
|
|
|
|
143 |
.gdpr_w{padding:20px 40px;background: #383B75;width: 95%;position: relative;margin: 0% auto;display: inline-flex;}
|
144 |
.gdpr_t h3, .gdpr_fmi{
|
145 |
font-size: 16px;
|
138 |
}<?php
|
139 |
} // GDPR Type 1 End
|
140 |
// GDPR Notice bar
|
141 |
+
if($redux_builder_amp['gdpr-type'] == '2'){
|
142 |
+
$position = ampforwp_get_setting('amp-gdpr-type2-position');
|
143 |
+
?>
|
144 |
+
.gdpr{position: fixed; <?php if($position==1){?>top: 0;<?php }else{?> bottom: 0;<?php }?> left: 0; right: 0; z-index:99999;}
|
145 |
.gdpr_w{padding:20px 40px;background: #383B75;width: 95%;position: relative;margin: 0% auto;display: inline-flex;}
|
146 |
.gdpr_t h3, .gdpr_fmi{
|
147 |
font-size: 16px;
|
@@ -133,6 +133,7 @@ function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array()
|
|
133 |
$thumb_url = ampforwp_get_post_thumbnail('url', $imagetype);
|
134 |
$thumb_width = ampforwp_get_post_thumbnail('width', $imagetype);
|
135 |
$thumb_height = ampforwp_get_post_thumbnail('height', $imagetype);
|
|
|
136 |
if(isset($data['image_crop']) && $data['image_crop'] != ""){
|
137 |
$width = $data['image_crop_width'];
|
138 |
if(empty($width)){
|
@@ -160,7 +161,6 @@ function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array()
|
|
160 |
$thumb_url = $thumb_url_array[0];
|
161 |
$thumb_width = $thumb_url_array[1];
|
162 |
$thumb_height = $thumb_url_array[2];
|
163 |
-
$thumb_alt = '';
|
164 |
$thumb_alt = get_post_meta ( get_post_thumbnail_id(), '_wp_attachment_image_alt', true );
|
165 |
}
|
166 |
|
133 |
$thumb_url = ampforwp_get_post_thumbnail('url', $imagetype);
|
134 |
$thumb_width = ampforwp_get_post_thumbnail('width', $imagetype);
|
135 |
$thumb_height = ampforwp_get_post_thumbnail('height', $imagetype);
|
136 |
+
$thumb_alt = '';
|
137 |
if(isset($data['image_crop']) && $data['image_crop'] != ""){
|
138 |
$width = $data['image_crop_width'];
|
139 |
if(empty($width)){
|
161 |
$thumb_url = $thumb_url_array[0];
|
162 |
$thumb_width = $thumb_url_array[1];
|
163 |
$thumb_height = $thumb_url_array[2];
|
|
|
164 |
$thumb_alt = get_post_meta ( get_post_thumbnail_id(), '_wp_attachment_image_alt', true );
|
165 |
}
|
166 |
|
@@ -12,6 +12,7 @@ function ampforwp_framework_get_search_form() {
|
|
12 |
$action_url = ( get_bloginfo('url') );
|
13 |
$action_url = preg_replace('#^http?:#', '', $action_url);
|
14 |
$placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
|
|
|
15 |
if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && !$redux_builder_amp['ampforwp-amp-takeover'] ) {
|
16 |
$amp_query_variable = 'amp';
|
17 |
$amp_query_variable_val = '1';
|
@@ -20,7 +21,8 @@ function ampforwp_framework_get_search_form() {
|
|
20 |
<div class="amp-search-wrapper">
|
21 |
<label aria-label="Type your query" class="screen-reader-text" for="s">' . esc_html__($label,'accelerated-mobile-pages') . '</label>
|
22 |
<input type="text" placeholder="AMP" value="'.esc_attr($amp_query_variable_val).'" name="'.esc_attr($amp_query_variable).'" class="hidden"/>
|
23 |
-
<
|
|
|
24 |
<label aria-label="Submit amp search" for="amp-search-submit" >
|
25 |
<input type="submit" class="icon-search" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
|
26 |
</label>
|
12 |
$action_url = ( get_bloginfo('url') );
|
13 |
$action_url = preg_replace('#^http?:#', '', $action_url);
|
14 |
$placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
|
15 |
+
$rand = rand(10,100);
|
16 |
if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && !$redux_builder_amp['ampforwp-amp-takeover'] ) {
|
17 |
$amp_query_variable = 'amp';
|
18 |
$amp_query_variable_val = '1';
|
21 |
<div class="amp-search-wrapper">
|
22 |
<label aria-label="Type your query" class="screen-reader-text" for="s">' . esc_html__($label,'accelerated-mobile-pages') . '</label>
|
23 |
<input type="text" placeholder="AMP" value="'.esc_attr($amp_query_variable_val).'" name="'.esc_attr($amp_query_variable).'" class="hidden"/>
|
24 |
+
<label for="search-text-'.esc_attr($rand).'"></label>
|
25 |
+
<input id="search-text-'.esc_attr($rand).'" type="text" placeholder="'.esc_attr($placeholder).'" value="' . esc_attr(get_search_query()) . '" name="s" class="s" />
|
26 |
<label aria-label="Submit amp search" for="amp-search-submit" >
|
27 |
<input type="submit" class="icon-search" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
|
28 |
</label>
|
Binary file
|
@@ -998,7 +998,7 @@ jQuery(document).ready(function($){
|
|
998 |
});
|
999 |
// AMP FrontPage notice in Reading Settings #2348
|
1000 |
if ( 'false' == redux_data.frontpage){
|
1001 |
-
$('#page_on_front').parent('label').append('<p class="afp" style="display:none"><
|
1002 |
}
|
1003 |
$('#front-static-pages input[type=radio][name=show_on_front]').on('change', function(e) {
|
1004 |
if ( this.value == 'page') {
|
@@ -2579,4 +2579,17 @@ $("#subscribe-newsletter-form").on('submit',function(e){
|
|
2579 |
function(data) {}
|
2580 |
);
|
2581 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2582 |
});
|
998 |
});
|
999 |
// AMP FrontPage notice in Reading Settings #2348
|
1000 |
if ( 'false' == redux_data.frontpage){
|
1001 |
+
$('#page_on_front').parent('label').append('<p class="afp" style="margin-left:10px;display:none"><span>We have detected that you have not setup the FrontPage for AMP, </span><a href="'+redux_data.admin_url+'">Click here to setup</a></span>');
|
1002 |
}
|
1003 |
$('#front-static-pages input[type=radio][name=show_on_front]').on('change', function(e) {
|
1004 |
if ( this.value == 'page') {
|
2579 |
function(data) {}
|
2580 |
);
|
2581 |
});
|
2582 |
+
// HIDE/SHOW TAG AND CATEGORY #4326
|
2583 |
+
$("#show_amp_taxonomy").on('change', function(){
|
2584 |
+
var thisval = $(this).val();
|
2585 |
+
if(thisval=='hide'){
|
2586 |
+
$("#amp-show-hide-tax").css({'display':'block'});
|
2587 |
+
}else if(thisval=='show'){
|
2588 |
+
$("#amp-show-hide-tax").css({'display':'none'});
|
2589 |
+
}
|
2590 |
+
});
|
2591 |
+
$(".hide-show-amp-tax").on('click', function(){
|
2592 |
+
var checkBoxes = $(this).children('input:radio')
|
2593 |
+
checkBoxes.prop("checked", "true");
|
2594 |
+
});
|
2595 |
});
|
@@ -1951,10 +1951,11 @@ div#section-ampforwp-ux-section::after,div#section-ampforwp-ux-section-right::af
|
|
1951 |
|
1952 |
|
1953 |
.afp{
|
1954 |
-
background: #
|
1955 |
padding: 8px 14px;
|
1956 |
margin-top: 7px;
|
1957 |
display: inline-block;
|
|
|
1958 |
}
|
1959 |
|
1960 |
#redux-import-file-type{
|
@@ -2086,4 +2087,10 @@ fieldset#redux_builder_amp-ampforwp-onesignal-positioning {
|
|
2086 |
text-align: center;
|
2087 |
color: white;
|
2088 |
border-radius: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
2089 |
}
|
1951 |
|
1952 |
|
1953 |
.afp{
|
1954 |
+
background: #f7fcfe;
|
1955 |
padding: 8px 14px;
|
1956 |
margin-top: 7px;
|
1957 |
display: inline-block;
|
1958 |
+
border-left: 5px solid #00a0d2;
|
1959 |
}
|
1960 |
|
1961 |
#redux-import-file-type{
|
2087 |
text-align: center;
|
2088 |
color: white;
|
2089 |
border-radius: 5px;
|
2090 |
+
}
|
2091 |
+
.mrtop-10{
|
2092 |
+
margin-top: 10px;
|
2093 |
+
}
|
2094 |
+
#amp-show-hide-tax .hide-show-amp-tax{
|
2095 |
+
cursor: pointer;
|
2096 |
}
|
@@ -500,6 +500,9 @@ if ( ! function_exists( 'ampforwp_isexternal ') ) {
|
|
500 |
|
501 |
if(!function_exists('ampforwp_findInternalUrl')){
|
502 |
function ampforwp_findInternalUrl($url){
|
|
|
|
|
|
|
503 |
global $redux_builder_amp;
|
504 |
if(isset($redux_builder_amp['convert-internal-nonamplinks-to-amp']) && ! $redux_builder_amp['convert-internal-nonamplinks-to-amp']){
|
505 |
return $url;
|
@@ -1373,4 +1376,31 @@ function ampforwp_category_base_remove_notice(){
|
|
1373 |
esc_html__(' to set up to make sure AMP pages work properly on category pages or ','accelerated-mobile-pages'),
|
1374 |
esc_url('https://ampforwp.com/tutorials/article/how-to-remove-the-category-base-in-the-amp/'),esc_html__('Click here for the tutorial','accelerated-mobile-pages'),esc_html__('Click here for the tutorial','accelerated-mobile-pages'));
|
1375 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1376 |
}
|
500 |
|
501 |
if(!function_exists('ampforwp_findInternalUrl')){
|
502 |
function ampforwp_findInternalUrl($url){
|
503 |
+
if(function_exists('googlesitekit_activate_plugin')){
|
504 |
+
$url = remove_query_arg( '_gl', $url);
|
505 |
+
}
|
506 |
global $redux_builder_amp;
|
507 |
if(isset($redux_builder_amp['convert-internal-nonamplinks-to-amp']) && ! $redux_builder_amp['convert-internal-nonamplinks-to-amp']){
|
508 |
return $url;
|
1376 |
esc_html__(' to set up to make sure AMP pages work properly on category pages or ','accelerated-mobile-pages'),
|
1377 |
esc_url('https://ampforwp.com/tutorials/article/how-to-remove-the-category-base-in-the-amp/'),esc_html__('Click here for the tutorial','accelerated-mobile-pages'),esc_html__('Click here for the tutorial','accelerated-mobile-pages'));
|
1378 |
}
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
// HIDE/SHOW TAG AND CATEGORY #4326
|
1382 |
+
function ampforwp_get_taxonomy_meta($term_id,$type=''){
|
1383 |
+
if($type=='' || $type=='data'){
|
1384 |
+
$amp_taxonomy = get_term_meta( $term_id,'amp_taxonomy');
|
1385 |
+
$amp_hide_tax = get_term_meta( $term_id,'amp_hide_tax');
|
1386 |
+
$data = array('visible'=>$amp_taxonomy,'visible_status'=>$amp_hide_tax);
|
1387 |
+
return $data;
|
1388 |
+
}else if($type=='status'){
|
1389 |
+
$amp_taxonomy = get_term_meta( $term_id,'amp_taxonomy');
|
1390 |
+
if(isset($amp_taxonomy[0]) && $amp_taxonomy[0]=='hide'){
|
1391 |
+
return false;
|
1392 |
+
}else{
|
1393 |
+
return true;
|
1394 |
+
}
|
1395 |
+
}else if($type=='post_status'){
|
1396 |
+
$term = wp_get_post_terms(ampforwp_get_the_ID(),array('category','post_tag'));
|
1397 |
+
foreach ($term as $key => $value) {
|
1398 |
+
$amp_taxonomy = get_term_meta( $value->term_id,'amp_taxonomy');
|
1399 |
+
$amp_hide_tax = get_term_meta( $value->term_id,'amp_hide_tax');
|
1400 |
+
if(isset($amp_taxonomy[0]) && $amp_taxonomy[0]=='hide' && $amp_hide_tax[0]=='hide-tax-post'){
|
1401 |
+
return false;
|
1402 |
+
}
|
1403 |
+
}
|
1404 |
+
return true;
|
1405 |
+
}
|
1406 |
}
|
@@ -126,6 +126,20 @@ function ampforwp_notice_bar_options($opt_name){
|
|
126 |
'default'=> '1',
|
127 |
'required' => array( array('amp-gdpr-compliance-switch', '=' , '1') ),
|
128 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
array(
|
130 |
'class' => 'child_opt child_opt_arrow',
|
131 |
'id' =>'amp-gdpr-compliance-headline-text',
|
126 |
'default'=> '1',
|
127 |
'required' => array( array('amp-gdpr-compliance-switch', '=' , '1') ),
|
128 |
),
|
129 |
+
array(
|
130 |
+
'class' => 'child_opt child_opt_arrow',
|
131 |
+
'id' => 'amp-gdpr-type2-position',
|
132 |
+
'title' => esc_html__('GDPR Popup Position', 'accelerated-mobile-pages'),
|
133 |
+
'type' => 'select',
|
134 |
+
'options'=> array(
|
135 |
+
'1' => 'Top',
|
136 |
+
'2' => 'Bottom'
|
137 |
+
),
|
138 |
+
'default'=> '1',
|
139 |
+
'required' => array(
|
140 |
+
array('gdpr-type','=',2)
|
141 |
+
)
|
142 |
+
),
|
143 |
array(
|
144 |
'class' => 'child_opt child_opt_arrow',
|
145 |
'id' =>'amp-gdpr-compliance-headline-text',
|
@@ -663,6 +663,18 @@ $extension_listing_array = array(
|
|
663 |
'store_url'=>'https://accounts.ampforwp.com',
|
664 |
'is_activated'=>(is_plugin_active('reading-progress-bar-for-amp/reading-progress-bar-for-amp.php')? 1 : 2),
|
665 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
);
|
667 |
$viewAllExtensions = array(
|
668 |
'name'=>'View All Extensions',
|
@@ -6593,7 +6605,15 @@ else{
|
|
6593 |
'false' => 'false',
|
6594 |
'default' => 1
|
6595 |
),
|
6596 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6597 |
array(
|
6598 |
'id' => 'ampforwp-footer-top',
|
6599 |
'type' => 'switch',
|
663 |
'store_url'=>'https://accounts.ampforwp.com',
|
664 |
'is_activated'=>(is_plugin_active('reading-progress-bar-for-amp/reading-progress-bar-for-amp.php')? 1 : 2),
|
665 |
),
|
666 |
+
array(
|
667 |
+
'name'=>'Polls for AMP',
|
668 |
+
'class'=>'new-ext',
|
669 |
+
'desc'=>'Add Polls Support in AMP',
|
670 |
+
'img_src'=>AMPFORWP_IMAGE_DIR . '/polls-for-amp.png',
|
671 |
+
'price'=>'$39',
|
672 |
+
'url_link'=>'https://ampforwp.com/addons/polls-for-amp/',
|
673 |
+
'plugin_active_path'=> 'polls-for-amp/polls-for-amp.php',
|
674 |
+
'item_name'=>'Polls for AMP',
|
675 |
+
'store_url'=>'https://accounts.ampforwp.com',
|
676 |
+
'is_activated'=>(is_plugin_active('polls-for-amp/polls-for-amp.php')? 1 : 2),
|
677 |
+
),
|
678 |
);
|
679 |
$viewAllExtensions = array(
|
680 |
'name'=>'View All Extensions',
|
6605 |
'false' => 'false',
|
6606 |
'default' => 1
|
6607 |
),
|
6608 |
+
array(
|
6609 |
+
'id' => 'amp-footer-link-non-amp-page-alternate',
|
6610 |
+
'type' => 'switch',
|
6611 |
+
'class' => 'child_opt child_opt_arrow',
|
6612 |
+
'default' => 0,
|
6613 |
+
'title' => esc_html__('Not redirecting to Non-AMP? Enable it', 'accelerated-mobile-pages'),
|
6614 |
+
'tooltip-subtitle' => esc_html__('Enable this option if View Non-AMP Version link does not work properly, due to server configuration or server cache'),
|
6615 |
+
'required' => array('amp-footer-link-non-amp-page','=','1'),
|
6616 |
+
),
|
6617 |
array(
|
6618 |
'id' => 'ampforwp-footer-top',
|
6619 |
'type' => 'switch',
|
@@ -81,10 +81,40 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
|
|
81 |
unset($current_url['?nonamp=1']);
|
82 |
$current_url = array_flip($current_url);
|
83 |
$current_url = implode('/', $current_url);
|
84 |
-
|
|
|
|
|
|
|
|
|
85 |
wp_safe_redirect( $current_url );
|
86 |
exit;
|
87 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
//Auto redirect /amp to ?amp when 'Change End Point to ?amp' option is enabled #2480
|
89 |
if ( ampforwp_is_amp_endpoint() && true == ampforwp_get_setting('amp-core-end-point') ){
|
90 |
$current_url = $endpoint = $new_url = '';
|
@@ -300,6 +330,9 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
|
|
300 |
}
|
301 |
// Check if we are on Mobile phones then start redirection process
|
302 |
if ( $redirectToAMP ) {
|
|
|
|
|
|
|
303 |
if(class_exists('stcr\\stcr_manage') ){
|
304 |
$check_url = implode(', ', $current_url);
|
305 |
if(in_array('comment-subscriptions', $current_url) && strpos($check_url,'srp')!=false && strpos($check_url,'srk')!=false){
|
81 |
unset($current_url['?nonamp=1']);
|
82 |
$current_url = array_flip($current_url);
|
83 |
$current_url = implode('/', $current_url);
|
84 |
+
if(ampforwp_get_setting('amp-footer-link-non-amp-page-alternate')){
|
85 |
+
$current_url = user_trailingslashit(esc_url($current_url))."?namp=1";
|
86 |
+
}else{
|
87 |
+
$current_url = user_trailingslashit(esc_url($current_url));
|
88 |
+
}
|
89 |
wp_safe_redirect( $current_url );
|
90 |
exit;
|
91 |
}
|
92 |
+
|
93 |
+
|
94 |
+
// HIDE/SHOW TAG AND CATEGORY #4326
|
95 |
+
if(ampforwp_is_amp_endpoint() ) {
|
96 |
+
if(is_tag() || is_category() || is_tax()){
|
97 |
+
$term_id = get_queried_object()->term_id;
|
98 |
+
$tax_status = ampforwp_get_taxonomy_meta($term_id,'status');
|
99 |
+
if($tax_status==false){
|
100 |
+
$go_to_url = home_url(add_query_arg($_GET,$wp->request));
|
101 |
+
$go_to_url = str_replace("/amp", '', $go_to_url);
|
102 |
+
$go_to_url = remove_query_arg('amp',$go_to_url);
|
103 |
+
wp_safe_redirect( esc_url($go_to_url) );
|
104 |
+
exit;
|
105 |
+
}
|
106 |
+
}else if(is_single()){
|
107 |
+
$tax_status = ampforwp_get_taxonomy_meta('','post_status');
|
108 |
+
if($tax_status==false){
|
109 |
+
$go_to_url = home_url(add_query_arg($_GET,$wp->request));
|
110 |
+
$go_to_url = str_replace("/amp", '', $go_to_url);
|
111 |
+
$go_to_url = remove_query_arg('amp',$go_to_url);
|
112 |
+
wp_safe_redirect( esc_url($go_to_url) );
|
113 |
+
exit;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
//Auto redirect /amp to ?amp when 'Change End Point to ?amp' option is enabled #2480
|
119 |
if ( ampforwp_is_amp_endpoint() && true == ampforwp_get_setting('amp-core-end-point') ){
|
120 |
$current_url = $endpoint = $new_url = '';
|
330 |
}
|
331 |
// Check if we are on Mobile phones then start redirection process
|
332 |
if ( $redirectToAMP ) {
|
333 |
+
if(isset($_GET['namp']) && $_GET['namp']==1){
|
334 |
+
return;
|
335 |
+
}
|
336 |
if(class_exists('stcr\\stcr_manage') ){
|
337 |
$check_url = implode(', ', $current_url);
|
338 |
if(in_array('comment-subscriptions', $current_url) && strpos($check_url,'srp')!=false && strpos($check_url,'srk')!=false){
|
@@ -59,6 +59,9 @@ function ampforwp_thirdparty_compatibility(){
|
|
59 |
if(function_exists('heateor_sss_save_default_options') && false == ampforwp_get_setting('ampforwp-sassy_social-switch') ){
|
60 |
add_filter('heateor_sss_disable_sharing','ampforwp_removing_sassy_social_share');
|
61 |
}
|
|
|
|
|
|
|
62 |
}
|
63 |
function ampforwp_removing_sassy_social_share(){
|
64 |
return 1;
|
59 |
if(function_exists('heateor_sss_save_default_options') && false == ampforwp_get_setting('ampforwp-sassy_social-switch') ){
|
60 |
add_filter('heateor_sss_disable_sharing','ampforwp_removing_sassy_social_share');
|
61 |
}
|
62 |
+
if(function_exists('tbn_theme_setup')){
|
63 |
+
remove_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
|
64 |
+
}
|
65 |
}
|
66 |
function ampforwp_removing_sassy_social_share(){
|
67 |
return 1;
|
@@ -91,7 +91,7 @@ if ( ! function_exists('AMPforWP\\AMPVendor\\amp_render') ) {
|
|
91 |
$template->load();
|
92 |
// Set Header: last modified information
|
93 |
if( is_singular() && $post_id ) {
|
94 |
-
header("Last-Modified: " .
|
95 |
}
|
96 |
exit;
|
97 |
}
|
91 |
$template->load();
|
92 |
// Set Header: last modified information
|
93 |
if( is_singular() && $post_id ) {
|
94 |
+
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
95 |
}
|
96 |
exit;
|
97 |
}
|
@@ -24,12 +24,7 @@ global $redux_builder_amp;
|
|
24 |
if(ampforwp_get_setting('amp-rtl-select-option')){
|
25 |
$common_css .= '
|
26 |
/** RTL CSS **/
|
27 |
-
.cta-mod .cta-btn { text-align: left;}
|
28 |
-
@media(max-width:768px){
|
29 |
-
{{module-class}}.cta-mod{display:inline-block;width:100%;text-align:center}
|
30 |
-
{{module-class}}.cta-mod .cta-btn{width: 100%;text-align: center;margin-top:15px;}
|
31 |
-
}
|
32 |
-
';
|
33 |
}
|
34 |
return array(
|
35 |
'label' =>'Call To Action',
|
24 |
if(ampforwp_get_setting('amp-rtl-select-option')){
|
25 |
$common_css .= '
|
26 |
/** RTL CSS **/
|
27 |
+
.cta-mod .cta-btn { text-align: left;}';
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
return array(
|
30 |
'label' =>'Call To Action',
|
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.4
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -191,6 +191,23 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 1.0.49 (11th May 2020) =
|
195 |
* Fixed: Background color of the row is not working in the AMP Page Builder #4398
|
196 |
|
@@ -207,20 +224,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
207 |
* Fixed: Notice added when category based is removed from Yoast #4437
|
208 |
* Fixed: Debug notices on the AMP pages #4440
|
209 |
|
210 |
-
= 1.0.47 (5th May 2020) =
|
211 |
-
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
212 |
-
|
213 |
-
= 1.0.46 (4th May 2020) =
|
214 |
-
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
215 |
-
* Fixed: Text not displaying in One signal notification #4413
|
216 |
-
* Fixed: Wrong amphtml in ?amp endpoint in category pages #4393
|
217 |
-
* Fixed: Open graph tags not loading from the SEO framework #4399
|
218 |
-
* Fixed: Blank class in archives loop and loop on homepage #4390
|
219 |
-
* Fixed: Pagination of category module going to top of the page #4401
|
220 |
-
* Fixed: Fatal error in customizer in trucking theme #4391
|
221 |
-
* Fixed: Auto Add AMP in Menu option not working in subdomain #4423
|
222 |
-
* Fixed: Showing entities instead of UTF-8 in footer json #4395
|
223 |
-
* Fixed: Ninja Tables plugin css was hiding due to class drawer #4428
|
224 |
-
* Fixed: AMP Option panel improvements #4408
|
225 |
-
|
226 |
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.4
|
7 |
+
Stable tag: 1.0.50
|
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.50 (20th May 2020) =
|
195 |
+
* Improvement: Added option to display the GDPR bar at top or bottom #4409
|
196 |
+
* Improvement: Added option to enable/disable the AMP from the categories or product or any custom taxonomy #4326
|
197 |
+
* Improvement: Added Hooks in Instant Article #4417
|
198 |
+
* Improvement: Added Polls for AMP Extension #4451
|
199 |
+
* Fixed: View Non-AMP link in the footer does not redirect to Non-AMP #3884
|
200 |
+
* Fixed: Banner notice not looking good in reading settings #4414
|
201 |
+
* Fixed: Lightbox for images appearing even after disabling #4442
|
202 |
+
* Fixed: Last modified date showing wrong in header #4456
|
203 |
+
* Fixed: WPRocket CDN is not working properly in the AMP pages #4342
|
204 |
+
* Fixed: Lighthouse issues #4443
|
205 |
+
* Fixed: Thumbnail images in category module not showing in RTL #4459
|
206 |
+
* Fixed: Blank screen when alt added in images with short pixel plugin #4452
|
207 |
+
* Fixed: invalid value defer onload with The Business News theme #4465
|
208 |
+
* Fixed: Text links are not working in mobile #4462
|
209 |
+
* Fixed: PHP Notice Undefined variable thumb_alt #4460
|
210 |
+
|
211 |
= 1.0.49 (11th May 2020) =
|
212 |
* Fixed: Background color of the row is not working in the AMP Page Builder #4398
|
213 |
|
224 |
* Fixed: Notice added when category based is removed from Yoast #4437
|
225 |
* Fixed: Debug notices on the AMP pages #4440
|
226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -15,9 +15,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
<?php do_action( 'amp_post_template_css', $this ); ?>
|
16 |
</style>
|
17 |
</head>
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
21 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
22 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
23 |
<?php do_action( 'below_the_header_design_1', $this ); ?>
|
15 |
<?php do_action( 'amp_post_template_css', $this ); ?>
|
16 |
</style>
|
17 |
</head>
|
18 |
+
<?php
|
19 |
+
$lightbox = '';
|
20 |
+
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
21 |
+
$lightbox = 'data-amp-auto-lightbox-disable ';
|
22 |
+
}?>
|
23 |
+
<body <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('single-post design_1_wrapper');?>>
|
24 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
25 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
26 |
<?php do_action( 'below_the_header_design_1', $this ); ?>
|
@@ -16,7 +16,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
<?php do_action( 'amp_post_template_css', $this ); ?>
|
17 |
</style>
|
18 |
</head>
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
20 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
21 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
22 |
|
16 |
<?php do_action( 'amp_post_template_css', $this ); ?>
|
17 |
</style>
|
18 |
</head>
|
19 |
+
<?php
|
20 |
+
$lightbox = '';
|
21 |
+
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
22 |
+
$lightbox = 'data-amp-auto-lightbox-disable ';
|
23 |
+
}?>
|
24 |
+
<body <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('single-post design_2_wrapper');?> >
|
25 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
26 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
27 |
|
@@ -16,8 +16,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
<?php do_action( 'amp_post_template_css', $this ); ?>
|
17 |
</style>
|
18 |
</head>
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
21 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
22 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
23 |
|
16 |
<?php do_action( 'amp_post_template_css', $this ); ?>
|
17 |
</style>
|
18 |
</head>
|
19 |
+
<?php
|
20 |
+
$lightbox = '';
|
21 |
+
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
22 |
+
$lightbox = 'data-amp-auto-lightbox-disable ';
|
23 |
+
}?>
|
24 |
+
<body <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('design_3_wrapper');?> >
|
25 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
26 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
27 |
|
@@ -145,7 +145,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
|
|
145 |
?>
|
146 |
<li>
|
147 |
<a title="twitter share" class="s_tw" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>"><?php echo $twitter_icon; ?>
|
148 |
-
</a>
|
149 |
</li>
|
150 |
<?php } ?>
|
151 |
<?php if(ampforwp_get_setting('enable-single-email-share')){
|
@@ -200,7 +200,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
|
|
200 |
<a title="line share" class="s_li" <?php ampforwp_nofollow_social_links(); ?> href="<?php echo esc_url($line_amp_permalink); ?>">
|
201 |
<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVy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CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
|
202 |
|
203 |
-
</a>
|
204 |
</li>
|
205 |
<?php } ?>
|
206 |
<?php if(ampforwp_get_setting('enable-single-vk-share')){
|
145 |
?>
|
146 |
<li>
|
147 |
<a title="twitter share" class="s_tw" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>"><?php echo $twitter_icon; ?>
|
148 |
+
t</a>
|
149 |
</li>
|
150 |
<?php } ?>
|
151 |
<?php if(ampforwp_get_setting('enable-single-email-share')){
|
200 |
<a title="line share" class="s_li" <?php ampforwp_nofollow_social_links(); ?> href="<?php echo esc_url($line_amp_permalink); ?>">
|
201 |
<amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld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MzYsNi4wNDUsMC4wOSw3LjgyNywyLjU0NWwyNS4yMDcsMzQuNzE3Vjk5LjY3NSAgIGMwLTMuODY2LDMuMTM0LTcsNy03YzMuODY2LDAsNywzLjEzNCw3LDdWMTUzLjM3MXogTTIzMy4zMTEsMTU5LjI2OWgtMzQuNjQ1Yy0zLjg2NiwwLTctMy4xMzQtNy03di0yNi44NDdWOTguNTczICAgYzAtMy44NjYsMy4xMzQtNyw3LTdoMzMuNTdjMy44NjYsMCw3LDMuMTM0LDcsN3MtMy4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
|
202 |
|
203 |
+
L</a>
|
204 |
</li>
|
205 |
<?php } ?>
|
206 |
<?php if(ampforwp_get_setting('enable-single-vk-share')){
|
@@ -872,7 +872,7 @@ letter-spacing: 0.10px;margin-top: 5px;font-weight: 400;}
|
|
872 |
.fsp{margin: 15px;flex-basis: calc(33.33% - 30px);}
|
873 |
.fsp-img {margin-bottom:10px;}
|
874 |
.fsp h2, .fsp h3{margin:0px 0px 5px 0px;font-size:20px;line-height:25px;font-weight:500;}
|
875 |
-
.fsp-cnt .loop-category{margin-bottom:
|
876 |
.fsp-cnt .loop-category li {font-weight: 500;}
|
877 |
.pt-dt{font-size:11px;color:#808080;margin: 8px 0px 0px 0px;display: inline-flex;}
|
878 |
blockquote{margin-bottom:20px;}
|
@@ -1686,6 +1686,8 @@ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
|
|
1686 |
<?php } ?>
|
1687 |
list-style-type:none;display:inline-block;}
|
1688 |
.ss-ic li a{color: #fff;padding: 5px;border-radius: 3px;margin: 0px 10px 10px 0px;display: inline-block;}
|
|
|
|
|
1689 |
<?php if($redux_builder_amp['enable-single-facebook-share'] || $redux_builder_amp['enbl-fb'] ){?>
|
1690 |
.ss-ic ul li .s_fb{ color:#fff;background:#3b5998;}
|
1691 |
.s_fb:after{
|
@@ -1725,6 +1727,7 @@ font-family:"Font Awesome 5 Brands";
|
|
1725 |
.s_tw:after{
|
1726 |
<?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
|
1727 |
content: "\e942";
|
|
|
1728 |
<?php }
|
1729 |
if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
|
1730 |
content:"\f099";
|
872 |
.fsp{margin: 15px;flex-basis: calc(33.33% - 30px);}
|
873 |
.fsp-img {margin-bottom:10px;}
|
874 |
.fsp h2, .fsp h3{margin:0px 0px 5px 0px;font-size:20px;line-height:25px;font-weight:500;}
|
875 |
+
.fsp-cnt .loop-category{margin-bottom:20px;}
|
876 |
.fsp-cnt .loop-category li {font-weight: 500;}
|
877 |
.pt-dt{font-size:11px;color:#808080;margin: 8px 0px 0px 0px;display: inline-flex;}
|
878 |
blockquote{margin-bottom:20px;}
|
1686 |
<?php } ?>
|
1687 |
list-style-type:none;display:inline-block;}
|
1688 |
.ss-ic li a{color: #fff;padding: 5px;border-radius: 3px;margin: 0px 10px 10px 0px;display: inline-block;}
|
1689 |
+
.ss-ic li a.s_tw {color: #1da1f2;}
|
1690 |
+
.ss-ic li a.s_li {color: #00cc00;}
|
1691 |
<?php if($redux_builder_amp['enable-single-facebook-share'] || $redux_builder_amp['enbl-fb'] ){?>
|
1692 |
.ss-ic ul li .s_fb{ color:#fff;background:#3b5998;}
|
1693 |
.s_fb:after{
|
1727 |
.s_tw:after{
|
1728 |
<?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
|
1729 |
content: "\e942";
|
1730 |
+
color:#fff;
|
1731 |
<?php }
|
1732 |
if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
|
1733 |
content:"\f099";
|
@@ -214,6 +214,21 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
214 |
if( is_front_page() && ! ampforwp_get_setting('ampforwp-homepage-on-off-support') ) {
|
215 |
return;
|
216 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
// Skip this condition for woocommerce product archive and shop pages.
|
218 |
if( function_exists('amp_woocommerce_pro_add_woocommerce_support') && (function_exists('is_product_category') && !is_product_category()) && (function_exists('is_product_tag') && !is_product_tag()) && (function_exists('is_shop') && !is_shop() ) ){
|
219 |
if( is_archive() && ( !ampforwp_get_setting('ampforwp-archive-support') || ( is_category() && !ampforwp_get_setting('ampforwp-archive-support-cat') ) || ( is_tag() && !ampforwp_get_setting('ampforwp-archive-support-tag') ))){
|
@@ -7789,7 +7804,7 @@ function ampforwp_short_pixel_cdn($content){
|
|
7789 |
$compress_level = '+q_glossy';
|
7790 |
}
|
7791 |
$compress_level .= '+ret_img+to_webp/';
|
7792 |
-
$content = preg_replace('/<amp-img(.*?)src="(.*?)
|
7793 |
return $content;
|
7794 |
}
|
7795 |
if(ampforwp_get_setting('ampforwp_css_tree_shaking') == true && ampforwp_is_gutenberg_active()){
|
@@ -8174,6 +8189,7 @@ if(!function_exists('ampforwp_add_fallback_element')){
|
|
8174 |
$m_content = $matches[1][$i];
|
8175 |
$m_content = ampforwp_imagify_webp_compatibility($m_content);
|
8176 |
$m_content = ampforwp_ewww_webp_compatibility($m_content);
|
|
|
8177 |
$m1_content = ampforwp_set_default_fallback_image($matches[1][$i]);
|
8178 |
preg_match_all('/src="(.*?)"/', $m1_content,$fimgsrc);
|
8179 |
preg_match_all('/width="(.*?)"/', $m1_content,$fimgwidth);
|
@@ -8354,6 +8370,17 @@ function ampforwp_rank_math_external_link_newtab($content){
|
|
8354 |
}
|
8355 |
return $content;
|
8356 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8357 |
/* add_action( 'wp_ajax_ampforwp_referesh_related_post', 'ampforwp_referesh_related_post' );
|
8358 |
function ampforwp_referesh_related_post(){
|
8359 |
if(!wp_verify_nonce($_POST['verify_nonce'],'ampforwp_refresh_related_poost') ){
|
@@ -8412,4 +8439,106 @@ function ampforwp_delete_refresh_related_post_trans(){
|
|
8412 |
delete_transient('ampforwp_get_not_meta_post_count');
|
8413 |
delete_transient('ampforwp_get_total_post_count');
|
8414 |
}
|
8415 |
-
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
if( is_front_page() && ! ampforwp_get_setting('ampforwp-homepage-on-off-support') ) {
|
215 |
return;
|
216 |
}
|
217 |
+
|
218 |
+
// HIDE/SHOW TAG AND CATEGORY #4326
|
219 |
+
if(is_tag() || is_category() || is_tax()){
|
220 |
+
$term_id = get_queried_object()->term_id;
|
221 |
+
$tax_status = ampforwp_get_taxonomy_meta($term_id,'status');
|
222 |
+
if($tax_status==false){
|
223 |
+
return;
|
224 |
+
}
|
225 |
+
}else if(is_single()){
|
226 |
+
$tax_status = ampforwp_get_taxonomy_meta('','post_status');
|
227 |
+
if($tax_status==false){
|
228 |
+
return;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
// Skip this condition for woocommerce product archive and shop pages.
|
233 |
if( function_exists('amp_woocommerce_pro_add_woocommerce_support') && (function_exists('is_product_category') && !is_product_category()) && (function_exists('is_product_tag') && !is_product_tag()) && (function_exists('is_shop') && !is_shop() ) ){
|
234 |
if( is_archive() && ( !ampforwp_get_setting('ampforwp-archive-support') || ( is_category() && !ampforwp_get_setting('ampforwp-archive-support-cat') ) || ( is_tag() && !ampforwp_get_setting('ampforwp-archive-support-tag') ))){
|
7804 |
$compress_level = '+q_glossy';
|
7805 |
}
|
7806 |
$compress_level .= '+ret_img+to_webp/';
|
7807 |
+
$content = preg_replace('/<amp-img(.*?)src="([^"]*)"(.*?)width="([^"]*)" height="([^"]*)"([^>]*)>/','<amp-img$1 src="'.$api_url.'/w_$4'.$compress_level.'$2"$3 width="$4" height="$5"$6>',$content);
|
7808 |
return $content;
|
7809 |
}
|
7810 |
if(ampforwp_get_setting('ampforwp_css_tree_shaking') == true && ampforwp_is_gutenberg_active()){
|
8189 |
$m_content = $matches[1][$i];
|
8190 |
$m_content = ampforwp_imagify_webp_compatibility($m_content);
|
8191 |
$m_content = ampforwp_ewww_webp_compatibility($m_content);
|
8192 |
+
$m_content = ampforwp_wp_rocket_compatibility($m_content);
|
8193 |
$m1_content = ampforwp_set_default_fallback_image($matches[1][$i]);
|
8194 |
preg_match_all('/src="(.*?)"/', $m1_content,$fimgsrc);
|
8195 |
preg_match_all('/width="(.*?)"/', $m1_content,$fimgwidth);
|
8370 |
}
|
8371 |
return $content;
|
8372 |
}
|
8373 |
+
function ampforwp_wp_rocket_compatibility($content){
|
8374 |
+
if(function_exists('rocket_activation')){
|
8375 |
+
$cdn_url = get_option('wp_rocket_settings');
|
8376 |
+
if($cdn_url['cdn'] == 1){
|
8377 |
+
$cdn_url = $cdn_url["cdn_cnames"][0];
|
8378 |
+
$content = preg_replace('/src="(.*?)\/\/(.*?)wp-content(.*?)"(.*?)>/', 'src="$1//'.$cdn_url.'/wp-content$3"$4>', $content);
|
8379 |
+
$content = preg_replace('/srcset="(.*?)\/\/(.*?)wp-content(.*?),(.*?)\/\/(.*?)wp-content(.*?),(.*?)\/\/(.*?)wp-content(.*?)"/', 'srcset="$1//'.$cdn_url.'/wp-content$3,$4//'.$cdn_url.'/wp-content$6,$7//'.$cdn_url.'/wp-content$9"', $content);
|
8380 |
+
}
|
8381 |
+
}
|
8382 |
+
return $content;
|
8383 |
+
}
|
8384 |
/* add_action( 'wp_ajax_ampforwp_referesh_related_post', 'ampforwp_referesh_related_post' );
|
8385 |
function ampforwp_referesh_related_post(){
|
8386 |
if(!wp_verify_nonce($_POST['verify_nonce'],'ampforwp_refresh_related_poost') ){
|
8439 |
delete_transient('ampforwp_get_not_meta_post_count');
|
8440 |
delete_transient('ampforwp_get_total_post_count');
|
8441 |
}
|
8442 |
+
*/
|
8443 |
+
|
8444 |
+
|
8445 |
+
// HIDE/SHOW TAG AND CATEGORY #4326
|
8446 |
+
function ampforwp_save_taxonomy_meta($term_id){
|
8447 |
+
if(isset($_POST['amp_taxonomy'])){
|
8448 |
+
$cat_status = sanitize_text_field($_POST['amp_taxonomy']);
|
8449 |
+
$hide_tax = sanitize_text_field($_POST['hide_tax']);
|
8450 |
+
add_term_meta($term_id, 'amp_taxonomy', $cat_status );
|
8451 |
+
add_term_meta( $term_id,'amp_hide_tax', $hide_tax);
|
8452 |
+
}
|
8453 |
+
}
|
8454 |
+
function ampforwp_update_taxonomy_meta($term_id, $term_id1){
|
8455 |
+
if(isset($_POST['amp_taxonomy'])){
|
8456 |
+
$cat_status = sanitize_text_field($_POST['amp_taxonomy']);
|
8457 |
+
$hide_tax = sanitize_text_field($_POST['hide_tax']);
|
8458 |
+
update_term_meta( $term_id,'amp_taxonomy', $cat_status);
|
8459 |
+
update_term_meta( $term_id,'amp_hide_tax', $hide_tax);
|
8460 |
+
}
|
8461 |
+
}
|
8462 |
+
|
8463 |
+
if ( isset( $_REQUEST['taxonomy'] )) {
|
8464 |
+
$taxonomy = $_REQUEST['taxonomy'];
|
8465 |
+
add_action('edited_'.esc_attr($taxonomy), 'ampforwp_update_taxonomy_meta',10,2);
|
8466 |
+
add_action('create_'.esc_attr($taxonomy), 'ampforwp_save_taxonomy_meta', 10);
|
8467 |
+
add_action('edited_'.esc_attr($taxonomy), 'ampforwp_update_taxonomy_meta',10,2);
|
8468 |
+
add_action('create_'.esc_attr($taxonomy), 'ampforwp_save_taxonomy_meta', 10);
|
8469 |
+
add_action (esc_attr($taxonomy).'_edit_form_fields', 'ampforwp_extra_category_fields');
|
8470 |
+
add_action (esc_attr($taxonomy).'_add_form_fields', 'ampforwp_extra_category_fields');
|
8471 |
+
}
|
8472 |
+
function ampforwp_extra_category_fields( $tag ) {
|
8473 |
+
$label = 'Category';
|
8474 |
+
if(is_object($tag)){
|
8475 |
+
if($tag->taxonomy=="post_tag"){
|
8476 |
+
$label = 'Tag';
|
8477 |
+
}else if($tag->taxonomy!='category'){
|
8478 |
+
$label = $tag->taxonomy;
|
8479 |
+
}
|
8480 |
+
}else{
|
8481 |
+
if($tag=='post_tag'){
|
8482 |
+
$label = 'Tag';
|
8483 |
+
}
|
8484 |
+
}
|
8485 |
+
?>
|
8486 |
+
<tr class="form-field">
|
8487 |
+
<?php if(!isset($tag->term_id)){?>
|
8488 |
+
<th scope="row" valign="top"></th>
|
8489 |
+
<td>
|
8490 |
+
<div class="form-field term-parent-wrap">
|
8491 |
+
<label for="show_amp_taxonomy">AMP</label>
|
8492 |
+
<select name="amp_taxonomy" id="show_amp_taxonomy" class="postform">
|
8493 |
+
<option class="level-0" value="show">Show</option>
|
8494 |
+
<option class="level-0" value="hide">Hide</option>
|
8495 |
+
</select>
|
8496 |
+
<p>You can enable or disable AMP on this category. <a href="https://ampforwp.com/tutorials/article/how-to-show-hide-the-amp-from-the-categories-or-product-pages-or-any-custom-taxonomy-in-amp/" target="_blank">Learn More</a>.</p>
|
8497 |
+
</div>
|
8498 |
+
<div id="amp-show-hide-tax" class="mrtop-10" style="display: none">
|
8499 |
+
<div class="hide-show-amp-tax">
|
8500 |
+
<input type="radio" value="hide-cat" name="hide_tax" checked="">
|
8501 |
+
<strong><?php echo esc_attr($label);?>:</strong>
|
8502 |
+
Hide from <?php echo esc_attr($label);?> Archive Page.
|
8503 |
+
</div>
|
8504 |
+
<div class="mrtop-10 hide-show-amp-tax">
|
8505 |
+
<input type="radio" value="hide-tax-post" name="hide_tax">
|
8506 |
+
<strong><?php echo esc_attr($label);?> & Posts: </strong>
|
8507 |
+
Hide from <?php echo esc_attr($label);?> Archive Page and all it's posts
|
8508 |
+
</div>
|
8509 |
+
</div>
|
8510 |
+
<br>
|
8511 |
+
</td>
|
8512 |
+
<?php }else{
|
8513 |
+
$term_data = ampforwp_get_taxonomy_meta($tag->term_id);
|
8514 |
+
$visible = '';
|
8515 |
+
$visible_status = '';
|
8516 |
+
if(isset($term_data['visible'])){
|
8517 |
+
$visible = $term_data['visible'][0];
|
8518 |
+
$visible_status = $term_data['visible_status'][0];
|
8519 |
+
}
|
8520 |
+
?>
|
8521 |
+
<th scope="row"><label for="show_amp_taxonomy">AMP</label></th>
|
8522 |
+
<td>
|
8523 |
+
<select name="amp_taxonomy" id="show_amp_taxonomy" class="postform">
|
8524 |
+
<option class="level-0" value="show" <?php if($visible=='show'){ echo "selected"; }?>>Show</option>
|
8525 |
+
<option class="level-0" value="hide" <?php if($visible=='hide'){ echo "selected";} ?>>Hide</option>
|
8526 |
+
</select><br />
|
8527 |
+
<span class="description">You can enable or disable AMP on this category. <a href="https://ampforwp.com/tutorials/article/how-to-show-hide-the-amp-from-the-categories-or-product-pages-or-any-custom-taxonomy-in-amp/" target="_blank">Learn More</a>.</span>
|
8528 |
+
<div id="amp-show-hide-tax" <?php if($visible=='show' || $visible==''){?>style="display: none;"<?php }?> class="edit_hide_tax mrtop-10">
|
8529 |
+
<div class="hide-show-amp-tax">
|
8530 |
+
<input type="radio" value="hide-cat" name="hide_tax" <?php if($visible_status=='hide-cat' || $visible_status==''){?> checked <?php }?>>
|
8531 |
+
<strong><?php echo esc_attr($label);?>:</strong>
|
8532 |
+
Hide from <?php echo esc_attr($label);?> Archive Page.
|
8533 |
+
</div>
|
8534 |
+
<div class="mrtop-10 hide-show-amp-tax">
|
8535 |
+
<input type="radio" value="hide-tax-post" name="hide_tax" <?php if($visible_status=='hide-tax-post'){?> checked <?php }?>>
|
8536 |
+
<strong><?php echo esc_attr($label);?> & Posts: </strong>
|
8537 |
+
Hide from <?php echo esc_attr($label);?> Archive Page and all it's posts
|
8538 |
+
</div>
|
8539 |
+
</div>
|
8540 |
+
</td>
|
8541 |
+
<?php }?>
|
8542 |
+
</tr>
|
8543 |
+
<?php
|
8544 |
+
}
|
@@ -11,7 +11,7 @@
|
|
11 |
<?php } ?>
|
12 |
<?php if ( isset($redux_builder_amp['fbia-header-text-area']) && $redux_builder_amp['fbia-header-text-area'] ) {
|
13 |
echo $redux_builder_amp['fbia-header-text-area'];
|
14 |
-
}
|
15 |
</head>
|
16 |
<body>
|
17 |
<article>
|
@@ -90,7 +90,7 @@
|
|
90 |
<!-- body -->
|
91 |
<?php if ( isset($redux_builder_amp['fbia-body-text-area']) && $redux_builder_amp['fbia-body-text-area'] ) {
|
92 |
echo $redux_builder_amp['fbia-body-text-area'];
|
93 |
-
}
|
94 |
<?php
|
95 |
global $more;
|
96 |
// Make it 1 to allow the full article
|
@@ -108,7 +108,7 @@
|
|
108 |
<footer>
|
109 |
<?php if ( isset($redux_builder_amp['fbia-footer-text-area']) && $redux_builder_amp['fbia-footer-text-area'] ) {
|
110 |
echo $redux_builder_amp['fbia-footer-text-area'];
|
111 |
-
}
|
112 |
<?php if( isset($redux_builder_amp['ampforwp-ia-related-articles']) && true == $redux_builder_amp['ampforwp-ia-related-articles'] ) {
|
113 |
if ( ! empty( $categories ) ) {
|
114 |
$categories_ids = wp_list_pluck( $categories, 'term_id' );
|
11 |
<?php } ?>
|
12 |
<?php if ( isset($redux_builder_amp['fbia-header-text-area']) && $redux_builder_amp['fbia-header-text-area'] ) {
|
13 |
echo $redux_builder_amp['fbia-header-text-area'];
|
14 |
+
}do_action('ampforwp_fbia_head');?>
|
15 |
</head>
|
16 |
<body>
|
17 |
<article>
|
90 |
<!-- body -->
|
91 |
<?php if ( isset($redux_builder_amp['fbia-body-text-area']) && $redux_builder_amp['fbia-body-text-area'] ) {
|
92 |
echo $redux_builder_amp['fbia-body-text-area'];
|
93 |
+
}do_action('ampforwp_fbia_body');?>
|
94 |
<?php
|
95 |
global $more;
|
96 |
// Make it 1 to allow the full article
|
108 |
<footer>
|
109 |
<?php if ( isset($redux_builder_amp['fbia-footer-text-area']) && $redux_builder_amp['fbia-footer-text-area'] ) {
|
110 |
echo $redux_builder_amp['fbia-footer-text-area'];
|
111 |
+
}do_action('ampforwp_fbia_footer');?>
|
112 |
<?php if( isset($redux_builder_amp['ampforwp-ia-related-articles']) && true == $redux_builder_amp['ampforwp-ia-related-articles'] ) {
|
113 |
if ( ! empty( $categories ) ) {
|
114 |
$categories_ids = wp_list_pluck( $categories, 'term_id' );
|