Version Description
(28th February 2019) = * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746 * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817 * Fixed: Issue with Post Pagination ( Single ) #2624 * Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681 * Fixed: Full excerpt length in single posts [swift] #2712 * Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
Full changelog available in changelog.txt
Download this release
Release Info
Developer | ampforwp |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.97.38 |
Comparing to | |
See all releases |
Code changes from version 0.9.97.37 to 0.9.97.38
- README.md +10 -2
- accelerated-moblie-pages.php +16 -3
- changelog.txt +8 -0
- includes/redirect.php +3 -3
- readme.txt +9 -12
- templates/design-manager/swift/single.php +1 -1
- templates/features.php +8 -4
- templates/instant-articles/instant-article.php +4 -1
- templates/search-functions.php +1 -15
README.md
CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
|
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 0.9.97.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -185,6 +185,14 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
185 |
|
186 |
== Changelog ==
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
= 0.9.97.37 (23th February 2019) =
|
189 |
* Added: Static page template in AMP #2614 + #2900
|
190 |
* Fixed: Font size and other values are properly sanitizing #2898
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 5.1
|
7 |
+
Stable tag: 0.9.97.38
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
185 |
|
186 |
== Changelog ==
|
187 |
|
188 |
+
= 0.9.97.38 (28th February 2019) =
|
189 |
+
* Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
|
190 |
+
* Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
|
191 |
+
* Fixed: Issue with Post Pagination ( Single ) #2624
|
192 |
+
* Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681
|
193 |
+
* Fixed: Full excerpt length in single posts [swift] #2712
|
194 |
+
* Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
|
195 |
+
|
196 |
= 0.9.97.37 (23th February 2019) =
|
197 |
* Added: Static page template in AMP #2614 + #2900
|
198 |
* Fixed: Font size and other values are properly sanitizing #2898
|
accelerated-moblie-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
-
Version: 0.9.97.
|
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.97.
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
26 |
$ampforwp_slug = '';
|
@@ -870,4 +870,17 @@ function ampforwp_add_plugin_meta_links($meta_fields, $file) {
|
|
870 |
}
|
871 |
|
872 |
// AMPforWP Global Data variable
|
873 |
-
$ampforwp_data = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.97.38
|
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.97.38');
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
26 |
$ampforwp_slug = '';
|
870 |
}
|
871 |
|
872 |
// AMPforWP Global Data variable
|
873 |
+
$ampforwp_data = array();
|
874 |
+
|
875 |
+
// is_search_enabled_in_ampforwp function #2681
|
876 |
+
if( !function_exists( 'is_search_enabled_in_ampforwp' ) ) {
|
877 |
+
function is_search_enabled_in_ampforwp() {
|
878 |
+
global $redux_builder_amp;
|
879 |
+
if( ( $redux_builder_amp['amp-design-selector']==1 && $redux_builder_amp['amp-design-1-search-feature'] ) ||
|
880 |
+
( $redux_builder_amp['amp-design-selector']==2 && $redux_builder_amp['amp-design-2-search-feature'] ) ||
|
881 |
+
( $redux_builder_amp['amp-design-selector']==3 && $redux_builder_amp['amp-design-3-search-feature'] ) ) {
|
882 |
+
return true;
|
883 |
+
}
|
884 |
+
return false;
|
885 |
+
}
|
886 |
+
}
|
changelog.txt
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 0.9.97.37 (23th February 2019) =
|
4 |
* Added: Static page template in AMP #2614 + #2900
|
5 |
* Fixed: Font size and other values are properly sanitizing #2898
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 0.9.97.38 (28th February 2019) =
|
4 |
+
* Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
|
5 |
+
* Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
|
6 |
+
* Fixed: Issue with Post Pagination ( Single ) #2624
|
7 |
+
* Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681
|
8 |
+
* Fixed: Full excerpt length in single posts [swift] #2712
|
9 |
+
* Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
|
10 |
+
|
11 |
= 0.9.97.37 (23th February 2019) =
|
12 |
* Added: Static page template in AMP #2614 + #2900
|
13 |
* Fixed: Font size and other values are properly sanitizing #2898
|
includes/redirect.php
CHANGED
@@ -21,7 +21,7 @@ function ampforwp_check_amp_page_status() {
|
|
21 |
$redirection_location = trailingslashit($redirection_location );
|
22 |
|
23 |
$redirection_location = dirname($redirection_location);
|
24 |
-
wp_safe_redirect(
|
25 |
exit;
|
26 |
}
|
27 |
}
|
@@ -116,7 +116,7 @@ function ampforwp_check_amp_page_status() {
|
|
116 |
}
|
117 |
}
|
118 |
}
|
119 |
-
wp_safe_redirect(
|
120 |
exit;
|
121 |
|
122 |
}
|
@@ -275,7 +275,7 @@ function ampforwp_page_template_redirect() {
|
|
275 |
$_SESSION['ampforwp_amp_mode'] = 'mobile-on';
|
276 |
|
277 |
if ( $url_to_redirect ) {
|
278 |
-
wp_redirect(
|
279 |
exit();
|
280 |
}
|
281 |
|
21 |
$redirection_location = trailingslashit($redirection_location );
|
22 |
|
23 |
$redirection_location = dirname($redirection_location);
|
24 |
+
wp_safe_redirect( $redirection_location );
|
25 |
exit;
|
26 |
}
|
27 |
}
|
116 |
}
|
117 |
}
|
118 |
}
|
119 |
+
wp_safe_redirect( $redirection_location );
|
120 |
exit;
|
121 |
|
122 |
}
|
275 |
$_SESSION['ampforwp_amp_mode'] = 'mobile-on';
|
276 |
|
277 |
if ( $url_to_redirect ) {
|
278 |
+
wp_redirect( esc_url_raw($url_to_redirect) , 301 );
|
279 |
exit();
|
280 |
}
|
281 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
|
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 0.9.97.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -186,15 +186,12 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
186 |
|
187 |
== Changelog ==
|
188 |
|
189 |
-
= 0.9.97.
|
190 |
-
* Added:
|
191 |
-
* Fixed:
|
192 |
-
* Fixed:
|
193 |
-
* Fixed:
|
194 |
-
* Fixed:
|
195 |
-
* Fixed:
|
196 |
-
* Fixed: class are repeating number of times when image (icon) added in .svg format #2893
|
197 |
-
* Fixed: Debug warnings with WPML #2899
|
198 |
-
* Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
|
199 |
|
200 |
Full changelog available in changelog.txt
|
3 |
Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 5.1
|
7 |
+
Stable tag: 0.9.97.38
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
186 |
|
187 |
== Changelog ==
|
188 |
|
189 |
+
= 0.9.97.38 (28th February 2019) =
|
190 |
+
* Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
|
191 |
+
* Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
|
192 |
+
* Fixed: Issue with Post Pagination ( Single ) #2624
|
193 |
+
* Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681
|
194 |
+
* Fixed: Full excerpt length in single posts [swift] #2712
|
195 |
+
* Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
|
|
|
|
|
|
|
196 |
|
197 |
Full changelog available in changelog.txt
|
templates/design-manager/swift/single.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<?php amp_title(); ?>
|
12 |
<?php if( true == $redux_builder_amp['enable-excerpt-single'] ){ ?>
|
13 |
<div class="tl-exc">
|
14 |
-
<?php amp_excerpt(
|
15 |
</div>
|
16 |
<?php } ?>
|
17 |
</div>
|
11 |
<?php amp_title(); ?>
|
12 |
<?php if( true == $redux_builder_amp['enable-excerpt-single'] ){ ?>
|
13 |
<div class="tl-exc">
|
14 |
+
<?php amp_excerpt(250); ?>
|
15 |
</div>
|
16 |
<?php } ?>
|
17 |
</div>
|
templates/features.php
CHANGED
@@ -4666,7 +4666,7 @@ function ampforwp_post_paginated_content($content){
|
|
4666 |
$ampforwp_new_content = $ampforwp_the_content = $checker = '';
|
4667 |
$ampforwp_the_content = $content;
|
4668 |
$checker = preg_match('/<!--nextpage-->/', $ampforwp_the_content);
|
4669 |
-
if ( 1 === $checker ) {
|
4670 |
$multipage = 1;
|
4671 |
$ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
|
4672 |
$queried_var = get_query_var('page');
|
@@ -5844,7 +5844,7 @@ function ampforwp_minify_html_output($content_buffer){
|
|
5844 |
$asis = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/(\s)+' . $mod), array('>', '<', '\\1'), $asis);
|
5845 |
if ( $minify_html_comments != 'no' )
|
5846 |
$asis = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $asis);
|
5847 |
-
$asis = str_replace(array (chr(10), ' {', '{ ', ' }', '} ', '( ', ' )', ' :', ': ', ' ;', '; ', ' ,', ',
|
5848 |
}
|
5849 |
} else {
|
5850 |
$process = $split[$i];
|
@@ -6919,12 +6919,16 @@ function ampforwp_is_non_amp( $type="" ) {
|
|
6919 |
if ( is_home() && false == $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
|
6920 |
return false;
|
6921 |
}
|
|
|
|
|
|
|
|
|
6922 |
// Enabling AMP Takeover only when selected in Custom Post Type
|
6923 |
$supported_types_for_takeover = array();
|
6924 |
$supported_types_for_takeover = ampforwp_get_all_post_types();
|
6925 |
if( $supported_types_for_takeover ){
|
6926 |
$current_type = get_post_type(get_the_ID());
|
6927 |
-
if(!in_array($current_type, $supported_types_for_takeover) && !is_404()){
|
6928 |
return ;
|
6929 |
}
|
6930 |
}
|
@@ -7230,7 +7234,7 @@ function ampforwp_paginated_post_content($content){
|
|
7230 |
} else {
|
7231 |
$paged = 1;
|
7232 |
}
|
7233 |
-
if( $numpages >= 2 ){
|
7234 |
return get_the_content();
|
7235 |
}
|
7236 |
}
|
4666 |
$ampforwp_new_content = $ampforwp_the_content = $checker = '';
|
4667 |
$ampforwp_the_content = $content;
|
4668 |
$checker = preg_match('/<!--nextpage-->/', $ampforwp_the_content);
|
4669 |
+
if ( 1 === $checker && true == ampforwp_get_setting('amp-pagination') ) {
|
4670 |
$multipage = 1;
|
4671 |
$ampforwp_new_content = explode('<!--nextpage-->', $ampforwp_the_content);
|
4672 |
$queried_var = get_query_var('page');
|
5844 |
$asis = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/(\s)+' . $mod), array('>', '<', '\\1'), $asis);
|
5845 |
if ( $minify_html_comments != 'no' )
|
5846 |
$asis = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $asis);
|
5847 |
+
$asis = str_replace(array (chr(10), ' {', '{ ', ' }', '} ', '( ', ' )', ' :', ': ', ' ;', '; ', ' ,', ',', ';}'), array('', '{', '{', '}', '}', '(', ')', ':', ':', ';', ';', ',', ', ', '}'), $asis);
|
5848 |
}
|
5849 |
} else {
|
5850 |
$process = $split[$i];
|
6919 |
if ( is_home() && false == $redux_builder_amp['ampforwp-homepage-on-off-support'] ) {
|
6920 |
return false;
|
6921 |
}
|
6922 |
+
// Search #2681
|
6923 |
+
if ( is_search() && ( (4 == ampforwp_get_setting('amp-design-selector') && false == ampforwp_get_setting('amp-swift-search-feature') ) ) ){
|
6924 |
+
return false;
|
6925 |
+
}
|
6926 |
// Enabling AMP Takeover only when selected in Custom Post Type
|
6927 |
$supported_types_for_takeover = array();
|
6928 |
$supported_types_for_takeover = ampforwp_get_all_post_types();
|
6929 |
if( $supported_types_for_takeover ){
|
6930 |
$current_type = get_post_type(get_the_ID());
|
6931 |
+
if(!in_array($current_type, $supported_types_for_takeover) && !is_404() && !is_search()){
|
6932 |
return ;
|
6933 |
}
|
6934 |
}
|
7234 |
} else {
|
7235 |
$paged = 1;
|
7236 |
}
|
7237 |
+
if( $numpages >= 2 && true == ampforwp_get_setting('amp-pagination') ){
|
7238 |
return get_the_content();
|
7239 |
}
|
7240 |
}
|
templates/instant-articles/instant-article.php
CHANGED
@@ -18,7 +18,10 @@
|
|
18 |
<header>
|
19 |
<!-- title -->
|
20 |
<h1><?php the_title(); ?></h1>
|
21 |
-
|
|
|
|
|
|
|
22 |
<!-- kicker -->
|
23 |
<h3 class="op-kicker">
|
24 |
<?php $categories = get_the_category();
|
18 |
<header>
|
19 |
<!-- title -->
|
20 |
<h1><?php the_title(); ?></h1>
|
21 |
+
<?php if ( function_exists('tie_get_postdata') && tie_get_postdata( 'tie_post_sub_title' ) ) { ?>
|
22 |
+
<!-- Subtitle -->
|
23 |
+
<h2><?php echo esc_html(tie_get_postdata( 'tie_post_sub_title' )); ?></h2>
|
24 |
+
<?php } ?>
|
25 |
<!-- kicker -->
|
26 |
<h3 class="op-kicker">
|
27 |
<?php $categories = get_the_category();
|
templates/search-functions.php
CHANGED
@@ -96,18 +96,4 @@ function ampforwp_get_search_form() {
|
|
96 |
</form>';
|
97 |
return $form;
|
98 |
}
|
99 |
-
}
|
100 |
-
|
101 |
-
if( !function_exists( 'is_search_enabled_in_ampforwp' ) ) {
|
102 |
-
function is_search_enabled_in_ampforwp() {
|
103 |
-
global $redux_builder_amp;
|
104 |
-
if( ( $redux_builder_amp['amp-design-selector']==1 && $redux_builder_amp['amp-design-1-search-feature'] ) ||
|
105 |
-
( $redux_builder_amp['amp-design-selector']==2 && $redux_builder_amp['amp-design-2-search-feature'] ) ||
|
106 |
-
( $redux_builder_amp['amp-design-selector']==3 && $redux_builder_amp['amp-design-3-search-feature'] ) ) {
|
107 |
-
return true;
|
108 |
-
}
|
109 |
-
return false;
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
|
96 |
</form>';
|
97 |
return $form;
|
98 |
}
|
99 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|