Version Description
(9th December 2019) = * Improvement: Need to add full short pixel plugin compatibility #3782 * Fixed: Need to improve UI when "Saved" notification displays. #3856 * Fixed: Need to show the Attention message when custom AMP editor box checked but there is no content in it #2866 * Fixed: Issue with AMP page builder tool when images are inserted in slider module. #3780 * Fixed: Hidden posts in AMP should not show in related posts #3839 * Fixed: Make header Unsticky not working when Infinite scrolling is turned on. #3831 * Fixed: The post title appears 2 times: after the parent category and after the child on breadcrumb. #3724 * Fixed: data-block-on-consent missing in GTM code #3911 * Fixed: PHP Warnings from redux filesystem #3901 * Fixed: Debug notice #3913 * Fixed: Sidebar Widgets Default CSS should load on Woo commerce Sidebar #3912 * Fixed: Images get streched in new version of the AMP FOR WP Plugin #3914
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.98.22 |
Comparing to | |
See all releases |
Code changes from version 0.9.98.21 to 0.9.98.22
- README.md +16 -1
- accelerated-moblie-pages.php +2 -2
- changelog.txt +15 -0
- classes/class-ampforwp-fields.php +1 -1
- components/related-posts/related-posts.php +6 -1
- includes/admin-script.js +36 -0
- includes/admin-style.css +29 -6
- includes/features/advertisement/ads-options.php +2 -1
- includes/features/analytics/analytics-functions.php +5 -3
- includes/features/performance/performance-functions.php +4 -1
- includes/options/admin-config.php +20 -20
- includes/options/redux-core/inc/class.redux_filesystem.php +1 -0
- includes/vendor/amp/includes/sanitizers/class-amp-tree-style-sanitizer.php +5 -1
- includes/vendor/css-parser/parser-helper-function.php +1 -1
- readme.txt +15 -15
- templates/custom-amp-content-button.js +39 -1
- templates/custom-amp-content.php +1 -1
- templates/design-manager/design-1/elements/bread-crumbs.php +1 -1
- templates/design-manager/design-1/elements/related-posts.php +18 -3
- templates/design-manager/design-1/style.php +1 -0
- templates/design-manager/design-2/elements/bread-crumbs.php +1 -1
- templates/design-manager/design-2/elements/related-posts.php +18 -3
- templates/design-manager/design-3/elements/bread-crumbs.php +1 -1
- templates/design-manager/design-3/elements/related-posts.php +16 -1
- templates/design-manager/design-3/style.php +0 -1
- templates/design-manager/swift/style.php +5 -4
- templates/features.php +20 -0
@@ -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
|
7 |
-
Stable tag: 0.9.98.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -191,6 +191,21 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 0.9.98.21 (3th December 2019) =
|
195 |
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
196 |
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 0.9.98.22
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
191 |
|
192 |
== Changelog ==
|
193 |
|
194 |
+
= 0.9.98.22 (9th December 2019) =
|
195 |
+
* Improvement: Need to add full short pixel plugin compatibility #3782
|
196 |
+
* Fixed: Need to improve UI when "Saved" notification displays. #3856
|
197 |
+
* Fixed: Need to show the Attention message when custom AMP editor box checked but there is no content in it #2866
|
198 |
+
* Fixed: Issue with AMP page builder tool when images are inserted in slider module. #3780
|
199 |
+
* Fixed: Hidden posts in AMP should not show in related posts #3839
|
200 |
+
* Fixed: Make header Unsticky not working when Infinite scrolling is turned on. #3831
|
201 |
+
* Fixed: The post title appears 2 times: after the parent category and after the child on breadcrumb. #3724
|
202 |
+
* Fixed: data-block-on-consent missing in GTM code #3911
|
203 |
+
* Fixed: Debug error #3910
|
204 |
+
* Fixed: PHP Warnings from redux filesystem #3901
|
205 |
+
* Fixed: Debug notice #3913
|
206 |
+
* Fixed: Sidebar Widgets Default CSS should load on Woo commerce Sidebar #3912
|
207 |
+
* Fixed: Images get streched in new version of the AMP FOR WP Plugin #3914
|
208 |
+
|
209 |
= 0.9.98.21 (3th December 2019) =
|
210 |
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
211 |
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
@@ -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: 0.9.98.
|
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','0.9.98.
|
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: 0.9.98.22
|
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','0.9.98.22');
|
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,20 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 0.9.98.21 (3th December 2019) =
|
4 |
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
5 |
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 0.9.98.22 (9th December 2019) =
|
4 |
+
* Improvement: Need to add full short pixel plugin compatibility #3782
|
5 |
+
* Fixed: Need to improve UI when "Saved" notification displays. #3856
|
6 |
+
* Fixed: Need to show the Attention message when custom AMP editor box checked but there is no content in it #2866
|
7 |
+
* Fixed: Issue with AMP page builder tool when images are inserted in slider module. #3780
|
8 |
+
* Fixed: Hidden posts in AMP should not show in related posts #3839
|
9 |
+
* Fixed: Make header Unsticky not working when Infinite scrolling is turned on. #3831
|
10 |
+
* Fixed: The post title appears 2 times: after the parent category and after the child on breadcrumb. #3724
|
11 |
+
* Fixed: data-block-on-consent missing in GTM code #3911
|
12 |
+
* Fixed: Debug error #3910
|
13 |
+
* Fixed: PHP Warnings from redux filesystem #3901
|
14 |
+
* Fixed: Debug notice #3913
|
15 |
+
* Fixed: Sidebar Widgets Default CSS should load on Woo commerce Sidebar #3912
|
16 |
+
* Fixed: Images get streched in new version of the AMP FOR WP Plugin #3914
|
17 |
+
|
18 |
= 0.9.98.21 (3th December 2019) =
|
19 |
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
20 |
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
@@ -185,7 +185,7 @@ class AMPforWP_Fields
|
|
185 |
echo '<div class="ux-field-container amp-ux-heading"><h2>'.esc_html($this->title).'</h2></div>';
|
186 |
}
|
187 |
public function ampforwp_field_loader($fields = array()){
|
188 |
-
echo '<div class="amp-ux-loader"><div class="amp-ux-loading"></div><div id="amp-ux-loading-saved" class="hide"
|
189 |
}
|
190 |
|
191 |
// Main Section
|
185 |
echo '<div class="ux-field-container amp-ux-heading"><h2>'.esc_html($this->title).'</h2></div>';
|
186 |
}
|
187 |
public function ampforwp_field_loader($fields = array()){
|
188 |
+
echo '<div class="amp-ux-loader"><div class="amp-ux-loading"></div><div id="amp-ux-loading-saved" class="hide"></div><span class="hide amp-ux-check"></span></div>';
|
189 |
}
|
190 |
|
191 |
// Main Section
|
@@ -63,7 +63,12 @@ function ampforwp_related_post_loop_query(){
|
|
63 |
'ignore_sticky_posts'=>1,
|
64 |
'has_password' => false ,
|
65 |
'post_status'=> 'publish',
|
66 |
-
'no_found_rows' => true
|
|
|
|
|
|
|
|
|
|
|
67 |
);
|
68 |
if($redux_builder_amp['ampforwp-single-select-type-of-related']==2 && 'post' == $post->post_type ){
|
69 |
$categories = get_the_category($post->ID);
|
63 |
'ignore_sticky_posts'=>1,
|
64 |
'has_password' => false ,
|
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 ){
|
74 |
$categories = get_the_category($post->ID);
|
@@ -758,6 +758,42 @@ var redux_title_modify = function(){
|
|
758 |
});
|
759 |
$('li.active .redux-group-tab-link-a').click();
|
760 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
if($(".amp-preview-button").length>0){
|
762 |
$(".amp-preview-button").click(function(){
|
763 |
var srcLink = $("#amp-preview-iframe").attr('data-src');
|
758 |
});
|
759 |
$('li.active .redux-group-tab-link-a').click();
|
760 |
}
|
761 |
+
|
762 |
+
$("#meta-checkbox").click(function(){
|
763 |
+
ampforwp_check_custom_content_status($(this));
|
764 |
+
});
|
765 |
+
ampforwp_check_custom_content_status($("#meta-checkbox"));
|
766 |
+
function ampforwp_check_custom_content_status(checker){
|
767 |
+
if (checker.prop('checked')==true){
|
768 |
+
$('.amp-editor-content').show();
|
769 |
+
var content = $('#ampforwp_custom_content_editor').val();
|
770 |
+
if(content !== ''){
|
771 |
+
$('.amp-editor-content').hide();
|
772 |
+
}
|
773 |
+
}
|
774 |
+
else{
|
775 |
+
$('.amp-editor-content').hide();
|
776 |
+
}
|
777 |
+
}
|
778 |
+
|
779 |
+
$("#ampforwp_custom_content_editor").on("keyup change paste",function(){
|
780 |
+
if($(this).val()!=""){
|
781 |
+
$('.amp-editor-content').hide();
|
782 |
+
}else{
|
783 |
+
$('.amp-editor-content').show();
|
784 |
+
}
|
785 |
+
if($("#meta-checkbox").prop('checked')==false){
|
786 |
+
$('.amp-editor-content').show();
|
787 |
+
$("#ampforwp-amp-content-error-msg").html('Please select the "<b>Use This Content as AMP Content</b>" checkbox above before update.');
|
788 |
+
if($(this).val()==""){
|
789 |
+
$('.amp-editor-content').hide();
|
790 |
+
$("#ampforwp-amp-content-error-msg").html("AMP contents is blank, Please enter content");
|
791 |
+
}
|
792 |
+
}else{
|
793 |
+
$("#ampforwp-amp-content-error-msg").html("AMP contents is blank, Please enter content");
|
794 |
+
}
|
795 |
+
});
|
796 |
+
|
797 |
if($(".amp-preview-button").length>0){
|
798 |
$(".amp-preview-button").click(function(){
|
799 |
var srcLink = $("#amp-preview-iframe").attr('data-src');
|
@@ -1607,13 +1607,12 @@ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"
|
|
1607 |
}
|
1608 |
.ux-field-container select.amp-ux-field{
|
1609 |
border:none;
|
1610 |
-
border
|
1611 |
-
background: #f9f9f9;
|
1612 |
width: 100%;
|
1613 |
max-width: 70%;
|
1614 |
-
padding:
|
1615 |
height: 100%;
|
1616 |
-
font-size:
|
1617 |
line-height: 1.7;
|
1618 |
color: #333;
|
1619 |
box-shadow: none;
|
@@ -1683,6 +1682,9 @@ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"
|
|
1683 |
.amp-ux-checkbox-container input[type=checkbox]:checked:before{
|
1684 |
color:#fff;
|
1685 |
font-size: 20px;
|
|
|
|
|
|
|
1686 |
}
|
1687 |
.ux-field-container h2.ux-label, .s-f-pg{
|
1688 |
font-size: 12px;
|
@@ -1904,11 +1906,20 @@ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"
|
|
1904 |
-webkit-animation: spin 2s linear infinite; /* Safari */
|
1905 |
animation: spin 2s linear infinite;
|
1906 |
}
|
1907 |
-
|
1908 |
background: #12b312;
|
1909 |
color: #fff;
|
1910 |
font-weight: bold;
|
1911 |
padding: 4px 8px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1912 |
}
|
1913 |
|
1914 |
/* Safari */
|
@@ -1979,12 +1990,22 @@ div#section-ampforwp-ux-section::after,div#section-ampforwp-ux-section-right::af
|
|
1979 |
right: 20px;
|
1980 |
}
|
1981 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1982 |
@media(max-width:767px){
|
1983 |
.upload_button_div.amp-ux-upload{
|
1984 |
display: inline-block;
|
1985 |
}
|
1986 |
.ux-field-container select.amp-ux-field{
|
1987 |
-
padding:
|
|
|
1988 |
}
|
1989 |
.amp-ux-section-fields{
|
1990 |
width:600px;
|
@@ -2009,4 +2030,6 @@ div#section-ampforwp-ux-section::after,div#section-ampforwp-ux-section-right::af
|
|
2009 |
.drawer {
|
2010 |
width:86%;
|
2011 |
}
|
|
|
|
|
2012 |
}
|
1607 |
}
|
1608 |
.ux-field-container select.amp-ux-field{
|
1609 |
border:none;
|
1610 |
+
border:1px solid #ddd;
|
|
|
1611 |
width: 100%;
|
1612 |
max-width: 70%;
|
1613 |
+
padding: 5px 15px;
|
1614 |
height: 100%;
|
1615 |
+
font-size: 14px;
|
1616 |
line-height: 1.7;
|
1617 |
color: #333;
|
1618 |
box-shadow: none;
|
1682 |
.amp-ux-checkbox-container input[type=checkbox]:checked:before{
|
1683 |
color:#fff;
|
1684 |
font-size: 20px;
|
1685 |
+
content: "\f147";
|
1686 |
+
margin: -2px 0 0 -5px;
|
1687 |
+
font-family:"dashicons";
|
1688 |
}
|
1689 |
.ux-field-container h2.ux-label, .s-f-pg{
|
1690 |
font-size: 12px;
|
1906 |
-webkit-animation: spin 2s linear infinite; /* Safari */
|
1907 |
animation: spin 2s linear infinite;
|
1908 |
}
|
1909 |
+
/*#amp-ux-loading-saved {
|
1910 |
background: #12b312;
|
1911 |
color: #fff;
|
1912 |
font-weight: bold;
|
1913 |
padding: 4px 8px;
|
1914 |
+
}*/
|
1915 |
+
#amp-ux-loading-saved:before{
|
1916 |
+
content:"";
|
1917 |
+
display:inline-block;
|
1918 |
+
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 134.565 134.565" style="enable-background:new 0 0 134.565 134.565;fill: green;" xml:space="preserve"><g><path d="M67.283,0c-36.96,0-67.2,30.277-67.2,67.283s30.24,67.283,67.2,67.283s67.2-30.277,67.2-67.283S104.243,0,67.283,0z M67.283,126.155c-32.34,0-58.8-26.493-58.8-58.872S34.943,8.41,67.283,8.41s58.8,26.493,58.8,58.872 S99.623,126.155,67.283,126.155z"/><path d="M93.743,47.518l-34.86,34.903L41.243,64.76c-1.68-1.682-4.2-1.682-5.88,0c-1.68,1.682-1.68,4.205,0,5.887l20.58,20.605 c0.84,0.841,1.68,1.262,2.94,1.262c1.26,0,2.1-0.421,2.94-1.262l37.8-37.846c1.68-1.682,1.68-4.205,0-5.887 C97.943,45.836,95.423,45.836,93.743,47.518z"/></g></svg>');
|
1919 |
+
width: 20px;
|
1920 |
+
height: 20px;
|
1921 |
+
background-repeat: no-repeat;
|
1922 |
+
top: 16px;
|
1923 |
}
|
1924 |
|
1925 |
/* Safari */
|
1990 |
right: 20px;
|
1991 |
}
|
1992 |
}
|
1993 |
+
|
1994 |
+
@media(max-width:768px){
|
1995 |
+
.amp-ux-checkbox-container input[type=checkbox]:checked:before {
|
1996 |
+
margin: -2px 0 0 -8px;
|
1997 |
+
}
|
1998 |
+
|
1999 |
+
}
|
2000 |
+
|
2001 |
+
|
2002 |
@media(max-width:767px){
|
2003 |
.upload_button_div.amp-ux-upload{
|
2004 |
display: inline-block;
|
2005 |
}
|
2006 |
.ux-field-container select.amp-ux-field{
|
2007 |
+
padding:4px 10px;
|
2008 |
+
min-height: auto;
|
2009 |
}
|
2010 |
.amp-ux-section-fields{
|
2011 |
width:600px;
|
2030 |
.drawer {
|
2031 |
width:86%;
|
2032 |
}
|
2033 |
+
|
2034 |
+
|
2035 |
}
|
@@ -1033,6 +1033,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
1033 |
$afwp_active_url = ampforwp_wp_plugin_action_link( $plugin_file, 'activate' );
|
1034 |
}else{
|
1035 |
$is_afwp = "active";
|
|
|
1036 |
$afwp_active_url = $ampforwp_admin_url.'admin.php?page=adsforwp&tab=general&reference=ampforwp';
|
1037 |
$afwp_default = 2;
|
1038 |
}
|
@@ -1041,7 +1042,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
1041 |
'id' => 'ampforwp-ads-module',
|
1042 |
'class'=> is_plugin_active('ads-for-wp/ads-for-wp.php')? "adsactive": '',
|
1043 |
'type' => 'raw',
|
1044 |
-
'content' => '<div class="ampforwp-ads-data-update"><input type="hidden" value="'.
|
1045 |
'.(!is_plugin_active('ads-for-wp/ads-for-wp.php')? esc_html__('A Revolutionary new Ad plugin from our team which is dedicated to make the #1 Ad solution in the world.','accelerated-mobile-pages'): esc_html__('Thank you for upgrading the Ads for WP','accelerated-mobile-pages')).'
|
1046 |
<div class="row">
|
1047 |
|
1033 |
$afwp_active_url = ampforwp_wp_plugin_action_link( $plugin_file, 'activate' );
|
1034 |
}else{
|
1035 |
$is_afwp = "active";
|
1036 |
+
$ampforwp_admin_url = admin_url();
|
1037 |
$afwp_active_url = $ampforwp_admin_url.'admin.php?page=adsforwp&tab=general&reference=ampforwp';
|
1038 |
$afwp_default = 2;
|
1039 |
}
|
1042 |
'id' => 'ampforwp-ads-module',
|
1043 |
'class'=> is_plugin_active('ads-for-wp/ads-for-wp.php')? "adsactive": '',
|
1044 |
'type' => 'raw',
|
1045 |
+
'content' => '<div class="ampforwp-ads-data-update"><input type="hidden" value="'.esc_url_raw($afwp_active_url).'" class="ampforwp-activation-url" id="'.esc_attr($is_afwp).'">
|
1046 |
'.(!is_plugin_active('ads-for-wp/ads-for-wp.php')? esc_html__('A Revolutionary new Ad plugin from our team which is dedicated to make the #1 Ad solution in the world.','accelerated-mobile-pages'): esc_html__('Thank you for upgrading the Ads for WP','accelerated-mobile-pages')).'
|
1047 |
<div class="row">
|
1048 |
|
@@ -396,6 +396,9 @@ function amp_gtm_add_gtm_support( $analytics ) {
|
|
396 |
),
|
397 |
),
|
398 |
);
|
|
|
|
|
|
|
399 |
if ( true == ampforwp_get_setting('ampforwp-gtm-field-anonymizeIP') ) {
|
400 |
$analytics['amp-gtm-googleanalytics']['config_data']['vars']['anonymizeIP'] = 'true';
|
401 |
}
|
@@ -408,7 +411,7 @@ function amp_gtm_add_gtm_support( $analytics ) {
|
|
408 |
}
|
409 |
return $analytics;
|
410 |
}
|
411 |
-
|
412 |
function ampforwp_add_advance_gtm_fields( $ampforwp_adv_gtm_fields ) {
|
413 |
if(true == ampforwp_get_setting('amp-use-gtm-option') && true == ampforwp_get_setting('ampforwp-gtm-field-advance-switch') ){
|
414 |
$ampforwp_adv_gtm_fields = "";
|
@@ -417,10 +420,9 @@ function ampforwp_add_advance_gtm_fields( $ampforwp_adv_gtm_fields ) {
|
|
417 |
$ampforwp_adv_gtm_fields = preg_replace('/\n\s*\n/', '', $ampforwp_adv_gtm_fields);
|
418 |
$ampforwp_adv_gtm_fields = preg_replace('/\/\/(.*?)\s(.*)/m', '$2', $ampforwp_adv_gtm_fields);
|
419 |
?>
|
420 |
-
<amp-analytics data-credentials="include" config="https://www.googletagmanager.com/amp.json?id=<?php echo esc_attr(ampforwp_get_setting('amp-gtm-id')); ?>&gtm.url=SOURCE_URL"><script type="application/json"><?php echo $ampforwp_adv_gtm_fields ?></script></amp-analytics>
|
421 |
<?php
|
422 |
}
|
423 |
-
return $ampforwp_adv_gtm_fields;
|
424 |
}
|
425 |
|
426 |
// 83. Advance Analytics(Google Analytics)
|
396 |
),
|
397 |
),
|
398 |
);
|
399 |
+
if(ampforwp_get_data_consent()){
|
400 |
+
$analytics['amp-gtm-googleanalytics']['attributes']['data-block-on-consent'] = '';
|
401 |
+
}
|
402 |
if ( true == ampforwp_get_setting('ampforwp-gtm-field-anonymizeIP') ) {
|
403 |
$analytics['amp-gtm-googleanalytics']['config_data']['vars']['anonymizeIP'] = 'true';
|
404 |
}
|
411 |
}
|
412 |
return $analytics;
|
413 |
}
|
414 |
+
add_action( 'ampforwp_body_beginning', 'ampforwp_add_advance_gtm_fields' );
|
415 |
function ampforwp_add_advance_gtm_fields( $ampforwp_adv_gtm_fields ) {
|
416 |
if(true == ampforwp_get_setting('amp-use-gtm-option') && true == ampforwp_get_setting('ampforwp-gtm-field-advance-switch') ){
|
417 |
$ampforwp_adv_gtm_fields = "";
|
420 |
$ampforwp_adv_gtm_fields = preg_replace('/\n\s*\n/', '', $ampforwp_adv_gtm_fields);
|
421 |
$ampforwp_adv_gtm_fields = preg_replace('/\/\/(.*?)\s(.*)/m', '$2', $ampforwp_adv_gtm_fields);
|
422 |
?>
|
423 |
+
<amp-analytics <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> data-credentials="include" config="https://www.googletagmanager.com/amp.json?id=<?php echo esc_attr(ampforwp_get_setting('amp-gtm-id')); ?>&gtm.url=SOURCE_URL"><script type="application/json"><?php echo sanitize_text_field($ampforwp_adv_gtm_fields) ?></script></amp-analytics>
|
424 |
<?php
|
425 |
}
|
|
|
426 |
}
|
427 |
|
428 |
// 83. Advance Analytics(Google Analytics)
|
@@ -259,7 +259,10 @@ if( !function_exists("ampforwp_clear_tree_shaking") ) {
|
|
259 |
if ( ! current_user_can( 'manage_options' ) ) {
|
260 |
return;
|
261 |
}
|
262 |
-
|
|
|
|
|
|
|
263 |
if ( is_admin() && ( ( $nonceCheck && ampforwp_get_setting( 'ampforwp_css_tree_shaking' ) && $options == '' ) || ( count( $changed_values ) != 0 && (ampforwp_get_setting( 'ampforwp_css_tree_shaking' ) || isset($changed_values['ampforwp_css_tree_shaking'])) ) ) ) {
|
264 |
$upload_dir = wp_upload_dir();
|
265 |
$user_dirname = $upload_dir['basedir'] . '/' . 'ampforwp-tree-shaking';
|
259 |
if ( ! current_user_can( 'manage_options' ) ) {
|
260 |
return;
|
261 |
}
|
262 |
+
$nonceCheck = false;
|
263 |
+
if(isset($_GET['nonce'])){
|
264 |
+
$nonceCheck = wp_verify_nonce( $_GET['nonce'], 'ampforwp_clear_tree_shaking' );
|
265 |
+
}
|
266 |
if ( is_admin() && ( ( $nonceCheck && ampforwp_get_setting( 'ampforwp_css_tree_shaking' ) && $options == '' ) || ( count( $changed_values ) != 0 && (ampforwp_get_setting( 'ampforwp_css_tree_shaking' ) || isset($changed_values['ampforwp_css_tree_shaking'])) ) ) ) {
|
267 |
$upload_dir = wp_upload_dir();
|
268 |
$user_dirname = $upload_dir['basedir'] . '/' . 'ampforwp-tree-shaking';
|
@@ -3668,6 +3668,23 @@ Redux::setSection( $opt_name, array(
|
|
3668 |
'default' => 0,
|
3669 |
'required' => array( array('gnrl-sidebar', '=' , '1') ),
|
3670 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3671 |
array(
|
3672 |
'id' => 'sidebar-bgcolor',
|
3673 |
'class' => 'child_opt child_opt_arrow',
|
@@ -3676,7 +3693,7 @@ Redux::setSection( $opt_name, array(
|
|
3676 |
'default' => array(
|
3677 |
'color' => '#f7f7f7',
|
3678 |
),
|
3679 |
-
'required' => array( array('
|
3680 |
),
|
3681 |
array(
|
3682 |
'id' => 'sbr-heading-color',
|
@@ -3687,7 +3704,7 @@ Redux::setSection( $opt_name, array(
|
|
3687 |
'color' => '#333',
|
3688 |
),
|
3689 |
'required' => array(
|
3690 |
-
array('
|
3691 |
)
|
3692 |
),
|
3693 |
array(
|
@@ -3699,26 +3716,9 @@ Redux::setSection( $opt_name, array(
|
|
3699 |
'color' => '#333',
|
3700 |
),
|
3701 |
'required' => array(
|
3702 |
-
array('
|
3703 |
)
|
3704 |
),
|
3705 |
-
array(
|
3706 |
-
'id' => 'swift-sidebar',
|
3707 |
-
'class' => 'child_opt child_opt_arrow',
|
3708 |
-
'type' => 'switch',
|
3709 |
-
'title' => esc_html__('Single Sidebar', 'accelerated-mobile-pages'),
|
3710 |
-
'default' => 0,
|
3711 |
-
'required' => array('gnrl-sidebar', '=' , '1'),
|
3712 |
-
|
3713 |
-
),
|
3714 |
-
array(
|
3715 |
-
'id' => 'page_sidebar',
|
3716 |
-
'class' => 'child_opt child_opt_arrow',
|
3717 |
-
'type' => 'switch',
|
3718 |
-
'title' => esc_html__('Page Sidebar', 'accelerated-mobile-pages'),
|
3719 |
-
'default' => '0',
|
3720 |
-
'required' => array('gnrl-sidebar', '=' , '1'),
|
3721 |
-
),
|
3722 |
array(
|
3723 |
'id' => 'ampforwp-infinite-scroll',
|
3724 |
'type' => 'switch',
|
3668 |
'default' => 0,
|
3669 |
'required' => array( array('gnrl-sidebar', '=' , '1') ),
|
3670 |
),
|
3671 |
+
array(
|
3672 |
+
'id' => 'swift-sidebar',
|
3673 |
+
'class' => 'child_opt child_opt_arrow',
|
3674 |
+
'type' => 'switch',
|
3675 |
+
'title' => esc_html__('Single Sidebar', 'accelerated-mobile-pages'),
|
3676 |
+
'default' => 0,
|
3677 |
+
'required' => array('gnrl-sidebar', '=' , '1'),
|
3678 |
+
|
3679 |
+
),
|
3680 |
+
array(
|
3681 |
+
'id' => 'page_sidebar',
|
3682 |
+
'class' => 'child_opt child_opt_arrow',
|
3683 |
+
'type' => 'switch',
|
3684 |
+
'title' => esc_html__('Page Sidebar', 'accelerated-mobile-pages'),
|
3685 |
+
'default' => '0',
|
3686 |
+
'required' => array('gnrl-sidebar', '=' , '1'),
|
3687 |
+
),
|
3688 |
array(
|
3689 |
'id' => 'sidebar-bgcolor',
|
3690 |
'class' => 'child_opt child_opt_arrow',
|
3693 |
'default' => array(
|
3694 |
'color' => '#f7f7f7',
|
3695 |
),
|
3696 |
+
'required' => array( array('gnrl-sidebar', '=',1) )
|
3697 |
),
|
3698 |
array(
|
3699 |
'id' => 'sbr-heading-color',
|
3704 |
'color' => '#333',
|
3705 |
),
|
3706 |
'required' => array(
|
3707 |
+
array('gnrl-sidebar','=',1)
|
3708 |
)
|
3709 |
),
|
3710 |
array(
|
3716 |
'color' => '#333',
|
3717 |
),
|
3718 |
'required' => array(
|
3719 |
+
array('gnrl-sidebar','=',1)
|
3720 |
)
|
3721 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3722 |
array(
|
3723 |
'id' => 'ampforwp-infinite-scroll',
|
3724 |
'type' => 'switch',
|
@@ -26,6 +26,7 @@
|
|
26 |
public $parent = null;
|
27 |
|
28 |
public function __construct() {
|
|
|
29 |
$this->parent->admin_notices[] = array(
|
30 |
'type' => 'error',
|
31 |
'msg' => '<strong>' . __( 'File Permission Issues', 'accelerated-mobile-pages' ) . '</strong><br/>' . sprintf( __( 'We were unable to modify required files. Please check your permissions, or modify your wp-config.php file to contain your FTP login credentials as <a href="%s" target="_blank">outlined here</a>.', 'accelerated-mobile-pages' ), 'https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants' ),
|
26 |
public $parent = null;
|
27 |
|
28 |
public function __construct() {
|
29 |
+
$this->parent = new \stdClass();
|
30 |
$this->parent->admin_notices[] = array(
|
31 |
'type' => 'error',
|
32 |
'msg' => '<strong>' . __( 'File Permission Issues', 'accelerated-mobile-pages' ) . '</strong><br/>' . sprintf( __( 'We were unable to modify required files. Please check your permissions, or modify your wp-config.php file to contain your FTP login credentials as <a href="%s" target="_blank">outlined here</a>.', 'accelerated-mobile-pages' ), 'https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants' ),
|
@@ -1804,10 +1804,14 @@ class AMP_treeshaking_Style_Sanitizer extends AMP_tree_Base_Sanitizer {
|
|
1804 |
$rule = sprintf( '%s .%s { %s }', $root, $class, $style_attribute->nodeValue );
|
1805 |
|
1806 |
$this->set_current_node( $element ); // And sources when needing to be located.
|
|
|
|
|
|
|
1807 |
|
|
|
1808 |
$processed = $this->process_stylesheet( $rule, array(
|
1809 |
'allowed_at_rules' => array(),
|
1810 |
-
'property_whitelist' => $
|
1811 |
) );
|
1812 |
|
1813 |
$element->removeAttribute( 'style' );
|
1804 |
$rule = sprintf( '%s .%s { %s }', $root, $class, $style_attribute->nodeValue );
|
1805 |
|
1806 |
$this->set_current_node( $element ); // And sources when needing to be located.
|
1807 |
+
$style_declaration = '';
|
1808 |
+
if(isset($this->style_custom_cdata_spec['css_spec']['declaration'])){
|
1809 |
+
$style_declaration = $this->style_custom_cdata_spec['css_spec']['declaration'];
|
1810 |
|
1811 |
+
}
|
1812 |
$processed = $this->process_stylesheet( $rule, array(
|
1813 |
'allowed_at_rules' => array(),
|
1814 |
+
'property_whitelist' => $style_declaration,
|
1815 |
) );
|
1816 |
|
1817 |
$element->removeAttribute( 'style' );
|
@@ -120,7 +120,7 @@ class AMPFORWP_Tree_Shaking_Transient{
|
|
120 |
}
|
121 |
}
|
122 |
|
123 |
-
|
124 |
return apply_filters( "transient_{$transient}", json_decode($value, true), $transient );
|
125 |
}
|
126 |
}
|
120 |
}
|
121 |
}
|
122 |
|
123 |
+
$value = isset($value) ? $value : '';
|
124 |
return apply_filters( "transient_{$transient}", json_decode($value, true), $transient );
|
125 |
}
|
126 |
}
|
@@ -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
|
7 |
-
Stable tag: 0.9.98.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -191,6 +191,20 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 0.9.98.21 (3th December 2019) =
|
195 |
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
196 |
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
@@ -233,18 +247,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
233 |
* Fixed: Multiple UX related modifactions #3869
|
234 |
* Fixed: strpos() debug error after 19 update #3878
|
235 |
|
236 |
-
= 0.9.98.19 (25th November 2019) =
|
237 |
-
* Fixed: image transients should clear automatically #3781
|
238 |
-
* Fixed: CTA button in header could be made no follow #3798
|
239 |
-
* Fixed: In IOS screen, Menu cross button is not appearing in Swift design #3809
|
240 |
-
* Fixed: Comment closed opion need to be removed. #3750
|
241 |
-
* Fixed: In template mode Need to show extension setting panel. #3728
|
242 |
-
* Fixed: Facebook comment is not changing language when we select another language #3710
|
243 |
-
* Fixed: Single Sidebar data is visible in Homepage #3636
|
244 |
-
* Fixed: Need to remove width from inline style on amp images #3741
|
245 |
-
* Fixed: If permalinks is set as "/index.php/%year%/%monthnum%/%day%/%postname%/" then not working properly with Pagination #3537
|
246 |
-
* Fixed: Canonical url is changing in cateogry pages when cateogry name start with amp #3694
|
247 |
-
* Fixed: general fixes and improvements part 2 #3621
|
248 |
-
* Fixed: Warning: strpos(): Empty needle in /home/statecer/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5788 #3870
|
249 |
-
|
250 |
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.3
|
7 |
+
Stable tag: 0.9.98.22
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
191 |
|
192 |
== Changelog ==
|
193 |
|
194 |
+
= 0.9.98.22 (9th December 2019) =
|
195 |
+
* Improvement: Need to add full short pixel plugin compatibility #3782
|
196 |
+
* Fixed: Need to improve UI when "Saved" notification displays. #3856
|
197 |
+
* Fixed: Need to show the Attention message when custom AMP editor box checked but there is no content in it #2866
|
198 |
+
* Fixed: Issue with AMP page builder tool when images are inserted in slider module. #3780
|
199 |
+
* Fixed: Hidden posts in AMP should not show in related posts #3839
|
200 |
+
* Fixed: Make header Unsticky not working when Infinite scrolling is turned on. #3831
|
201 |
+
* Fixed: The post title appears 2 times: after the parent category and after the child on breadcrumb. #3724
|
202 |
+
* Fixed: data-block-on-consent missing in GTM code #3911
|
203 |
+
* Fixed: PHP Warnings from redux filesystem #3901
|
204 |
+
* Fixed: Debug notice #3913
|
205 |
+
* Fixed: Sidebar Widgets Default CSS should load on Woo commerce Sidebar #3912
|
206 |
+
* Fixed: Images get streched in new version of the AMP FOR WP Plugin #3914
|
207 |
+
|
208 |
= 0.9.98.21 (3th December 2019) =
|
209 |
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
210 |
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
247 |
* Fixed: Multiple UX related modifactions #3869
|
248 |
* Fixed: strpos() debug error after 19 update #3878
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -26,4 +26,42 @@
|
|
26 |
}
|
27 |
});
|
28 |
});
|
29 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
});
|
28 |
});
|
29 |
+
})();
|
30 |
+
|
31 |
+
jQuery(document).ready(function($) {
|
32 |
+
$("#meta-checkbox").click(function(){
|
33 |
+
ampforwp_check_custom_content_status($(this));
|
34 |
+
});
|
35 |
+
ampforwp_check_custom_content_status($("#meta-checkbox"));
|
36 |
+
function ampforwp_check_custom_content_status(checker){
|
37 |
+
if (checker.prop('checked')==true){
|
38 |
+
// var onload_content = tinymce.get('ampforwp_custom_content_editor').getContent();
|
39 |
+
$('.amp-editor-content').show();
|
40 |
+
var content = document.getElementById('ampforwp_custom_content_editor').value;
|
41 |
+
if(content !== ''){
|
42 |
+
$('.amp-editor-content').hide();
|
43 |
+
}
|
44 |
+
}
|
45 |
+
else{
|
46 |
+
$('.amp-editor-content').hide();
|
47 |
+
}
|
48 |
+
}
|
49 |
+
tinymce.get('ampforwp_custom_content_editor').on("keyup change paste",function(){
|
50 |
+
var thisval = tinymce.get('ampforwp_custom_content_editor').getContent();
|
51 |
+
if(thisval!=""){
|
52 |
+
$('.amp-editor-content').hide();
|
53 |
+
}else{
|
54 |
+
$('.amp-editor-content').show();
|
55 |
+
}
|
56 |
+
if($("#meta-checkbox").prop('checked')==false){
|
57 |
+
$('.amp-editor-content').show();
|
58 |
+
$("#ampforwp-amp-content-error-msg").html('Please select the "<b>Use This Content as AMP Content</b>" checkbox above before update.');
|
59 |
+
if(thisval==""){
|
60 |
+
$('.amp-editor-content').hide();
|
61 |
+
$("#ampforwp-amp-content-error-msg").html("AMP contents is blank, Please enter content");
|
62 |
+
}
|
63 |
+
}else{
|
64 |
+
$("#ampforwp-amp-content-error-msg").html("AMP contents is blank, Please enter content");
|
65 |
+
}
|
66 |
+
});
|
67 |
+
});
|
@@ -148,7 +148,7 @@ function amp_content_editor_title_callback( $post ) {
|
|
148 |
<?php esc_attr_e( 'Use This Content as AMP Content','accelerated-mobile-pages' )?> </p>
|
149 |
<p><?php esc_attr_e('If you want to add some special tags, then please use normal HTML into this area, it will automatically convert them into AMP compatible tags.','accelerated-mobile-pages') ?></p>
|
150 |
</label>
|
151 |
-
|
152 |
<!--HTML content Ends here-->
|
153 |
<?php
|
154 |
$content = get_post_meta ( $amp_current_post_id, 'ampforwp_custom_content_editor', true );
|
148 |
<?php esc_attr_e( 'Use This Content as AMP Content','accelerated-mobile-pages' )?> </p>
|
149 |
<p><?php esc_attr_e('If you want to add some special tags, then please use normal HTML into this area, it will automatically convert them into AMP compatible tags.','accelerated-mobile-pages') ?></p>
|
150 |
</label>
|
151 |
+
<div class="amp-editor-content" id="amp-editor-checker" style="background: #FFF59D;padding: 8px 14px;width:96%;margin-bottom:12px;"><b>Note: </b> <span id="ampforwp-amp-content-error-msg">AMP contents is blank, Please enter content</span></div>
|
152 |
<!--HTML content Ends here-->
|
153 |
<?php
|
154 |
$content = get_post_meta ( $amp_current_post_id, 'ampforwp_custom_content_editor', true );
|
@@ -140,10 +140,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
140 |
$cat_link = ampforwp_url_controller( $cat_link );
|
141 |
}
|
142 |
$cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
|
|
|
143 |
if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
|
144 |
$cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
|
145 |
}
|
146 |
-
}
|
147 |
}
|
148 |
}
|
149 |
/*Breadcrumb with tags End*/
|
140 |
$cat_link = ampforwp_url_controller( $cat_link );
|
141 |
}
|
142 |
$cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
|
143 |
+
}
|
144 |
if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
|
145 |
$cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
|
146 |
}
|
|
|
147 |
}
|
148 |
}
|
149 |
/*Breadcrumb with tags End*/
|
@@ -25,7 +25,12 @@ if( $current_post_type = get_post_type( $post )) {
|
|
25 |
'order' => 'DESC',
|
26 |
'orderby' => $orderby,
|
27 |
'post_type' => $current_post_type,
|
28 |
-
'post__not_in' => array( $post->ID )
|
|
|
|
|
|
|
|
|
|
|
29 |
);
|
30 |
}
|
31 |
}//end of block for custom Post types
|
@@ -42,7 +47,12 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2) {
|
|
42 |
'ignore_sticky_posts'=> 1,
|
43 |
'has_password' => false ,
|
44 |
'post_status' => 'publish',
|
45 |
-
'orderby' => $orderby
|
|
|
|
|
|
|
|
|
|
|
46 |
);
|
47 |
}
|
48 |
} //end of block for categories
|
@@ -61,7 +71,12 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
|
61 |
'has_password' => false ,
|
62 |
'post_status' => 'publish',
|
63 |
'orderby' => $orderby,
|
64 |
-
'no_found_rows' => true
|
|
|
|
|
|
|
|
|
|
|
65 |
);
|
66 |
}
|
67 |
}//end of block for tags
|
25 |
'order' => 'DESC',
|
26 |
'orderby' => $orderby,
|
27 |
'post_type' => $current_post_type,
|
28 |
+
'post__not_in' => array( $post->ID ),
|
29 |
+
'meta_query' => array(
|
30 |
+
array(
|
31 |
+
'key' => 'ampforwp-amp-on-off',
|
32 |
+
'value' => 'default',
|
33 |
+
))
|
34 |
);
|
35 |
}
|
36 |
}//end of block for custom Post types
|
47 |
'ignore_sticky_posts'=> 1,
|
48 |
'has_password' => false ,
|
49 |
'post_status' => 'publish',
|
50 |
+
'orderby' => $orderby,
|
51 |
+
'meta_query' => array(
|
52 |
+
array(
|
53 |
+
'key' => 'ampforwp-amp-on-off',
|
54 |
+
'value' => 'default',
|
55 |
+
))
|
56 |
);
|
57 |
}
|
58 |
} //end of block for categories
|
71 |
'has_password' => false ,
|
72 |
'post_status' => 'publish',
|
73 |
'orderby' => $orderby,
|
74 |
+
'no_found_rows' => true,
|
75 |
+
'meta_query' => array(
|
76 |
+
array(
|
77 |
+
'key' => 'ampforwp-amp-on-off',
|
78 |
+
'value' => 'default',
|
79 |
+
))
|
80 |
);
|
81 |
}
|
82 |
}//end of block for tags
|
@@ -103,6 +103,7 @@ if(empty($cross_btn_hvr_clr)){
|
|
103 |
.aligncenter{ display: block; margin-left: auto; margin-right: auto; max-width: 100% }
|
104 |
.amp-wp-enforced-sizes{ max-width: 100%; margin: 0 auto; }
|
105 |
.amp-wp-unknown-size img{ object-fit: contain; }
|
|
|
106 |
amp-iframe{ max-width: 100%; margin-bottom : 20px; }
|
107 |
amp-wistia-player {margin:5px 0px;}
|
108 |
.hide{display:none}
|
103 |
.aligncenter{ display: block; margin-left: auto; margin-right: auto; max-width: 100% }
|
104 |
.amp-wp-enforced-sizes{ max-width: 100%; margin: 0 auto; }
|
105 |
.amp-wp-unknown-size img{ object-fit: contain; }
|
106 |
+
amp-img.amp-wp-enforced-sizes[layout=intrinsic] > img, .amp-wp-unknown-size > img { object-fit: contain; }
|
107 |
amp-iframe{ max-width: 100%; margin-bottom : 20px; }
|
108 |
amp-wistia-player {margin:5px 0px;}
|
109 |
.hide{display:none}
|
@@ -138,10 +138,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
138 |
$cat_link = ampforwp_url_controller( $cat_link );
|
139 |
}
|
140 |
$cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
|
|
|
141 |
if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
|
142 |
$cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
|
143 |
}
|
144 |
-
}
|
145 |
}
|
146 |
}
|
147 |
/*Breadcrumb with tags End*/
|
138 |
$cat_link = ampforwp_url_controller( $cat_link );
|
139 |
}
|
140 |
$cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
|
141 |
+
}
|
142 |
if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
|
143 |
$cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
|
144 |
}
|
|
|
145 |
}
|
146 |
}
|
147 |
/*Breadcrumb with tags End*/
|
@@ -25,7 +25,12 @@ if( $current_post_type = get_post_type( $post )) {
|
|
25 |
'order' => 'DESC',
|
26 |
'orderby' => $orderby,
|
27 |
'post_type' => $current_post_type,
|
28 |
-
'post__not_in' => array( $post->ID )
|
|
|
|
|
|
|
|
|
|
|
29 |
);
|
30 |
}
|
31 |
}//end of block for custom Post types
|
@@ -42,7 +47,12 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
|
|
42 |
'ignore_sticky_posts'=> 1,
|
43 |
'has_password' => false ,
|
44 |
'post_status' => 'publish',
|
45 |
-
'orderby' => $orderby
|
|
|
|
|
|
|
|
|
|
|
46 |
);
|
47 |
}
|
48 |
} //end of block for categories
|
@@ -60,7 +70,12 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
|
60 |
'has_password' => false ,
|
61 |
'post_status' => 'publish',
|
62 |
'orderby' => $orderby,
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
64 |
);
|
65 |
}
|
66 |
}//end of block for tags
|
25 |
'order' => 'DESC',
|
26 |
'orderby' => $orderby,
|
27 |
'post_type' => $current_post_type,
|
28 |
+
'post__not_in' => array( $post->ID ),
|
29 |
+
'meta_query' => array(
|
30 |
+
array(
|
31 |
+
'key' => 'ampforwp-amp-on-off',
|
32 |
+
'value' => 'default',
|
33 |
+
))
|
34 |
);
|
35 |
}
|
36 |
}//end of block for custom Post types
|
47 |
'ignore_sticky_posts'=> 1,
|
48 |
'has_password' => false ,
|
49 |
'post_status' => 'publish',
|
50 |
+
'orderby' => $orderby,
|
51 |
+
'meta_query' => array(
|
52 |
+
array(
|
53 |
+
'key' => 'ampforwp-amp-on-off',
|
54 |
+
'value' => 'default',
|
55 |
+
))
|
56 |
);
|
57 |
}
|
58 |
} //end of block for categories
|
70 |
'has_password' => false ,
|
71 |
'post_status' => 'publish',
|
72 |
'orderby' => $orderby,
|
73 |
+
'no_found_rows' => true,
|
74 |
+
'meta_query' => array(
|
75 |
+
array(
|
76 |
+
'key' => 'ampforwp-amp-on-off',
|
77 |
+
'value' => 'default',
|
78 |
+
))
|
79 |
);
|
80 |
}
|
81 |
}//end of block for tags
|
@@ -138,10 +138,10 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
138 |
$cat_link = ampforwp_url_controller( $cat_link );
|
139 |
}
|
140 |
$cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
|
|
|
141 |
if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
|
142 |
$cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
|
143 |
}
|
144 |
-
}
|
145 |
}
|
146 |
}
|
147 |
/*Breadcrumb with tags End*/
|
138 |
$cat_link = ampforwp_url_controller( $cat_link );
|
139 |
}
|
140 |
$cat_display .= '<li class="item-cat item-cat-' . $cat_id . '"><a class="bread-cat bread-cat-' . $cat_id . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="'.esc_attr($parents).'">'.esc_html($parents).'</a></li>';
|
141 |
+
}
|
142 |
if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
|
143 |
$cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
|
144 |
}
|
|
|
145 |
}
|
146 |
}
|
147 |
/*Breadcrumb with tags End*/
|
@@ -25,7 +25,12 @@ if( $current_post_type = get_post_type( $post )) {
|
|
25 |
'order' => 'DESC',
|
26 |
'orderby' => $orderby,
|
27 |
'post_type' => $current_post_type,
|
28 |
-
'post__not_in' => array( $post->ID )
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
);
|
31 |
}
|
@@ -44,6 +49,11 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
|
|
44 |
'has_password' => false ,
|
45 |
'post_status' => 'publish',
|
46 |
'orderby' => $orderby,
|
|
|
|
|
|
|
|
|
|
|
47 |
);
|
48 |
}
|
49 |
} //end of block for categories
|
@@ -62,6 +72,11 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
|
|
62 |
'post_status' => 'publish',
|
63 |
'no_found_rows' => true,
|
64 |
'orderby' => $orderby,
|
|
|
|
|
|
|
|
|
|
|
65 |
);
|
66 |
}
|
67 |
}//end of block for tags
|
25 |
'order' => 'DESC',
|
26 |
'orderby' => $orderby,
|
27 |
'post_type' => $current_post_type,
|
28 |
+
'post__not_in' => array( $post->ID ),
|
29 |
+
'meta_query' => array(
|
30 |
+
array(
|
31 |
+
'key' => 'ampforwp-amp-on-off',
|
32 |
+
'value' => 'default',
|
33 |
+
))
|
34 |
|
35 |
);
|
36 |
}
|
49 |
'has_password' => false ,
|
50 |
'post_status' => 'publish',
|
51 |
'orderby' => $orderby,
|
52 |
+
'meta_query' => array(
|
53 |
+
array(
|
54 |
+
'key' => 'ampforwp-amp-on-off',
|
55 |
+
'value' => 'default',
|
56 |
+
))
|
57 |
);
|
58 |
}
|
59 |
} //end of block for categories
|
72 |
'post_status' => 'publish',
|
73 |
'no_found_rows' => true,
|
74 |
'orderby' => $orderby,
|
75 |
+
'meta_query' => array(
|
76 |
+
array(
|
77 |
+
'key' => 'ampforwp-amp-on-off',
|
78 |
+
'value' => 'default',
|
79 |
+
))
|
80 |
);
|
81 |
}
|
82 |
}//end of block for tags
|
@@ -879,7 +879,6 @@ if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampfor
|
|
879 |
// Infinate Scroll Home & Archive page CSS
|
880 |
if( true == ampforwp_get_setting('ampforwp-infinite-scroll') && ampforwp_get_setting('ampforwp-infinite-scroll-home') ){?>
|
881 |
.amp_home_body .amp-next-page-default-separator {border:none;}
|
882 |
-
#headerwrap{position:relative;}
|
883 |
header{padding:0;}
|
884 |
<?php }
|
885 |
// image floats removed in mobile view #2525
|
879 |
// Infinate Scroll Home & Archive page CSS
|
880 |
if( true == ampforwp_get_setting('ampforwp-infinite-scroll') && ampforwp_get_setting('ampforwp-infinite-scroll-home') ){?>
|
881 |
.amp_home_body .amp-next-page-default-separator {border:none;}
|
|
|
882 |
header{padding:0;}
|
883 |
<?php }
|
884 |
// image floats removed in mobile view #2525
|
@@ -68,6 +68,7 @@ blockquote{ background: #f1f1f1; margin: 10px 0 20px 0; padding: 15px;}
|
|
68 |
blockquote p:last-child {margin-bottom: 0;}
|
69 |
.amp-wp-unknown-size img {object-fit: contain;}
|
70 |
.amp-wp-enforced-sizes{ max-width: 100% }
|
|
|
71 |
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}table{border-collapse:collapse;border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}input,select{vertical-align:middle}
|
72 |
*,*:after,*:before {
|
73 |
box-sizing: border-box;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;}
|
@@ -1319,11 +1320,11 @@ if ( ampforwp_get_setting('gbl-sidebar') && ampforwp_get_setting('gnrl-sidebar')
|
|
1319 |
}
|
1320 |
}
|
1321 |
<?php }
|
1322 |
-
if ( ( true == ampforwp_get_setting('gbl-sidebar') && (ampforwp_is_front_page() || ampforwp_is_home()
|
1323 |
-
// AMP woocommerce condition starts
|
1324 |
-
if( !ampforwp_woocommerce_conditional_check() ) { ?>
|
1325 |
/*** Sidebar CSS ***/
|
1326 |
-
<?php if ( is_active_sidebar( 'swift-sidebar' ) ) : ?>
|
1327 |
.sdbr-right{
|
1328 |
<?php if( isset($redux_builder_amp['sidebar-bgcolor']['rgba']) && $redux_builder_amp['sidebar-bgcolor']['rgba'] ) {?>
|
1329 |
background:<?php echo ampforwp_sanitize_color($redux_builder_amp['sidebar-bgcolor']['rgba'])?>;
|
68 |
blockquote p:last-child {margin-bottom: 0;}
|
69 |
.amp-wp-unknown-size img {object-fit: contain;}
|
70 |
.amp-wp-enforced-sizes{ max-width: 100% }
|
71 |
+
amp-img.amp-wp-enforced-sizes[layout=intrinsic] > img, .amp-wp-unknown-size > img { object-fit: contain; }
|
72 |
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}table{border-collapse:collapse;border-spacing:0}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}input,select{vertical-align:middle}
|
73 |
*,*:after,*:before {
|
74 |
box-sizing: border-box;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;-ms-box-sizing: border-box;-o-box-sizing: border-box;}
|
1320 |
}
|
1321 |
}
|
1322 |
<?php }
|
1323 |
+
if ( ( true == ampforwp_get_setting('gbl-sidebar') && ( ampforwp_is_front_page() || ampforwp_is_home() || is_archive() || is_search() || ampforwp_is_blog() ) ) || ( true == ampforwp_get_setting('swift-sidebar') || true == ampforwp_get_setting('page_sidebar') && is_singular() ) || ( (function_exists('is_woocommerce') && is_woocommerce()) && function_exists('ampwcpro_layout_selector') && ampwcpro_layout_selector() == 'v3layout' ) ) { ?>
|
1324 |
+
<?php // AMP woocommerce condition starts
|
1325 |
+
if( !ampforwp_woocommerce_conditional_check() || (function_exists('is_woocommerce') && is_woocommerce() ) ){ ?>
|
1326 |
/*** Sidebar CSS ***/
|
1327 |
+
<?php if ( is_active_sidebar( 'swift-sidebar' ) || is_active_sidebar( 'amp-shop-sidebar' ) || is_active_sidebar( 'amp-product-sidebar' ) ) : ?>
|
1328 |
.sdbr-right{
|
1329 |
<?php if( isset($redux_builder_amp['sidebar-bgcolor']['rgba']) && $redux_builder_amp['sidebar-bgcolor']['rgba'] ) {?>
|
1330 |
background:<?php echo ampforwp_sanitize_color($redux_builder_amp['sidebar-bgcolor']['rgba'])?>;
|
@@ -7339,4 +7339,24 @@ if ( ! function_exists('ampforwp_font_url') ) {
|
|
7339 |
function ampforwp_font_url($font_url){
|
7340 |
return apply_filters('ampforwp_font_url', $font_url);
|
7341 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7342 |
}
|
7339 |
function ampforwp_font_url($font_url){
|
7340 |
return apply_filters('ampforwp_font_url', $font_url);
|
7341 |
}
|
7342 |
+
}
|
7343 |
+
//Need to add full short pixel plugin compatibility #3782
|
7344 |
+
if(function_exists('shortPixelDebugErrorHandler')){
|
7345 |
+
add_filter( 'ampforwp_the_content_last_filter','ampforwp_short_pixel_cdn');
|
7346 |
+
}
|
7347 |
+
function ampforwp_short_pixel_cdn($content){
|
7348 |
+
$api_url = get_option('spai_settings_api_url');
|
7349 |
+
$compress_level = get_option('spai_settings_compress_level');
|
7350 |
+
if('0'== $compress_level){
|
7351 |
+
$compress_level = '+q_lossless';
|
7352 |
+
}
|
7353 |
+
if('1'== $compress_level){
|
7354 |
+
$compress_level = '+q_lossy';
|
7355 |
+
}
|
7356 |
+
if('2'== $compress_level){
|
7357 |
+
$compress_level = '+q_glossy';
|
7358 |
+
}
|
7359 |
+
$compress_level .= '+ret_img+to_webp/';
|
7360 |
+
$content = preg_replace('/<amp-img(.*?)src="(.*?)" width="(.*?)" height="(.*?)"(.*?)srcset="(.*?)"(.*?)<\/amp-img>/', '<amp-img$1 src="'.$api_url.'/w_$3'.$compress_level.'$2"width="$3"height="$4"$7</amp-img>', $content);
|
7361 |
+
return $content;
|
7362 |
}
|