Version Description
(29th January 2020) = * Improvement: EWWW Image Optimizer plugin Compatibility #3984 * Fixed: WP Admin toolbar CSS is not loading when user is logged in #4076 * Fixed: AMP Options panel UI improvements done. #4088 * Fixed: video is not displaying in AMP when a video is inserted from gutenberg video module #4086 * Fixed: Performance section all features not working when Ezoic integration plugin is active. #4092 * Fixed: Playbuzz is not working #4085 * Fixed: RECENT POSTS label visible if no posts are available #4011 * Fixed: data-block-on-consent is missing for Vuukle comments when gdpr is enabled #4095 * Fixed: Remove Purge AMP CDN cache Settings buuton: #4099 * Fixed: When categories that we exclude from AMP through the plugin configuration present redirection problem along with mobile redirection option #4075 * Fixed: Alignment issue in GDPR Privacy link. #4101
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.19 |
Comparing to | |
See all releases |
Code changes from version 1.0.18 to 1.0.19
- README.md +14 -18
- accelerated-moblie-pages.php +2 -2
- changelog.txt +13 -0
- components/comments/comments.php +5 -2
- components/gdpr/gdpr.php +1 -1
- includes/admin-script.js +23 -5
- includes/features/performance/performance-functions.php +4 -1
- includes/options/admin-config.php +0 -1
- includes/options/redux-core/templates/panel/menu_container.tpl.php +2 -2
- includes/redirect.php +3 -0
- includes/vendor/amp/includes/sanitizers/class-amp-video-sanitizer.php +1 -0
- includes/vendor/css-parser/parser-helper-function.php +3 -0
- readme.txt +14 -18
- templates/design-manager/swift/single.php +10 -2
- templates/features.php +20 -23
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3.2
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -194,6 +194,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
= 1.0.18 (27th January 2020) =
|
198 |
* Fixed: Debug warnings with Imagify plugin #3908
|
199 |
|
@@ -222,21 +235,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
222 |
* Fixed: When AMP is disabled on pages,give an option of hide/unhide AMP on Blog page when in edit mode. #4066
|
223 |
* Fixed: The tag 'template' requires including the 'amp-mustache' extension JavaScript. #4079
|
224 |
|
225 |
-
= 1.0.15 (17th January 2020) =
|
226 |
-
* Fixed: Sticky Social icons's css not loading correctly on some pages #3980
|
227 |
-
* Fixed: Need to add option to hide "AMP version" in view source page(generator). #4000
|
228 |
-
* Fixed: Caption of image gallery not displaying #3993
|
229 |
-
* Fixed: Need to connect retina image functionality to In-content Related post thumbnails. #4007
|
230 |
-
* Fixed: easytoc-icon.png #4041
|
231 |
-
* Fixed: AMP links Error. #4016
|
232 |
-
* Fixed: Image alignment and Name is not showing AMP #4038
|
233 |
-
* Fixed: Need to sanitize amp-mowplayer tag when added in the content. #4044
|
234 |
-
* Fixed: Set the priority to high of the icomoon CSS to override every other CSS,in AMP page builder. #4035
|
235 |
-
* Fixed: when row Wrapper is set to 100%,static css of max width 90% is getting applied from tablet view mode to below #3999
|
236 |
-
* Fixed: Code improvement in Detect Component and add or remove script accordingly #4067
|
237 |
-
|
238 |
-
= 1.0.14 (14th January 2020) =
|
239 |
-
* Fixed: Warning in accelerated-mobile-pages/includes/options/admin-config.php on line 1250 #4027
|
240 |
-
* Fixed: Code improvement in Detect Component and add or remove script accordingly #4067
|
241 |
-
|
242 |
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.2
|
7 |
+
Stable tag: 1.0.19
|
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.19 (29th January 2020) =
|
198 |
+
* Improvement: EWWW Image Optimizer plugin Compatibility #3984
|
199 |
+
* Fixed: WP Admin toolbar CSS is not loading when user is logged in #4076
|
200 |
+
* Fixed: AMP Options panel UI improvements done. #4088
|
201 |
+
* Fixed: video is not displaying in AMP when a video is inserted from gutenberg video module #4086
|
202 |
+
* Fixed: Performance section all features not working when Ezoic integration plugin is active. #4092
|
203 |
+
* Fixed: Playbuzz is not working #4085
|
204 |
+
* Fixed: RECENT POSTS label visible if no posts are available #4011
|
205 |
+
* Fixed: data-block-on-consent is missing for Vuukle comments when gdpr is enabled #4095
|
206 |
+
* Fixed: Remove Purge AMP CDN cache Settings buuton: #4099
|
207 |
+
* Fixed: When categories that we exclude from AMP through the plugin configuration present redirection problem along with mobile redirection option #4075
|
208 |
+
* Fixed: Alignment issue in GDPR Privacy link. #4101
|
209 |
+
|
210 |
= 1.0.18 (27th January 2020) =
|
211 |
* Fixed: Debug warnings with Imagify plugin #3908
|
212 |
|
235 |
* Fixed: When AMP is disabled on pages,give an option of hide/unhide AMP on Blog page when in edit mode. #4066
|
236 |
* Fixed: The tag 'template' requires including the 'amp-mustache' extension JavaScript. #4079
|
237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
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.19
|
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.19');
|
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,18 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.18 (27th January 2020) =
|
4 |
* Fixed: Debug warnings with Imagify plugin #3908
|
5 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.19 (29th January 2020) =
|
4 |
+
* Improvement: EWWW Image Optimizer plugin Compatibility #3984
|
5 |
+
* Fixed: WP Admin toolbar CSS is not loading when user is logged in #4076
|
6 |
+
* Fixed: AMP Options panel UI improvements done. #4088
|
7 |
+
* Fixed: video is not displaying in AMP when a video is inserted from gutenberg video module #4086
|
8 |
+
* Fixed: Performance section all features not working when Ezoic integration plugin is active. #4092
|
9 |
+
* Fixed: Playbuzz is not working #4085
|
10 |
+
* Fixed: RECENT POSTS label visible if no posts are available #4011
|
11 |
+
* Fixed: data-block-on-consent is missing for Vuukle comments when gdpr is enabled #4095
|
12 |
+
* Fixed: Remove Purge AMP CDN cache Settings buuton: #4099
|
13 |
+
* Fixed: When categories that we exclude from AMP through the plugin configuration present redirection problem along with mobile redirection option #4075
|
14 |
+
* Fixed: Alignment issue in GDPR Privacy link. #4101
|
15 |
+
|
16 |
= 1.0.18 (27th January 2020) =
|
17 |
* Fixed: Debug warnings with Imagify plugin #3908
|
18 |
|
@@ -225,8 +225,11 @@ function ampforwp_framework_get_vuukle_comments(){
|
|
225 |
$srcUrl = add_query_arg('title' , urlencode($post->post_title), $srcUrl);
|
226 |
$srcUrl = add_query_arg('img' , esc_url($img), $srcUrl);
|
227 |
$srcUrl = add_query_arg('tags' , urlencode($tag_name), $srcUrl);
|
228 |
-
|
229 |
-
|
|
|
|
|
|
|
230 |
|
231 |
<div overflow tabindex="0" role="button" aria-label="Show comments">'.esc_html__('Show comments','accelerated-mobile-pages').'</div></amp-iframe>';
|
232 |
echo $vuukle_html; // escaped above
|
225 |
$srcUrl = add_query_arg('title' , urlencode($post->post_title), $srcUrl);
|
226 |
$srcUrl = add_query_arg('img' , esc_url($img), $srcUrl);
|
227 |
$srcUrl = add_query_arg('tags' , urlencode($tag_name), $srcUrl);
|
228 |
+
$consent = '';
|
229 |
+
if(ampforwp_get_data_consent()){
|
230 |
+
$consent = 'data-block-on-consent ';
|
231 |
+
}
|
232 |
+
$vuukle_html = '<amp-iframe width="600" height="350" '.esc_attr($consent).'layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
|
233 |
|
234 |
<div overflow tabindex="0" role="button" aria-label="Show comments">'.esc_html__('Show comments','accelerated-mobile-pages').'</div></amp-iframe>';
|
235 |
echo $vuukle_html; // escaped above
|
@@ -182,7 +182,7 @@ function ampforwp_gdpr_css(){
|
|
182 |
.gdpr_yn form{display: inline;}
|
183 |
.gdpr_yn button{background: #FFFC26;border: none;color: #333;padding: 8px 40px;font-size: 15px;margin: 0 3px;font-weight: 600;cursor: pointer;}
|
184 |
.gdpr_yn .gdpr_n{background: transparent;}
|
185 |
-
amp-consent{margin-left: 10px;top: 2px;width: auto;background: transparent;margin:0;width:100%;}
|
186 |
.gdpr_fmi span, .gdpr_fmi a:before{
|
187 |
display:none;
|
188 |
}
|
182 |
.gdpr_yn form{display: inline;}
|
183 |
.gdpr_yn button{background: #FFFC26;border: none;color: #333;padding: 8px 40px;font-size: 15px;margin: 0 3px;font-weight: 600;cursor: pointer;}
|
184 |
.gdpr_yn .gdpr_n{background: transparent;}
|
185 |
+
amp-consent{position: relative;margin-left: 10px;top: 2px;width: auto;background: transparent;margin:0;width:100%;}
|
186 |
.gdpr_fmi span, .gdpr_fmi a:before{
|
187 |
display:none;
|
188 |
}
|
@@ -972,7 +972,9 @@ jQuery(document).ready(function($) {
|
|
972 |
// Save
|
973 |
window.onbeforeunload = null;
|
974 |
if ( redux.args.ajax_save === true ) {
|
975 |
-
|
|
|
|
|
976 |
}
|
977 |
|
978 |
}
|
@@ -2103,12 +2105,12 @@ function Drawer(drawerElem) {
|
|
2103 |
'<p class="mb-msg">What view would you prefer?</p>'+
|
2104 |
'<div class="e-f-btns">'+
|
2105 |
'<div class="option-button b1 amp-opt-view" id="amp-opt-easy-view">'+
|
2106 |
-
'<h2>
|
2107 |
'<div class="e-img"></div>'+
|
2108 |
'<p>For Beginers</p>'+
|
2109 |
'</div>'+
|
2110 |
'<div class="option-button b2 amp-opt-view" id="amp-opt-full-view">'+
|
2111 |
-
'<h2>
|
2112 |
'<div class="f-img"></div>'+
|
2113 |
'<p>For Experts</p>'+
|
2114 |
'</div>'+
|
@@ -2204,15 +2206,31 @@ function Drawer(drawerElem) {
|
|
2204 |
amp_options_hide_show(thisid);
|
2205 |
});
|
2206 |
$('.ux-setup-icon').on('mouseover', function (event) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2207 |
if($(this).hasClass('amp-ux-warning-okay')){
|
2208 |
-
$(".setup-tt").html("Your setup is now completed.
|
2209 |
}else{
|
2210 |
-
$(".setup-tt").html(
|
2211 |
}
|
2212 |
$('.ampforwp-setup-not-tt').css({'visibility':'visible'});
|
2213 |
}).on('mouseout', function (event) {
|
2214 |
$('.ampforwp-setup-not-tt').css({'visibility':'hidden'});
|
2215 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2216 |
/* Hamburger Library */
|
2217 |
function DrawerIcon(icon) {
|
2218 |
"use strict";
|
972 |
// Save
|
973 |
window.onbeforeunload = null;
|
974 |
if ( redux.args.ajax_save === true ) {
|
975 |
+
setTimeout(function(){
|
976 |
+
$.redux.ajax_save( $current, true );
|
977 |
+
},1);
|
978 |
}
|
979 |
|
980 |
}
|
2105 |
'<p class="mb-msg">What view would you prefer?</p>'+
|
2106 |
'<div class="e-f-btns">'+
|
2107 |
'<div class="option-button b1 amp-opt-view" id="amp-opt-easy-view">'+
|
2108 |
+
'<h2>Basic</h2>'+
|
2109 |
'<div class="e-img"></div>'+
|
2110 |
'<p>For Beginers</p>'+
|
2111 |
'</div>'+
|
2112 |
'<div class="option-button b2 amp-opt-view" id="amp-opt-full-view">'+
|
2113 |
+
'<h2>Advance</h2>'+
|
2114 |
'<div class="f-img"></div>'+
|
2115 |
'<p>For Experts</p>'+
|
2116 |
'</div>'+
|
2206 |
amp_options_hide_show(thisid);
|
2207 |
});
|
2208 |
$('.ux-setup-icon').on('mouseover', function (event) {
|
2209 |
+
var amp_setup_pending_string = '';
|
2210 |
+
$(".amp-ux-valid-require").each(function(){
|
2211 |
+
if($(this).children().hasClass('btn-red')){
|
2212 |
+
amp_setup_pending_string += $(this).parent('.amp-ux-elem-field').children('.amp-ux-elem-title').html()+", ";
|
2213 |
+
}
|
2214 |
+
});
|
2215 |
+
amp_setup_pending_string = amp_setup_pending_string.replace(/,\s*$/, "");
|
2216 |
if($(this).hasClass('amp-ux-warning-okay')){
|
2217 |
+
$(".setup-tt").html("Your setup is now completed.");
|
2218 |
}else{
|
2219 |
+
$(".setup-tt").html('Your setup is not completed.<br/>Please setup <i>"'+amp_setup_pending_string+'"</i> section for better AMP Experience.');
|
2220 |
}
|
2221 |
$('.ampforwp-setup-not-tt').css({'visibility':'visible'});
|
2222 |
}).on('mouseout', function (event) {
|
2223 |
$('.ampforwp-setup-not-tt').css({'visibility':'hidden'});
|
2224 |
});
|
2225 |
+
$('.ux-setup-icon').on('click', function(){
|
2226 |
+
$(".amp-ux-valid-require").each(function(){
|
2227 |
+
if($(this).children().hasClass('btn-red')){
|
2228 |
+
$(this).parent('.amp-ux-elem-field').parent('.amp-ux-section-field').css({'box-shadow': '0px 0px 5px black','padding-left': '15px','padding-right': '15px'});
|
2229 |
+
|
2230 |
+
}
|
2231 |
+
});
|
2232 |
+
setTimeout(function(){ $(".amp-ux-valid-require").parent('.amp-ux-elem-field').parent('.amp-ux-section-field').removeAttr('style'); }, 500);
|
2233 |
+
});
|
2234 |
/* Hamburger Library */
|
2235 |
function DrawerIcon(icon) {
|
2236 |
"use strict";
|
@@ -15,7 +15,7 @@ function ampforwp_minify_html_output($content_buffer){
|
|
15 |
if(preg_match('/<script type="text\/javascript">.*?NREUM.*?;<\/script>/s', $content_buffer)!=0){
|
16 |
$content_buffer = preg_replace('/<script type="text\/javascript">.*?NREUM.*?;<\/script>/s', '', $content_buffer);
|
17 |
}
|
18 |
-
|
19 |
if (defined('W3TC') && strpos($content_buffer, 'frameborder') !== false) {
|
20 |
add_filter("w3tc_minify_html_enable",'__return_false');
|
21 |
}
|
@@ -356,6 +356,9 @@ if( !function_exists("ampforwp_clear_tree_shaking_post") ) {
|
|
356 |
}else{
|
357 |
$transient_filename = "post-".ampforwp_get_the_ID();
|
358 |
}
|
|
|
|
|
|
|
359 |
$upload_dir = wp_upload_dir();
|
360 |
$ts_file = $upload_dir['basedir'] . '/' . 'ampforwp-tree-shaking/_transient_'.esc_attr($transient_filename).".css";
|
361 |
if(file_exists($ts_file) && is_file($ts_file)){
|
15 |
if(preg_match('/<script type="text\/javascript">.*?NREUM.*?;<\/script>/s', $content_buffer)!=0){
|
16 |
$content_buffer = preg_replace('/<script type="text\/javascript">.*?NREUM.*?;<\/script>/s', '', $content_buffer);
|
17 |
}
|
18 |
+
$content_buffer = preg_replace('/<div(.*?)class="playbuzz"(.*?)data-id="(.*?)"(.*?)><\/div>/', '<amp-playbuzz data-item="$3" height="1000"></amp-playbuzz>', $content_buffer);
|
19 |
if (defined('W3TC') && strpos($content_buffer, 'frameborder') !== false) {
|
20 |
add_filter("w3tc_minify_html_enable",'__return_false');
|
21 |
}
|
356 |
}else{
|
357 |
$transient_filename = "post-".ampforwp_get_the_ID();
|
358 |
}
|
359 |
+
if( is_user_logged_in() ){
|
360 |
+
$transient_filename = $transient_filename.'-admin';
|
361 |
+
}
|
362 |
$upload_dir = wp_upload_dir();
|
363 |
$ts_file = $upload_dir['basedir'] . '/' . 'ampforwp-tree-shaking/_transient_'.esc_attr($transient_filename).".css";
|
364 |
if(file_exists($ts_file) && is_file($ts_file)){
|
@@ -480,7 +480,6 @@ $extension_listing_array = array(
|
|
480 |
'item_name'=>'Purge AMP CDN Cache',
|
481 |
'store_url'=>'https://accounts.ampforwp.com',
|
482 |
'is_activated'=>(is_plugin_active('purge-amp-cdn-cache/purge-amp-cdn-cache.php')? 1 : 2),
|
483 |
-
'settingUrl'=>admin_url( 'admin.php?page=update-amp-cache' ),
|
484 |
),
|
485 |
array(
|
486 |
'name'=>'Polylang For AMP',
|
480 |
'item_name'=>'Purge AMP CDN Cache',
|
481 |
'store_url'=>'https://accounts.ampforwp.com',
|
482 |
'is_activated'=>(is_plugin_active('purge-amp-cdn-cache/purge-amp-cdn-cache.php')? 1 : 2),
|
|
|
483 |
),
|
484 |
array(
|
485 |
'name'=>'Polylang For AMP',
|
@@ -82,11 +82,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
82 |
<div class="switch-ef-btns">
|
83 |
<div class="e-v <?php echo $opt_easy_active;?>">
|
84 |
<input class="amp-opt-change <?php echo esc_attr($opt_easy);?>" id="radio-c" type="radio" name="second-switch" <?php echo esc_attr($opt_easy_checked);?>>
|
85 |
-
<label for="radio-c">
|
86 |
</div>
|
87 |
<div class="f-v <?php echo $opt_full_active;?>">
|
88 |
<input class="amp-opt-change <?php echo esc_attr($opt_full);?>" id="radio-d" type="radio" name="second-switch" <?php echo esc_attr($opt_full_checked);?>>
|
89 |
-
<label for="radio-d">
|
90 |
<span class="toggle-inside"></span>
|
91 |
</div>
|
92 |
</div>
|
82 |
<div class="switch-ef-btns">
|
83 |
<div class="e-v <?php echo $opt_easy_active;?>">
|
84 |
<input class="amp-opt-change <?php echo esc_attr($opt_easy);?>" id="radio-c" type="radio" name="second-switch" <?php echo esc_attr($opt_easy_checked);?>>
|
85 |
+
<label for="radio-c">Basic Setup</label>
|
86 |
</div>
|
87 |
<div class="f-v <?php echo $opt_full_active;?>">
|
88 |
<input class="amp-opt-change <?php echo esc_attr($opt_full);?>" id="radio-d" type="radio" name="second-switch" <?php echo esc_attr($opt_full_checked);?>>
|
89 |
+
<label for="radio-d">Advance Setup</label><span class="toggle-outside">
|
90 |
<span class="toggle-inside"></span>
|
91 |
</div>
|
92 |
</div>
|
@@ -13,6 +13,9 @@ function ampforwp_redirection() {
|
|
13 |
if ( ( is_singular() || ampforwp_is_front_page() || ampforwp_is_blog() ) && 'hide-amp' == get_post_meta( ampforwp_get_the_ID(),'ampforwp-amp-on-off',true) ) {
|
14 |
return;
|
15 |
}
|
|
|
|
|
|
|
16 |
// Redirection for Homepage and Archive Pages when Turned Off from options panel
|
17 |
if ( ampforwp_is_amp_endpoint() ) {
|
18 |
if(is_tax()){
|
13 |
if ( ( is_singular() || ampforwp_is_front_page() || ampforwp_is_blog() ) && 'hide-amp' == get_post_meta( ampforwp_get_the_ID(),'ampforwp-amp-on-off',true) ) {
|
14 |
return;
|
15 |
}
|
16 |
+
if ( ampforwp_posts_to_remove() && is_object($post) && $post->post_type == 'post' ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
// Redirection for Homepage and Archive Pages when Turned Off from options panel
|
20 |
if ( ampforwp_is_amp_endpoint() ) {
|
21 |
if(is_tax()){
|
@@ -74,6 +74,7 @@ class AMP_Video_Sanitizer extends AMP_Base_Sanitizer {
|
|
74 |
foreach ( $attributes as $name => $value ) {
|
75 |
switch ( $name ) {
|
76 |
case 'src':
|
|
|
77 |
$out[ $name ] = $this->maybe_enforce_https_src( $value );
|
78 |
break;
|
79 |
|
74 |
foreach ( $attributes as $name => $value ) {
|
75 |
switch ( $name ) {
|
76 |
case 'src':
|
77 |
+
$value = str_replace('http://', '//', $value);
|
78 |
$out[ $name ] = $this->maybe_enforce_https_src( $value );
|
79 |
break;
|
80 |
|
@@ -15,6 +15,9 @@ class AMPFORWP_Tree_Shaking_Transient{
|
|
15 |
}elseif(!empty($post) && is_object($post)){
|
16 |
$transient = "post-".$post->ID;
|
17 |
}
|
|
|
|
|
|
|
18 |
return $transient;
|
19 |
}
|
20 |
public static function ampforwp_set_file_transient( $transient, $value, $expiration = 0 ) {
|
15 |
}elseif(!empty($post) && is_object($post)){
|
16 |
$transient = "post-".$post->ID;
|
17 |
}
|
18 |
+
if( is_user_logged_in() ){
|
19 |
+
$transient = $transient.'-admin';
|
20 |
+
}
|
21 |
return $transient;
|
22 |
}
|
23 |
public static function ampforwp_set_file_transient( $transient, $value, $expiration = 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.2
|
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,19 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 1.0.18 (27th January 2020) =
|
195 |
* Fixed: Debug warnings with Imagify plugin #3908
|
196 |
|
@@ -219,21 +232,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
219 |
* Fixed: When AMP is disabled on pages,give an option of hide/unhide AMP on Blog page when in edit mode. #4066
|
220 |
* Fixed: The tag 'template' requires including the 'amp-mustache' extension JavaScript. #4079
|
221 |
|
222 |
-
= 1.0.15 (17th January 2020) =
|
223 |
-
* Fixed: Sticky Social icons's css not loading correctly on some pages #3980
|
224 |
-
* Fixed: Need to add option to hide "AMP version" in view source page(generator). #4000
|
225 |
-
* Fixed: Caption of image gallery not displaying #3993
|
226 |
-
* Fixed: Need to connect retina image functionality to In-content Related post thumbnails. #4007
|
227 |
-
* Fixed: easytoc-icon.png #4041
|
228 |
-
* Fixed: AMP links Error. #4016
|
229 |
-
* Fixed: Image alignment and Name is not showing AMP #4038
|
230 |
-
* Fixed: Need to sanitize amp-mowplayer tag when added in the content. #4044
|
231 |
-
* Fixed: Set the priority to high of the icomoon CSS to override every other CSS,in AMP page builder. #4035
|
232 |
-
* Fixed: when row Wrapper is set to 100%,static css of max width 90% is getting applied from tablet view mode to below #3999
|
233 |
-
* Fixed: Code improvement in Detect Component and add or remove script accordingly #4067
|
234 |
-
|
235 |
-
= 1.0.14 (14th January 2020) =
|
236 |
-
* Fixed: Warning in accelerated-mobile-pages/includes/options/admin-config.php on line 1250 #4027
|
237 |
-
* Fixed: Code improvement in Detect Component and add or remove script accordingly #4067
|
238 |
-
|
239 |
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.2
|
7 |
+
Stable tag: 1.0.19
|
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.19 (29th January 2020) =
|
195 |
+
* Improvement: EWWW Image Optimizer plugin Compatibility #3984
|
196 |
+
* Fixed: WP Admin toolbar CSS is not loading when user is logged in #4076
|
197 |
+
* Fixed: AMP Options panel UI improvements done. #4088
|
198 |
+
* Fixed: video is not displaying in AMP when a video is inserted from gutenberg video module #4086
|
199 |
+
* Fixed: Performance section all features not working when Ezoic integration plugin is active. #4092
|
200 |
+
* Fixed: Playbuzz is not working #4085
|
201 |
+
* Fixed: RECENT POSTS label visible if no posts are available #4011
|
202 |
+
* Fixed: data-block-on-consent is missing for Vuukle comments when gdpr is enabled #4095
|
203 |
+
* Fixed: Remove Purge AMP CDN cache Settings buuton: #4099
|
204 |
+
* Fixed: When categories that we exclude from AMP through the plugin configuration present redirection problem along with mobile redirection option #4075
|
205 |
+
* Fixed: Alignment issue in GDPR Privacy link. #4101
|
206 |
+
|
207 |
= 1.0.18 (27th January 2020) =
|
208 |
* Fixed: Debug warnings with Imagify plugin #3908
|
209 |
|
232 |
* Fixed: When AMP is disabled on pages,give an option of hide/unhide AMP on Blog page when in edit mode. #4066
|
233 |
* Fixed: The tag 'template' requires including the 'amp-mustache' extension JavaScript. #4079
|
234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -247,8 +247,16 @@ do_action("ampforwp_single_design_type_handle_d1");
|
|
247 |
<?php if(ampforwp_get_setting('single-design-type') == true && ampforwp_get_setting('ampforwp-swift-recent-posts')=='1' && !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
|
248 |
<div class="r-pf">
|
249 |
<div class="cntr">
|
250 |
-
|
251 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
$number_of_posts = 6;
|
253 |
$rcp = ampforwp_get_setting('ampforwp-number-of-recent-posts');
|
254 |
if( !empty($rcp) ){
|
247 |
<?php if(ampforwp_get_setting('single-design-type') == true && ampforwp_get_setting('ampforwp-swift-recent-posts')=='1' && !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
|
248 |
<div class="r-pf">
|
249 |
<div class="cntr">
|
250 |
+
<?php
|
251 |
+
$args = array(
|
252 |
+
'posts_per_page' => 2,
|
253 |
+
'fields' => 'ids',
|
254 |
+
);
|
255 |
+
$results = get_posts($args);
|
256 |
+
$check_rp= count($results);
|
257 |
+
if ($check_rp > 1) {?>
|
258 |
+
<h3><?php echo esc_html(ampforwp_translation(ampforwp_get_setting('amp-translator-recent-text'), 'Recent Posts' )); ?></h3>
|
259 |
+
<?php }
|
260 |
$number_of_posts = 6;
|
261 |
$rcp = ampforwp_get_setting('ampforwp-number-of-recent-posts');
|
262 |
if( !empty($rcp) ){
|
@@ -1041,7 +1041,9 @@ function ampforwp_remove_schema_data() {
|
|
1041 |
//Removed style tag appending before Html tag for themify pagebuilder #3376
|
1042 |
ampforwp_remove_filters_for_class( 'the_content', 'Themify_Builder', 'builder_show_on_front', 11 );
|
1043 |
ampforwp_remove_filters_for_class( 'the_content', 'Themify_Builder', 'builder_clear_static_content', 1 );
|
1044 |
-
|
|
|
|
|
1045 |
// Yoast Schema Compatibility #3332
|
1046 |
if( ampforwp_get_setting('ampforwp-seo-selection') != "yoast"){
|
1047 |
ampforwp_remove_filters_for_class( 'amp_post_template_head', 'WPSEO_Schema', 'json_ld', 9 );
|
@@ -6195,10 +6197,13 @@ function ampforwp_vuukle_comments_markup() {
|
|
6195 |
$srcUrl = add_query_arg('title' , urlencode($post->post_title), $srcUrl);
|
6196 |
$srcUrl = add_query_arg('img' , esc_url($img), $srcUrl);
|
6197 |
$srcUrl = add_query_arg('tags' , urlencode($tag_name), $srcUrl);
|
6198 |
-
|
|
|
|
|
|
|
6199 |
$vuukle_html ='';
|
6200 |
if ( $display_comments_on ) {
|
6201 |
-
$vuukle_html .= '<amp-iframe width="600" height="350" layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
|
6202 |
|
6203 |
<div overflow tabindex="0" role="button" aria-label="Show comments" class="afwp-vuukle-support">Show comments</div></amp-iframe>';
|
6204 |
}
|
@@ -7847,16 +7852,12 @@ if(!function_exists('ampforwp_imagify_webp_compatibility')){
|
|
7847 |
$display_webp = $imageify_opt['display_webp'];
|
7848 |
if($convert_to_webp && $display_webp){
|
7849 |
$img_url = esc_url($src[1][0]);
|
7850 |
-
|
7851 |
-
|
7852 |
-
|
7853 |
-
|
7854 |
-
|
7855 |
-
|
7856 |
-
$headers = get_headers($rep_url);
|
7857 |
-
if(isset($headers[0])){
|
7858 |
-
$is_webp = stripos($headers[0], "200 OK") ? TRUE : FALSE;
|
7859 |
-
if($is_webp){
|
7860 |
$content = str_replace($img_url, $rep_url, $content);
|
7861 |
}
|
7862 |
}
|
@@ -7885,16 +7886,12 @@ function ampforwp_ewww_webp_compatibility($content){
|
|
7885 |
preg_match_all('/src="(.*?)"/', $content,$src);
|
7886 |
if(isset($src[1][0])){
|
7887 |
$img_url = esc_url($src[1][0]);
|
7888 |
-
|
7889 |
-
|
7890 |
-
|
7891 |
-
|
7892 |
-
|
7893 |
-
|
7894 |
-
$headers = get_headers($rep_url);
|
7895 |
-
if(isset($headers[0])){
|
7896 |
-
$is_webp = stripos($headers[0], "200 OK") ? TRUE : FALSE;
|
7897 |
-
if($is_webp){
|
7898 |
$content = str_replace($img_url, $rep_url, $content);
|
7899 |
}
|
7900 |
}
|
1041 |
//Removed style tag appending before Html tag for themify pagebuilder #3376
|
1042 |
ampforwp_remove_filters_for_class( 'the_content', 'Themify_Builder', 'builder_show_on_front', 11 );
|
1043 |
ampforwp_remove_filters_for_class( 'the_content', 'Themify_Builder', 'builder_clear_static_content', 1 );
|
1044 |
+
if(defined('EZOIC__PLUGIN_NAME')){
|
1045 |
+
ampforwp_remove_filters_for_class( 'shutdown', 'Ezoic_Namespace\Ezoic_Integration_Public', 'ez_buffer_end', 0 );
|
1046 |
+
}
|
1047 |
// Yoast Schema Compatibility #3332
|
1048 |
if( ampforwp_get_setting('ampforwp-seo-selection') != "yoast"){
|
1049 |
ampforwp_remove_filters_for_class( 'amp_post_template_head', 'WPSEO_Schema', 'json_ld', 9 );
|
6197 |
$srcUrl = add_query_arg('title' , urlencode($post->post_title), $srcUrl);
|
6198 |
$srcUrl = add_query_arg('img' , esc_url($img), $srcUrl);
|
6199 |
$srcUrl = add_query_arg('tags' , urlencode($tag_name), $srcUrl);
|
6200 |
+
$consent = '';
|
6201 |
+
if(ampforwp_get_data_consent()){
|
6202 |
+
$consent = 'data-block-on-consent ';
|
6203 |
+
}
|
6204 |
$vuukle_html ='';
|
6205 |
if ( $display_comments_on ) {
|
6206 |
+
$vuukle_html .= '<amp-iframe width="600" height="350" '.esc_attr($consent).'layout="responsive" sandbox="allow-scripts allow-same-origin allow-modals allow-popups allow-forms" resizable frameborder="0" src="'.esc_url($srcUrl).'">
|
6207 |
|
6208 |
<div overflow tabindex="0" role="button" aria-label="Show comments" class="afwp-vuukle-support">Show comments</div></amp-iframe>';
|
6209 |
}
|
7852 |
$display_webp = $imageify_opt['display_webp'];
|
7853 |
if($convert_to_webp && $display_webp){
|
7854 |
$img_url = esc_url($src[1][0]);
|
7855 |
+
if(!preg_match('/\.webp/', $img_url)){
|
7856 |
+
$rep_url = esc_url($src[1][0]).".webp";
|
7857 |
+
if(preg_match('/http(.*)\/wp-content\/uploads/', $rep_url)){
|
7858 |
+
$upload_dir = wp_upload_dir()['basedir'];
|
7859 |
+
$img_file = preg_replace('/http(.*)\/wp-content\/uploads/', $upload_dir, $rep_url);
|
7860 |
+
if(file_exists($img_file)){
|
|
|
|
|
|
|
|
|
7861 |
$content = str_replace($img_url, $rep_url, $content);
|
7862 |
}
|
7863 |
}
|
7886 |
preg_match_all('/src="(.*?)"/', $content,$src);
|
7887 |
if(isset($src[1][0])){
|
7888 |
$img_url = esc_url($src[1][0]);
|
7889 |
+
if(!preg_match('/\.webp/', $img_url)){
|
7890 |
+
$rep_url = esc_url($src[1][0]).".webp";
|
7891 |
+
if(preg_match('/http(.*)\/wp-content\/uploads/', $rep_url)){
|
7892 |
+
$upload_dir = wp_upload_dir()['basedir'];
|
7893 |
+
$img_file = preg_replace('/http(.*)\/wp-content\/uploads/', $upload_dir, $rep_url);
|
7894 |
+
if(file_exists($img_file)){
|
|
|
|
|
|
|
|
|
7895 |
$content = str_replace($img_url, $rep_url, $content);
|
7896 |
}
|
7897 |
}
|