Version Description
(7th May 2021) = * Improvements: Added Beaver builder Pagebuilder Support in AMP Pagebuilder Extension #5009 * Fixed: Title on Static Front Page is not displaying #5007 * Fixed: The attribute 'height' in tag 'amp-img' is set to the invalid value. #5005 * Fixed: ?amp doesnt removing from view non-amp text #5006 * Fixed: Errors in Schema Pro FAQ #4956 * Fixed: PHP Warning error when enable Breadcrumbs option #5008
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.76.17 |
Comparing to | |
See all releases |
Code changes from version 1.0.76.16 to 1.0.76.17
- README.md +9 -14
- accelerated-moblie-pages.php +2 -2
- changelog.txt +8 -0
- includes/features/pagebuilders-support/pagebuilders_support.php +27 -1
- includes/options/admin-config.php +2 -2
- includes/vendor/amp/includes/sanitizers/class-amp-base-sanitizer.php +3 -2
- readme.txt +9 -14
- templates/design-manager/design-2/elements/bread-crumbs.php +1 -1
- templates/design-manager/swift/page.php +1 -1
- templates/features.php +9 -5
README.md
CHANGED
@@ -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.7
|
7 |
-
Stable tag: 1.0.76.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -193,6 +193,14 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
193 |
|
194 |
== Changelog ==
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
= 1.0.76.16 (4th May 2021) =
|
197 |
* Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
|
198 |
* Fixed: Slide Anything Plugin text slider not working in AMP #4999
|
@@ -208,17 +216,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
208 |
* Fixed: Width in percentage not working for the audio from the Pennews Theme #4576
|
209 |
* Fixed: Need to allow two attributes in input tag #4998
|
210 |
|
211 |
-
= 1.0.76.14 (23rd April 2021) =
|
212 |
-
* Improvements: Added an option to add Schema Pro FAQ in AMP #4956
|
213 |
-
* Improvements: Added support for the audio from the Pennews Theme #4576
|
214 |
-
* Improvements: Added Getty Images embed Compatibility #4188
|
215 |
-
* Improvements: Added an option to move the search bar top and bottom. #4748
|
216 |
-
* Improvements: Added an option for autoplay in slider module of AMP pagebuilder #3859
|
217 |
-
* Improvements: Added an option to remove Site navigation element schema #4583
|
218 |
-
* Improvements: Added related posts after the last post for infinity scroll posts in AMP layout #4652
|
219 |
-
* Fixed: Call to undefined method MCI_Footnotes_Convert error #4993
|
220 |
-
* Fixed: Search bar close icon is hidden behind the admin navigation bar #4991
|
221 |
-
* Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
|
222 |
-
* Fixed: Single post content not showing when using AMP on subdomain #4996
|
223 |
-
|
224 |
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.7
|
7 |
+
Stable tag: 1.0.76.17
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
193 |
|
194 |
== Changelog ==
|
195 |
|
196 |
+
= 1.0.76.17 (7th May 2021) =
|
197 |
+
* Improvements: Added Beaver builder Pagebuilder Support in AMP Pagebuilder Extension #5009
|
198 |
+
* Fixed: Title on Static Front Page is not displaying #5007
|
199 |
+
* Fixed: The attribute 'height' in tag 'amp-img' is set to the invalid value. #5005
|
200 |
+
* Fixed: ?amp doesn’t removing from view non-amp text #5006
|
201 |
+
* Fixed: Errors in Schema Pro FAQ #4956
|
202 |
+
* Fixed: PHP Warning error when enable Breadcrumbs option #5008
|
203 |
+
|
204 |
= 1.0.76.16 (4th May 2021) =
|
205 |
* Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
|
206 |
* Fixed: Slide Anything Plugin text slider not working in AMP #4999
|
216 |
* Fixed: Width in percentage not working for the audio from the Pennews Theme #4576
|
217 |
* Fixed: Need to allow two attributes in input tag #4998
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
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: 1.0.76.
|
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.76.
|
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.76.17
|
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.76.17');
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
changelog.txt
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.76.16 (4th May 2021) =
|
4 |
* Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
|
5 |
* Fixed: Slide Anything Plugin text slider not working in AMP #4999
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.76.17 (7th May 2021) =
|
4 |
+
* Improvements: Added Beaver builder Pagebuilder Support in AMP Pagebuilder Extension #5009
|
5 |
+
* Fixed: Title on Static Front Page is not displaying #5007
|
6 |
+
* Fixed: The attribute 'height' in tag 'amp-img' is set to the invalid value. #5005
|
7 |
+
* Fixed: ?amp doesn’t removing from view non-amp text #5006
|
8 |
+
* Fixed: Errors in Schema Pro FAQ #4956
|
9 |
+
* Fixed: PHP Warning error when enable Breadcrumbs option #5008
|
10 |
+
|
11 |
= 1.0.76.16 (4th May 2021) =
|
12 |
* Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
|
13 |
* Fixed: Slide Anything Plugin text slider not working in AMP #4999
|
includes/features/pagebuilders-support/pagebuilders_support.php
CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit;
|
5 |
}
|
6 |
function ampforwp_page_builders_support_options($opt_name){
|
7 |
-
$divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = $avada_pb_for_ampchecker = $avia_pb_for_ampchecker = $oxygen_pb_for_ampchecker = $ux_pb_for_ampchecker = array();
|
8 |
if(!function_exists('amp_pagebuilder_compatibility_init')){
|
9 |
$divi_pb_for_ampchecker = array(
|
10 |
'id' => 'divi_pb_for_amp_info_normal',
|
@@ -58,6 +58,14 @@ if(!function_exists('amp_pagebuilder_compatibility_init')){
|
|
58 |
),
|
59 |
'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder compatibility For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
|
60 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
$pb_for_amp[] = array(
|
63 |
'id' => 'ampforwp-pagebuilder-accor',
|
@@ -183,6 +191,24 @@ if(!function_exists('amp_pagebuilder_compatibility_init')){
|
|
183 |
}
|
184 |
|
185 |
$pb_for_amp[] = $ux_pb_for_ampchecker;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
$pb_title = 'Page Builder';
|
187 |
$theme = wp_get_theme(); // gets the current theme
|
188 |
if( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ){
|
4 |
exit;
|
5 |
}
|
6 |
function ampforwp_page_builders_support_options($opt_name){
|
7 |
+
$divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = $avada_pb_for_ampchecker = $avia_pb_for_ampchecker = $oxygen_pb_for_ampchecker = $ux_pb_for_ampchecker = $beaver_builder_pb_for_ampchecker = array();
|
8 |
if(!function_exists('amp_pagebuilder_compatibility_init')){
|
9 |
$divi_pb_for_ampchecker = array(
|
10 |
'id' => 'divi_pb_for_amp_info_normal',
|
58 |
),
|
59 |
'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder compatibility For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
|
60 |
);
|
61 |
+
$beaver_builder_pb_for_ampchecker = array(
|
62 |
+
'id' => 'beaver_b_pb_for_amp_info_normal',
|
63 |
+
'type' => 'info',
|
64 |
+
'required' => array(
|
65 |
+
array('ampforwp-beaver-pb-for-amp', '=' , true),
|
66 |
+
),
|
67 |
+
'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder compatibility For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
|
68 |
+
);
|
69 |
}
|
70 |
$pb_for_amp[] = array(
|
71 |
'id' => 'ampforwp-pagebuilder-accor',
|
191 |
}
|
192 |
|
193 |
$pb_for_amp[] = $ux_pb_for_ampchecker;
|
194 |
+
if (is_plugin_active('beaver-builder-lite-version/fl-builder.php')) {
|
195 |
+
$pb_for_amp[] = array(
|
196 |
+
'id' => 'ampforwp-beaver-pb-for-amp-accor',
|
197 |
+
'type' => 'section',
|
198 |
+
'title' => esc_html__('Beaver Compatibility', 'accelerated-mobile-pages'),
|
199 |
+
'indent' => true,
|
200 |
+
'layout_type' => 'accordion',
|
201 |
+
'accordion-open'=> 1,
|
202 |
+
);
|
203 |
+
$pb_for_amp[] = array(
|
204 |
+
'id' => 'ampforwp-beaver-pb-for-amp',
|
205 |
+
'type' => 'switch',
|
206 |
+
'title' => esc_html__('Beaver Builder Support','accelerated-mobile-pages'),
|
207 |
+
'tooltip-subtitle' => esc_html__('Enable or Disable the Beaver support for AMP', 'accelerated-mobile-pages'),
|
208 |
+
'default' => false
|
209 |
+
);
|
210 |
+
}
|
211 |
+
$pb_for_amp[] = $beaver_builder_pb_for_ampchecker;
|
212 |
$pb_title = 'Page Builder';
|
213 |
$theme = wp_get_theme(); // gets the current theme
|
214 |
if( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ){
|
includes/options/admin-config.php
CHANGED
@@ -1154,8 +1154,8 @@ $freepro_listing = '
|
|
1154 |
</div><!-- /.pri-lst -->
|
1155 |
<div class="tru-us">
|
1156 |
<img src="'.AMPFORWP_IMAGE_DIR . '/rating.png" />
|
1157 |
-
<h2>Trusted by more that
|
1158 |
-
<p>More than
|
1159 |
<a href="https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/?filter=5" target="_blank">Read The Reviews</a>
|
1160 |
</div>
|
1161 |
</div><!--/ .amp-upg -->
|
1154 |
</div><!-- /.pri-lst -->
|
1155 |
<div class="tru-us">
|
1156 |
<img src="'.AMPFORWP_IMAGE_DIR . '/rating.png" />
|
1157 |
+
<h2>Trusted by more that 200000+ Users!</h2>
|
1158 |
+
<p>More than 200k Websites, Blogs & E-Commerce website are powered by our AMP making it the #1 Rated AMP plugin in WordPress Community.</p>
|
1159 |
<a href="https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/?filter=5" target="_blank">Read The Reviews</a>
|
1160 |
</div>
|
1161 |
</div><!--/ .amp-upg -->
|
includes/vendor/amp/includes/sanitizers/class-amp-base-sanitizer.php
CHANGED
@@ -48,8 +48,9 @@ abstract class AMP_Base_Sanitizer {
|
|
48 |
return $value;
|
49 |
}
|
50 |
|
51 |
-
|
52 |
-
|
|
|
53 |
}
|
54 |
|
55 |
if ( AMP_String_Utils::endswith( $value, 'px' ) ) {
|
48 |
return $value;
|
49 |
}
|
50 |
|
51 |
+
// Accepts both integers and floats & prevents negative values #5005
|
52 |
+
if ( is_numeric( $value ) ) {
|
53 |
+
return max( 0, (float) $value );
|
54 |
}
|
55 |
|
56 |
if ( AMP_String_Utils::endswith( $value, 'px' ) ) {
|
readme.txt
CHANGED
@@ -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.7
|
7 |
-
Stable tag: 1.0.76.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -190,6 +190,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
190 |
|
191 |
== Changelog ==
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
= 1.0.76.16 (4th May 2021) =
|
194 |
* Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
|
195 |
* Fixed: Slide Anything Plugin text slider not working in AMP #4999
|
@@ -205,17 +213,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
205 |
* Fixed: Width in percentage not working for the audio from the Pennews Theme #4576
|
206 |
* Fixed: Need to allow two attributes in input tag #4998
|
207 |
|
208 |
-
= 1.0.76.14 (23rd April 2021) =
|
209 |
-
* Improvements: Added an option to add Schema Pro FAQ in AMP #4956
|
210 |
-
* Improvements: Added support for the audio from the Pennews Theme #4576
|
211 |
-
* Improvements: Added Getty Images embed Compatibility #4188
|
212 |
-
* Improvements: Added an option to move the search bar top and bottom. #4748
|
213 |
-
* Improvements: Added an option for autoplay in slider module of AMP pagebuilder #3859
|
214 |
-
* Improvements: Added an option to remove Site navigation element schema #4583
|
215 |
-
* Improvements: Added related posts after the last post for infinity scroll posts in AMP layout #4652
|
216 |
-
* Fixed: Call to undefined method MCI_Footnotes_Convert error #4993
|
217 |
-
* Fixed: Search bar close icon is hidden behind the admin navigation bar #4991
|
218 |
-
* Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
|
219 |
-
* Fixed: Single post content not showing when using AMP on subdomain #4996
|
220 |
-
|
221 |
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.7
|
7 |
+
Stable tag: 1.0.76.17
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
190 |
|
191 |
== Changelog ==
|
192 |
|
193 |
+
= 1.0.76.17 (7th May 2021) =
|
194 |
+
* Improvements: Added Beaver builder Pagebuilder Support in AMP Pagebuilder Extension #5009
|
195 |
+
* Fixed: Title on Static Front Page is not displaying #5007
|
196 |
+
* Fixed: The attribute 'height' in tag 'amp-img' is set to the invalid value. #5005
|
197 |
+
* Fixed: ?amp doesn’t removing from view non-amp text #5006
|
198 |
+
* Fixed: Errors in Schema Pro FAQ #4956
|
199 |
+
* Fixed: PHP Warning error when enable Breadcrumbs option #5008
|
200 |
+
|
201 |
= 1.0.76.16 (4th May 2021) =
|
202 |
* Fixed: Incorrent height in anchor.fm audio embed from the Pennews Theme #4576
|
203 |
* Fixed: Slide Anything Plugin text slider not working in AMP #4999
|
213 |
* Fixed: Width in percentage not working for the audio from the Pennews Theme #4576
|
214 |
* Fixed: Need to allow two attributes in input tag #4998
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
templates/design-manager/design-2/elements/bread-crumbs.php
CHANGED
@@ -117,7 +117,7 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
117 |
// Get parent any categories and create array
|
118 |
$get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, '>'),'>');
|
119 |
if(class_exists( 'WPSEO_Options' )){
|
120 |
-
$primary_cateogory = get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_primary_category', true);
|
121 |
if(isset($primary_cateogory) && $primary_cateogory!=""){
|
122 |
$pcname = get_the_category_by_ID($primary_cateogory);
|
123 |
$category_name = $pcname;
|
117 |
// Get parent any categories and create array
|
118 |
$get_cat_parents = rtrim(get_category_parents($last_category->term_id, false, '>'),'>');
|
119 |
if(class_exists( 'WPSEO_Options' )){
|
120 |
+
$primary_cateogory = (string) get_post_meta(ampforwp_get_the_ID(), '_yoast_wpseo_primary_category', true);
|
121 |
if(isset($primary_cateogory) && $primary_cateogory!=""){
|
122 |
$pcname = get_the_category_by_ID($primary_cateogory);
|
123 |
$category_name = $pcname;
|
templates/design-manager/swift/page.php
CHANGED
@@ -11,7 +11,7 @@ amp_header(); ?>
|
|
11 |
<?php if ( is_page() && true == ampforwp_get_setting('ampforwp_pages_breadcrumbs') ) {
|
12 |
amp_breadcrumb();
|
13 |
}?>
|
14 |
-
<?php if ( is_page() && true == ampforwp_get_setting('ampforwp_pages_title') ) {
|
15 |
amp_title();
|
16 |
}?>
|
17 |
<?php } ?>
|
11 |
<?php if ( is_page() && true == ampforwp_get_setting('ampforwp_pages_breadcrumbs') ) {
|
12 |
amp_breadcrumb();
|
13 |
}?>
|
14 |
+
<?php if ( (is_page() && true == ampforwp_get_setting('ampforwp_pages_title')) || (ampforwp_is_front_page() && ampforwp_get_setting('ampforwp-title-on-front-page'))) {
|
15 |
amp_title();
|
16 |
}?>
|
17 |
<?php } ?>
|
templates/features.php
CHANGED
@@ -3973,7 +3973,11 @@ function ampforwp_view_nonamp(){
|
|
3973 |
$amp_url = ampforwp_amphtml_generator();
|
3974 |
$amp_url = explode('/', $amp_url);
|
3975 |
$amp_url = array_flip($amp_url);
|
3976 |
-
|
|
|
|
|
|
|
|
|
3977 |
$non_amp_url = array_flip($amp_url);
|
3978 |
$non_amp_url = implode('/', $non_amp_url);
|
3979 |
$query_arg_array = $wp->query_vars;
|
@@ -9428,14 +9432,14 @@ function ampforwp_schema_pro_faq_block($content_buffer){
|
|
9428 |
if (!function_exists('on_bsf_aiosrs_pro_activate')) {
|
9429 |
return $content_buffer;
|
9430 |
}
|
9431 |
-
preg_match_all('/<
|
9432 |
if(is_array($matches)){
|
9433 |
$schema = array();
|
9434 |
$schema['@context'] = 'https://schema.org';
|
9435 |
$schema['type'] = 'FAQPage';
|
9436 |
-
for($i=0;$i<count($matches[
|
9437 |
-
$questions = $matches[
|
9438 |
-
$answers = $matches[
|
9439 |
foreach ( $questions as $key => $question ) {
|
9440 |
$schema['mainEntity'][ $key ]['@type'] = 'Question';
|
9441 |
$schema['mainEntity'][ $key ]['name'] = $question;
|
3973 |
$amp_url = ampforwp_amphtml_generator();
|
3974 |
$amp_url = explode('/', $amp_url);
|
3975 |
$amp_url = array_flip($amp_url);
|
3976 |
+
$endpoint = AMPFORWP_AMP_QUERY_VAR;
|
3977 |
+
if (ampforwp_get_setting('amp-core-end-point')) {
|
3978 |
+
$endpoint = '?'. $endpoint;
|
3979 |
+
}
|
3980 |
+
unset($amp_url[$endpoint]);
|
3981 |
$non_amp_url = array_flip($amp_url);
|
3982 |
$non_amp_url = implode('/', $non_amp_url);
|
3983 |
$query_arg_array = $wp->query_vars;
|
9432 |
if (!function_exists('on_bsf_aiosrs_pro_activate')) {
|
9433 |
return $content_buffer;
|
9434 |
}
|
9435 |
+
preg_match_all('/<div class="wp-block-wpsp-faq(.*?)class="wpsp-question">(.*?)<\/(.*?)>(.*?)class="wpsp-faq-content"><span><p>(.*?)<\/p>/', $content_buffer, $matches);
|
9436 |
if(is_array($matches)){
|
9437 |
$schema = array();
|
9438 |
$schema['@context'] = 'https://schema.org';
|
9439 |
$schema['type'] = 'FAQPage';
|
9440 |
+
for($i=0;$i<count($matches[2]);$i++){
|
9441 |
+
$questions = $matches[2];
|
9442 |
+
$answers = $matches[5];
|
9443 |
foreach ( $questions as $key => $question ) {
|
9444 |
$schema['mainEntity'][ $key ]['@type'] = 'Question';
|
9445 |
$schema['mainEntity'][ $key ]['name'] = $question;
|