Version Description
(9th May 2020) = * Fixed: Title not showing with Yoast in some scenarios #4434 * Fixed: Canonical not showing with Yoast when AMP takeover is enabled #4434 * Fixed: Lightbox for images appearing even after disabling #4442 * Fixed: Menu and internal links are not working through Google CDN #4429 * Fixed: GDPR privacy text appearing on the top of the homepage #4435 * Fixed: Modules are not displaying in background video in pagebuilder #4398 * Fixed: Showing too many redirect in WPML with mobile redirection #4444 * Fixed: Detecting the Mobile redirection config to avoid manual tasks #4382 * Fixed: Pagination of category module not jumping on 1st & last links #4401 * Fixed: Notice added when category based is removed from Yoast #4437 * Fixed: Debug notices on the AMP pages #4440
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.48 |
Comparing to | |
See all releases |
Code changes from version 1.0.47 to 1.0.48
- README.md +14 -8
- accelerated-moblie-pages.php +2 -2
- changelog.txt +13 -0
- components/components-core.php +5 -1
- components/gdpr/gdpr.php +1 -1
- includes/admin-script.js +10 -0
- includes/features/functions.php +74 -1
- includes/newsletter.php +5 -5
- includes/vendor/amp/includes/amp-post-template-actions.php +3 -0
- pagebuilder/config/moduleTemplate.php +13 -1
- pagebuilder/modules/contents-module.php +2 -0
- readme.txt +14 -8
- templates/features.php +23 -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,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
= 1.0.47 (5th May 2020) =
|
198 |
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
199 |
|
@@ -210,11 +223,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
210 |
* Fixed: Ninja Tables plugin css was hiding due to class drawer #4428
|
211 |
* Fixed: AMP Option panel improvements #4408
|
212 |
|
213 |
-
= 1.0.45 (30th April 2020) =
|
214 |
-
* Fixed: Updated the code as per yoast latest version to fixed the canonical, title separator, meta tag errors #4415
|
215 |
-
* Fixed: Content links unclickable with GDPR #4392
|
216 |
-
|
217 |
-
= 1.0.44 (29th April 2020) =
|
218 |
-
* Fixed: Multiple issues created after the latest update of Yoast (14.0 and above) #4412
|
219 |
-
|
220 |
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.48
|
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.48 (9th May 2020) =
|
198 |
+
* Fixed: Title not showing with Yoast in some scenarios #4434
|
199 |
+
* Fixed: Canonical not showing with Yoast when AMP takeover is enabled #4434
|
200 |
+
* Fixed: Lightbox for images appearing even after disabling #4442
|
201 |
+
* Fixed: Menu and internal links are not working through Google CDN #4429
|
202 |
+
* Fixed: GDPR privacy text appearing on the top of the homepage #4435
|
203 |
+
* Fixed: Modules are not displaying in background video in pagebuilder #4398
|
204 |
+
* Fixed: Showing too many redirect in WPML with mobile redirection #4444
|
205 |
+
* Fixed: Detecting the Mobile redirection config to avoid manual tasks #4382
|
206 |
+
* Fixed: Pagination of category module not jumping on 1st & last links #4401
|
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 |
|
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)
|
@@ -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.48
|
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.48');
|
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.47 (5th May 2020) =
|
4 |
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
5 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.48 (9th May 2020) =
|
4 |
+
* Fixed: Title not showing with Yoast in some scenarios #4434
|
5 |
+
* Fixed: Canonical not showing with Yoast when AMP takeover is enabled #4434
|
6 |
+
* Fixed: Lightbox for images appearing even after disabling #4442
|
7 |
+
* Fixed: Menu and internal links are not working through Google CDN #4429
|
8 |
+
* Fixed: GDPR privacy text appearing on the top of the homepage #4435
|
9 |
+
* Fixed: Modules are not displaying in background video in pagebuilder #4398
|
10 |
+
* Fixed: Showing too many redirect in WPML with mobile redirection #4444
|
11 |
+
* Fixed: Detecting the Mobile redirection config to avoid manual tasks #4382
|
12 |
+
* Fixed: Pagination of category module not jumping on 1st & last links #4401
|
13 |
+
* Fixed: Notice added when category based is removed from Yoast #4437
|
14 |
+
* Fixed: Debug notices on the AMP pages #4440
|
15 |
+
|
16 |
= 1.0.47 (5th May 2020) =
|
17 |
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
18 |
|
@@ -368,6 +368,10 @@ function amp_header_core(){
|
|
368 |
if( true == $redux_builder_amp['amp-rtl-select-option'] ){
|
369 |
$bodyClass .= ' rtl ';
|
370 |
}
|
|
|
|
|
|
|
|
|
371 |
?><!doctype html>
|
372 |
<html <?php echo esc_attr(ampforwp_amp_nonamp_convert('amp ')); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
|
373 |
<head>
|
@@ -397,7 +401,7 @@ function amp_header_core(){
|
|
397 |
</style>
|
398 |
<?php do_action('ampforwp_before_head', $thisTemplate); ?>
|
399 |
</head>
|
400 |
-
<body <?php ampforwp_body_class($bodyClass); ?>>
|
401 |
<?php do_action('amp_start', $thisTemplate); ?>
|
402 |
<?php do_action('ampforwp_admin_menu_bar_front'); ?>
|
403 |
<?php do_action('ampforwp_body_beginning', $thisTemplate);
|
368 |
if( true == $redux_builder_amp['amp-rtl-select-option'] ){
|
369 |
$bodyClass .= ' rtl ';
|
370 |
}
|
371 |
+
$lightbox = '';
|
372 |
+
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
373 |
+
$lightbox = 'data-amp-auto-lightbox-disable';
|
374 |
+
}
|
375 |
?><!doctype html>
|
376 |
<html <?php echo esc_attr(ampforwp_amp_nonamp_convert('amp ')); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
|
377 |
<head>
|
401 |
</style>
|
402 |
<?php do_action('ampforwp_before_head', $thisTemplate); ?>
|
403 |
</head>
|
404 |
+
<body <?php echo esc_attr($lightbox); ?> <?php ampforwp_body_class($bodyClass); ?>>
|
405 |
<?php do_action('amp_start', $thisTemplate); ?>
|
406 |
<?php do_action('ampforwp_admin_menu_bar_front'); ?>
|
407 |
<?php do_action('ampforwp_body_beginning', $thisTemplate);
|
@@ -176,7 +176,7 @@ function ampforwp_gdpr_css(){
|
|
176 |
.gdpr_yn form{display: inline;}
|
177 |
.gdpr_yn button{background: #FFFC26;border: none;color: #333;padding: 8px 40px;font-size: 15px;margin: 0 3px;font-weight: 600;cursor: pointer;}
|
178 |
.gdpr_yn .gdpr_n{background: transparent;}
|
179 |
-
amp-consent{position: relative;margin-left: 10px;
|
180 |
.gdpr_fmi span, .gdpr_fmi a:before{
|
181 |
display:none;
|
182 |
}
|
176 |
.gdpr_yn form{display: inline;}
|
177 |
.gdpr_yn button{background: #FFFC26;border: none;color: #333;padding: 8px 40px;font-size: 15px;margin: 0 3px;font-weight: 600;cursor: pointer;}
|
178 |
.gdpr_yn .gdpr_n{background: transparent;}
|
179 |
+
amp-consent{position: relative;margin-left: 10px;width: auto;background: transparent;margin:0;left:40%;}
|
180 |
.gdpr_fmi span, .gdpr_fmi a:before{
|
181 |
display:none;
|
182 |
}
|
@@ -2569,4 +2569,14 @@ function DrawerIcon(icon) {
|
|
2569 |
}
|
2570 |
})();
|
2571 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2572 |
});
|
2569 |
}
|
2570 |
})();
|
2571 |
}
|
2572 |
+
$("#subscribe-newsletter-form").on('submit',function(e){
|
2573 |
+
e.preventDefault();
|
2574 |
+
var $form = $("#subscribe-newsletter-form");
|
2575 |
+
var name = $form.find('input[name="name"]').val();
|
2576 |
+
var email = $form.find('input[name="email"]').val();
|
2577 |
+
var website = $form.find('input[name="company"]').val();
|
2578 |
+
$.post(ajaxurl, {action:'ampforwp_subscribe_newsletter',name:name, email:email,website:website},
|
2579 |
+
function(data) {}
|
2580 |
+
);
|
2581 |
+
});
|
2582 |
});
|
@@ -52,6 +52,8 @@ function ampforwp_add_admin_styling($hook_suffix){
|
|
52 |
add_action('admin_notices', 'ampforwp_automattic_activation' );
|
53 |
add_action('admin_notices', 'ampforwp_admin_notices' );
|
54 |
add_action('admin_notices', 'ampforwp_seo_selection_notice' );
|
|
|
|
|
55 |
}else{
|
56 |
$redux_data['ampforwp-amp-takeover'] = ampforwp_get_setting('ampforwp-amp-takeover');
|
57 |
}
|
@@ -740,6 +742,19 @@ function ampforwp_url_purifier($url){
|
|
740 |
$wpml_lang_checker = true;
|
741 |
}
|
742 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
743 |
}
|
744 |
if ( true == $wpml_lang_checker && ( is_home() || is_archive() || is_front_page() ) ) {
|
745 |
if ( ( is_archive() || is_home() ) && get_query_var('paged') > 1 ) {
|
@@ -1241,8 +1256,10 @@ if(!function_exists('ampforwp_sassy_share_icons')){
|
|
1241 |
preg_match_all('/<div class="heateorSssClear"><\/div><div class="heateor_sss_sharing_container (.*)">(.*)<div class="heateorSssClear"><\/div><\/div><div class="heateorSssClear"><\/div>/', $ampforwp_the_content, $matches);
|
1242 |
|
1243 |
$_actual = $matches[0];
|
|
|
1244 |
$_replace = '<div class="heateorSssClear"></div><div class="heateor_sss_sharing_container '.$matches[1][0].'"></amp-img></a>'.$_append.'</div><div class="heateorSssClear"></div><div class="heateorSssClear"></div>';
|
1245 |
$ampforwp_the_content = str_replace($_actual, $_replace, $ampforwp_the_content);
|
|
|
1246 |
}
|
1247 |
}
|
1248 |
return $ampforwp_the_content;
|
@@ -1256,7 +1273,7 @@ function ampforwp_dev_mode_notice(){
|
|
1256 |
if(isset($redux_builder_amp['ampforwp-development-mode']) && $redux_builder_amp['ampforwp-development-mode']) {
|
1257 |
$message = ' Please turn off Development mode, when you are done.';?>
|
1258 |
|
1259 |
-
<div class="notice notice-success
|
1260 |
height: 40px; overflow: hidden; ">
|
1261 |
<div class="ampforwp-dev-mode-message" style="margin-top: 10px;">
|
1262 |
<?php echo '<strong>'. esc_html__('AMP Dev mode is Enabled!', 'accelerated-mobile-pages').'</strong>'. esc_html__($message, 'accelerated-mobile-pages'); ?>
|
@@ -1300,4 +1317,60 @@ function ampforwp_seo_selection_notice() {
|
|
1300 |
if(!empty($seo)){
|
1301 |
echo sprintf(('<div class="notice notice-error"><p>%s <a href="%s">%s</a></p></div>'), esc_html__('The configuration of AMPforWP and '.esc_html($seo).' plugin is seems incorrect. Please go to AMPforWP plugin settings and select '.esc_html($seo).' from SEO Plugin Integration or ','accelerated-mobile-pages'),esc_url(admin_url('admin.php?page=amp_options&tab=5')),esc_html__('Click Here','accelerated-mobile-pages'));
|
1302 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1303 |
}
|
52 |
add_action('admin_notices', 'ampforwp_automattic_activation' );
|
53 |
add_action('admin_notices', 'ampforwp_admin_notices' );
|
54 |
add_action('admin_notices', 'ampforwp_seo_selection_notice' );
|
55 |
+
add_action('admin_notices', 'ampforwp_mobile_redirection_notice' );
|
56 |
+
add_action('admin_notices', 'ampforwp_category_base_remove_notice' );
|
57 |
}else{
|
58 |
$redux_data['ampforwp-amp-takeover'] = ampforwp_get_setting('ampforwp-amp-takeover');
|
59 |
}
|
742 |
$wpml_lang_checker = true;
|
743 |
}
|
744 |
}
|
745 |
+
$url = esc_url($url);
|
746 |
+
$active_langs = $sitepress_settings['active_languages'];
|
747 |
+
foreach ($active_langs as $active_lang) {
|
748 |
+
if (preg_match('/\?lang='.$active_lang.'/', $url)){
|
749 |
+
$url = str_replace('&amp=1', '', $url);
|
750 |
+
if(false == ampforwp_get_setting('amp-core-end-point')){
|
751 |
+
$url = str_replace('?lang='.$active_lang, 'amp/', $url);
|
752 |
+
}else{
|
753 |
+
$url = str_replace('?lang='.$active_lang, '?amp=1', $url);
|
754 |
+
}
|
755 |
+
$url = add_query_arg( 'lang',$active_lang, $url);
|
756 |
+
}
|
757 |
+
}
|
758 |
}
|
759 |
if ( true == $wpml_lang_checker && ( is_home() || is_archive() || is_front_page() ) ) {
|
760 |
if ( ( is_archive() || is_home() ) && get_query_var('paged') > 1 ) {
|
1256 |
preg_match_all('/<div class="heateorSssClear"><\/div><div class="heateor_sss_sharing_container (.*)">(.*)<div class="heateorSssClear"><\/div><\/div><div class="heateorSssClear"><\/div>/', $ampforwp_the_content, $matches);
|
1257 |
|
1258 |
$_actual = $matches[0];
|
1259 |
+
if(isset($matches[1][0])){
|
1260 |
$_replace = '<div class="heateorSssClear"></div><div class="heateor_sss_sharing_container '.$matches[1][0].'"></amp-img></a>'.$_append.'</div><div class="heateorSssClear"></div><div class="heateorSssClear"></div>';
|
1261 |
$ampforwp_the_content = str_replace($_actual, $_replace, $ampforwp_the_content);
|
1262 |
+
}
|
1263 |
}
|
1264 |
}
|
1265 |
return $ampforwp_the_content;
|
1273 |
if(isset($redux_builder_amp['ampforwp-development-mode']) && $redux_builder_amp['ampforwp-development-mode']) {
|
1274 |
$message = ' Please turn off Development mode, when you are done.';?>
|
1275 |
|
1276 |
+
<div class="notice notice-success amp-dev-notice" style="position:relative;
|
1277 |
height: 40px; overflow: hidden; ">
|
1278 |
<div class="ampforwp-dev-mode-message" style="margin-top: 10px;">
|
1279 |
<?php echo '<strong>'. esc_html__('AMP Dev mode is Enabled!', 'accelerated-mobile-pages').'</strong>'. esc_html__($message, 'accelerated-mobile-pages'); ?>
|
1317 |
if(!empty($seo)){
|
1318 |
echo sprintf(('<div class="notice notice-error"><p>%s <a href="%s">%s</a></p></div>'), esc_html__('The configuration of AMPforWP and '.esc_html($seo).' plugin is seems incorrect. Please go to AMPforWP plugin settings and select '.esc_html($seo).' from SEO Plugin Integration or ','accelerated-mobile-pages'),esc_url(admin_url('admin.php?page=amp_options&tab=5')),esc_html__('Click Here','accelerated-mobile-pages'));
|
1319 |
}
|
1320 |
+
}
|
1321 |
+
add_action('wp_ajax_ampforwp_subscribe_newsletter','ampforwp_subscribe_for_newsletter');
|
1322 |
+
add_action('wp_ajax_nopriv_ampforwp_subscribe_newsletter','ampforwp_subscribe_for_newsletter');
|
1323 |
+
function ampforwp_subscribe_for_newsletter(){
|
1324 |
+
$api_url = 'http://magazine3.company/wp-json/api/central/email/subscribe';
|
1325 |
+
$api_params = array(
|
1326 |
+
'name' => sanitize_text_field($_POST['name']),
|
1327 |
+
'email'=> sanitize_text_field($_POST['email']),
|
1328 |
+
'website'=> sanitize_text_field($_POST['website']),
|
1329 |
+
'type'=> 'amp'
|
1330 |
+
);
|
1331 |
+
$response = wp_remote_post( $api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
1332 |
+
$response = wp_remote_retrieve_body( $response );
|
1333 |
+
echo $response;
|
1334 |
+
die;
|
1335 |
+
}
|
1336 |
+
function ampforwp_mobile_redirection_notice(){
|
1337 |
+
if(false == ampforwp_get_setting('amp-mobile-redirection')){
|
1338 |
+
return;
|
1339 |
+
}
|
1340 |
+
$plugin = $option = '';
|
1341 |
+
if(function_exists('rocket_load_textdomain') && 0 == get_rocket_option( 'do_caching_mobile_files' )){
|
1342 |
+
$plugin = 'WP Rocket';
|
1343 |
+
$option = 'Separate cache files for mobile devices';
|
1344 |
+
}
|
1345 |
+
if(function_exists('wp_super_cache_init_action')) {
|
1346 |
+
global $wp_cache_mobile_enabled;
|
1347 |
+
if(0 == $wp_cache_mobile_enabled){
|
1348 |
+
$plugin = 'WP Super Cache';
|
1349 |
+
$option = 'Mobile device support';
|
1350 |
+
}else{
|
1351 |
+
return;
|
1352 |
+
}
|
1353 |
+
}
|
1354 |
+
if(function_exists('litespeed_purge_single_post') && !LiteSpeed_Cache_Admin_Rules::get_instance()->get_rewrite_rule_mobile_agents()) {
|
1355 |
+
$plugin = 'LiteSpeed Cache';
|
1356 |
+
$option = 'Cache Mobile';
|
1357 |
+
}
|
1358 |
+
if(function_exists('wpfastestcache_activate') && 'on' != $GLOBALS["wp_fastest_cache_options"]->wpFastestCacheMobile) {
|
1359 |
+
$plugin = 'WP Fastest Cache';
|
1360 |
+
$option = 'Mobile';
|
1361 |
+
}
|
1362 |
+
if(!empty($plugin) && !empty($option)){
|
1363 |
+
echo sprintf(('<div class="notice notice-error"><p>%s <a target="_blank" href="%s">%s</a></p></div>'), esc_html__('You need to enable the option of "'.esc_html($option).'" in '.esc_html($plugin).' plugin for mobile redirection to work properly in AMP','accelerated-mobile-pages'),esc_url('https://ampforwp.com/tutorials/article/how-to-redirect-all-mobile-visitors-to-amp/'),esc_html__('Click here for more info','accelerated-mobile-pages')); }
|
1364 |
+
}
|
1365 |
+
function ampforwp_category_base_remove_notice(){
|
1366 |
+
if(true == ampforwp_get_setting('ampforwp-category-base-removel-link')){
|
1367 |
+
return;
|
1368 |
+
}
|
1369 |
+
if(class_exists('WPSEO_Options') && WPSEO_Options::get( 'stripcategorybase' ) == true){
|
1370 |
+
echo sprintf(('<div class="notice notice-error"><p>%s <a href="%s">%s</a>%s<a href="%s">%s</a></p></div>'), esc_html__('We have detected that you removed Category Base from Yoast SEO plugin but not from AMPforWP settings. Please','accelerated-mobile-pages'),
|
1371 |
+
esc_url('admin.php?page=amp_options&tab=17'),
|
1372 |
+
esc_html__('Click here','accelerated-mobile-pages'),
|
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 |
}
|
@@ -43,20 +43,20 @@ class ampforwp_pointers {
|
|
43 |
$content = '<h3>' . sprintf (esc_html__('You are awesome for using AMP!', 'accelerated-mobile-pages'), self::DISPLAY_VERSION) . '</h3>';
|
44 |
$content .= '<p>' . esc_html__('Do you want the latest update on', 'accelerated-mobile-pages') . '<b>' . esc_html__(' AMP ', 'accelerated-mobile-pages') . '</b>' . esc_html__('before others and some best resources on AMP in a single email? - Free just for users of AMP!', 'accelerated-mobile-pages').'</p>';
|
45 |
$content .= '
|
46 |
-
|
47 |
<style type="text/css">
|
48 |
.wp-pointer-buttons{ padding:0; overflow: hidden; }
|
49 |
.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
|
50 |
</style>
|
51 |
<div id="mc_embed_signup">
|
52 |
-
<form
|
53 |
<div id="mc_embed_signup_scroll">
|
54 |
<div class="mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">
|
55 |
-
<input type="text" name="
|
56 |
|
57 |
-
<input type="text" value="' . esc_attr( $current_user->user_email ) . '" name="
|
58 |
|
59 |
-
<input type="text" name="
|
60 |
|
61 |
<input type="hidden" name="ml-submit" value="1" />
|
62 |
</div>
|
43 |
$content = '<h3>' . sprintf (esc_html__('You are awesome for using AMP!', 'accelerated-mobile-pages'), self::DISPLAY_VERSION) . '</h3>';
|
44 |
$content .= '<p>' . esc_html__('Do you want the latest update on', 'accelerated-mobile-pages') . '<b>' . esc_html__(' AMP ', 'accelerated-mobile-pages') . '</b>' . esc_html__('before others and some best resources on AMP in a single email? - Free just for users of AMP!', 'accelerated-mobile-pages').'</p>';
|
45 |
$content .= '
|
46 |
+
|
47 |
<style type="text/css">
|
48 |
.wp-pointer-buttons{ padding:0; overflow: hidden; }
|
49 |
.wp-pointer-content .button-secondary{ left: -25px;background: transparent;top: 5px; border: 0;position: relative; padding: 0; box-shadow: none;margin: 0;color: #0085ba;} .wp-pointer-content .button-primary{ display:none} #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
|
50 |
</style>
|
51 |
<div id="mc_embed_signup">
|
52 |
+
<form method="POST" id="subscribe-newsletter-form">
|
53 |
<div id="mc_embed_signup_scroll">
|
54 |
<div class="mc-field-group" style=" margin-left: 15px; width: 195px; float: left;">
|
55 |
+
<input type="text" name="name" class="form-control" placeholder="Name" hidden value="' . esc_attr( $current_user->display_name ) . '" style="display:none">
|
56 |
|
57 |
+
<input type="text" value="' . esc_attr( $current_user->user_email ) . '" name="email" class="form-control" placeholder="Email*" style=" width: 180px; padding: 6px 5px;">
|
58 |
|
59 |
+
<input type="text" name="company" class="form-control" placeholder="Website" hidden style=" display:none; width: 168px; padding: 6px 5px;" value="' . esc_url( get_home_url() ) . '">
|
60 |
|
61 |
<input type="hidden" name="ml-submit" value="1" />
|
62 |
</div>
|
@@ -15,6 +15,9 @@ if( (class_exists('Yoast\\WP\\SEO\\Integrations\\Front_End_Integration')) ){
|
|
15 |
if ('yoast' == ampforwp_get_setting('ampforwp-seo-selection') && ! is_singular() ){
|
16 |
add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
|
17 |
}
|
|
|
|
|
|
|
18 |
} else {
|
19 |
add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
|
20 |
add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_title' );
|
15 |
if ('yoast' == ampforwp_get_setting('ampforwp-seo-selection') && ! is_singular() ){
|
16 |
add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
|
17 |
}
|
18 |
+
if(false == get_theme_support( 'title-tag' )){
|
19 |
+
add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_title' );
|
20 |
+
}
|
21 |
} else {
|
22 |
add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_canonical' );
|
23 |
add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_title' );
|
@@ -132,7 +132,19 @@ $front_css = '
|
|
132 |
{{row-class}}.amppb-fluid{width:{{fluid-width}};}
|
133 |
{{row-class}}.amppb-fluid .col, {{row-class}}.amppb-fluid .col-2-wrap{margin:0 auto;max-width:{{fluid-wrapper}}; }
|
134 |
{{row-class}}.amppb-fixed .col {max-width:{{content-width}};width:{{fixed-width}};margin: 0 auto;}
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
{{row-class}}{
|
137 |
{{if_condition_check_for_brdr==1}}
|
138 |
border-width:{{border_sz}};
|
132 |
{{row-class}}.amppb-fluid{width:{{fluid-width}};}
|
133 |
{{row-class}}.amppb-fluid .col, {{row-class}}.amppb-fluid .col-2-wrap{margin:0 auto;max-width:{{fluid-wrapper}}; }
|
134 |
{{row-class}}.amppb-fixed .col {max-width:{{content-width}};width:{{fixed-width}};margin: 0 auto;}
|
135 |
+
{{if_condition_background_type==youtubevideo}}
|
136 |
+
{{row-class}}{
|
137 |
+
position:relative;
|
138 |
+
}
|
139 |
+
{{row-class}}.amppb-fixed .col, {{row-class}}.amppb-fluid .col{
|
140 |
+
position:absolute;
|
141 |
+
top:10px;
|
142 |
+
left: 0;
|
143 |
+
right: 0;
|
144 |
+
bottom: 0;
|
145 |
+
margin: auto;
|
146 |
+
}
|
147 |
+
{{ifend_condition_background_type==youtubevideo}}
|
148 |
{{row-class}}{
|
149 |
{{if_condition_check_for_brdr==1}}
|
150 |
border-width:{{border_sz}};
|
@@ -579,6 +579,7 @@ if ( is_admin() ) {
|
|
579 |
if( $paged > 1){
|
580 |
|
581 |
$first_page = add_query_arg( array( $pagination_text => 1 ), $queryUrl );
|
|
|
582 |
$prev_page = add_query_arg( array( $pagination_text => $paged - 1 ), $queryUrl );
|
583 |
$nextLabel = (isset($fieldValues['ampforwp_pb_cat_pagination_next']) && !empty($fieldValues['ampforwp_pb_cat_pagination_next'])) ? $fieldValues['ampforwp_pb_cat_pagination_next'] : "Next";
|
584 |
|
@@ -611,6 +612,7 @@ if ( is_admin() ) {
|
|
611 |
if( $total_num_pages != $paged ){
|
612 |
$lastLabel = (isset($fieldValues['ampforwp_pb_cat_pagination_last']) && !empty($fieldValues['ampforwp_pb_cat_pagination_last'])) ? $fieldValues['ampforwp_pb_cat_pagination_last'] : "Last";
|
613 |
$next_page = add_query_arg( array( $pagination_text => $total_num_pages ), $queryUrl );
|
|
|
614 |
$pagination_links .= "<a class='pagi-last' href =".esc_url($next_page)." >".esc_html__($lastLabel, 'accelerated-mobile-pages')."</a>";
|
615 |
}
|
616 |
$pagination_links .= '</div>';
|
579 |
if( $paged > 1){
|
580 |
|
581 |
$first_page = add_query_arg( array( $pagination_text => 1 ), $queryUrl );
|
582 |
+
$first_page .= '#cat-jump'. esc_html($fieldValues['id']);
|
583 |
$prev_page = add_query_arg( array( $pagination_text => $paged - 1 ), $queryUrl );
|
584 |
$nextLabel = (isset($fieldValues['ampforwp_pb_cat_pagination_next']) && !empty($fieldValues['ampforwp_pb_cat_pagination_next'])) ? $fieldValues['ampforwp_pb_cat_pagination_next'] : "Next";
|
585 |
|
612 |
if( $total_num_pages != $paged ){
|
613 |
$lastLabel = (isset($fieldValues['ampforwp_pb_cat_pagination_last']) && !empty($fieldValues['ampforwp_pb_cat_pagination_last'])) ? $fieldValues['ampforwp_pb_cat_pagination_last'] : "Last";
|
614 |
$next_page = add_query_arg( array( $pagination_text => $total_num_pages ), $queryUrl );
|
615 |
+
$next_page .= '#cat-jump'. esc_html($fieldValues['id']);
|
616 |
$pagination_links .= "<a class='pagi-last' href =".esc_url($next_page)." >".esc_html__($lastLabel, 'accelerated-mobile-pages')."</a>";
|
617 |
}
|
618 |
$pagination_links .= '</div>';
|
@@ -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,19 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 1.0.47 (5th May 2020) =
|
195 |
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
196 |
|
@@ -207,11 +220,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
207 |
* Fixed: Ninja Tables plugin css was hiding due to class drawer #4428
|
208 |
* Fixed: AMP Option panel improvements #4408
|
209 |
|
210 |
-
= 1.0.45 (30th April 2020) =
|
211 |
-
* Fixed: Updated the code as per yoast latest version to fixed the canonical, title separator, meta tag errors #4415
|
212 |
-
* Fixed: Content links unclickable with GDPR #4392
|
213 |
-
|
214 |
-
= 1.0.44 (29th April 2020) =
|
215 |
-
* Fixed: Multiple issues created after the latest update of Yoast (14.0 and above) #4412
|
216 |
-
|
217 |
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.48
|
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.48 (9th May 2020) =
|
195 |
+
* Fixed: Title not showing with Yoast in some scenarios #4434
|
196 |
+
* Fixed: Canonical not showing with Yoast when AMP takeover is enabled #4434
|
197 |
+
* Fixed: Lightbox for images appearing even after disabling #4442
|
198 |
+
* Fixed: Menu and internal links are not working through Google CDN #4429
|
199 |
+
* Fixed: GDPR privacy text appearing on the top of the homepage #4435
|
200 |
+
* Fixed: Modules are not displaying in background video in pagebuilder #4398
|
201 |
+
* Fixed: Showing too many redirect in WPML with mobile redirection #4444
|
202 |
+
* Fixed: Detecting the Mobile redirection config to avoid manual tasks #4382
|
203 |
+
* Fixed: Pagination of category module not jumping on 1st & last links #4401
|
204 |
+
* Fixed: Notice added when category based is removed from Yoast #4437
|
205 |
+
* Fixed: Debug notices on the AMP pages #4440
|
206 |
+
|
207 |
= 1.0.47 (5th May 2020) =
|
208 |
* Fixed: Few issues fixed with latest version of yoast plugin #4430
|
209 |
|
220 |
* Fixed: Ninja Tables plugin css was hiding due to class drawer #4428
|
221 |
* Fixed: AMP Option panel improvements #4408
|
222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -363,8 +363,28 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
363 |
}
|
364 |
$amp_url = apply_filters('ampforwp_modify_rel_canonical',$amp_url);
|
365 |
|
366 |
-
if( $supported_amp_post_types || ampforwp_is_front_page() ) {
|
367 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
}
|
369 |
}
|
370 |
return;
|
@@ -4156,7 +4176,7 @@ function ampforwp_home_archive_canonical_setter(){
|
|
4156 |
if ( ampforwp_is_home() && 'page' == get_option( 'show_on_front') && empty(get_option( 'page_for_posts')) && !isset($_GET['lang'])) {
|
4157 |
return ;
|
4158 |
}
|
4159 |
-
if(ampforwp_is_front_page() && 'page' == get_option( 'show_on_front') && empty(get_option( 'page_for_posts')) && !isset($_GET['lang'])){
|
4160 |
return ;
|
4161 |
}
|
4162 |
if(is_search()){
|
363 |
}
|
364 |
$amp_url = apply_filters('ampforwp_modify_rel_canonical',$amp_url);
|
365 |
|
366 |
+
if( $supported_amp_post_types || ampforwp_is_front_page() ) {
|
367 |
+
if(true == ampforwp_get_setting('amp-core-end-point')){
|
368 |
+
if( class_exists('SitePress') ){
|
369 |
+
if( get_option('permalink_structure') ){
|
370 |
+
global $sitepress_settings, $wp;
|
371 |
+
$wpml_lang_checker = false;
|
372 |
+
if($sitepress_settings[ 'language_negotiation_type' ] == 3){
|
373 |
+
$amp_url = esc_url($amp_url);
|
374 |
+
$active_langs = $sitepress_settings['active_languages'];
|
375 |
+
foreach ($active_langs as $active_lang) {
|
376 |
+
if (preg_match('/\?lang='.$active_lang.'/', $amp_url)){
|
377 |
+
$amp_url = preg_replace('/&amp=1/', '', $amp_url);
|
378 |
+
$amp_url = preg_replace('/#038;amp/', '', $amp_url);
|
379 |
+
$amp_url = str_replace('?lang='.$active_lang, '?amp=1', $amp_url);
|
380 |
+
$amp_url = add_query_arg( 'lang',$active_lang, $amp_url);
|
381 |
+
}
|
382 |
+
}
|
383 |
+
}
|
384 |
+
}
|
385 |
+
}
|
386 |
+
}
|
387 |
+
return esc_url_raw($amp_url);
|
388 |
}
|
389 |
}
|
390 |
return;
|
4176 |
if ( ampforwp_is_home() && 'page' == get_option( 'show_on_front') && empty(get_option( 'page_for_posts')) && !isset($_GET['lang'])) {
|
4177 |
return ;
|
4178 |
}
|
4179 |
+
if(ampforwp_is_front_page() && 'page' == get_option( 'show_on_front') && empty(get_option( 'page_for_posts')) && !isset($_GET['lang']) && !ampforwp_get_setting('ampforwp-amp-takeover')){
|
4180 |
return ;
|
4181 |
}
|
4182 |
if(is_search()){
|