Version Description
(23rd April 2021) = * Improvements: Added an option to add Schema Pro FAQ in AMP #4956 * Improvements: Added support for the audio from the Pennews Theme #4576 * Improvements: Added Getty Images embed Compatibility #4188 * Improvements: Added an option to move the search bar top and bottom. #4748 * Improvements: Added an option for autoplay in slider module of AMP pagebuilder #3859 * Improvements: Added an option to remove Site navigation element schema #4583 * Improvements: Added related posts after the last post for infinity scroll posts in AMP layout #4652 * Fixed: Call to undefined method MCI_Footnotes_Convert error #4993 * Fixed: Search bar close icon is hidden behind the admin navigation bar #4991 * Fixed: AMP menu automatically scrolls down to bottom in Design three #4967 * Fixed: Single post content not showing when using AMP on subdomain #4996
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.76.14 |
Comparing to | |
See all releases |
Code changes from version 1.0.76.13 to 1.0.76.14
- README.md +14 -10
- accelerated-moblie-pages.php +2 -2
- changelog.txt +13 -0
- classes/class-ampforwp-infinite-scroll.php +1 -1
- includes/features/functions.php +4 -1
- includes/features/structure-data/structured-data-functions.php +1 -1
- includes/features/structure-data/structured-data-options.php +7 -0
- includes/options/admin-config.php +16 -0
- includes/thirdparty-compatibility.php +7 -0
- pagebuilder/modules/slider-mod-module.php +15 -1
- readme.txt +14 -10
- templates/design-manager/design-3/header-bar.php +1 -1
- templates/design-manager/swift/header.php +18 -4
- templates/design-manager/swift/style.php +1 -0
- templates/features.php +108 -1
@@ -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,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
193 |
|
194 |
== Changelog ==
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
= 1.0.76.13 (19th April 2021) =
|
197 |
* Improvements: Added an option to preserve original permalinks in mobile redirection #4207
|
198 |
* Improvements: Added an option to add moderation tool for the Facebook comments #4485
|
@@ -205,13 +218,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
205 |
= 1.0.76.12(14th April 2021) =
|
206 |
* Fixed: Fatal error occuring with the recent update Version 1.0.76.11 #4986
|
207 |
|
208 |
-
= 1.0.76.11 (14th April 2021) =
|
209 |
-
* Improvements: Added an option to select same categories in infinite scroll #4017
|
210 |
-
* Improvements: Added an option to select same tags in infinite scroll #4939
|
211 |
-
* Improvements: Added the filter to change breadcrumbs name #4979
|
212 |
-
* Fixed: Muffin pagebuilder not working in AMP #4983
|
213 |
-
* Fixed: PHP 8 debug errors #4981
|
214 |
-
* Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
|
215 |
-
* Fixed: Deprecated Filters Detected Warning in All in one SEO plugin #4980
|
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.7
|
7 |
+
Stable tag: 1.0.76.14
|
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.14 (23rd April 2021) =
|
197 |
+
* Improvements: Added an option to add Schema Pro FAQ in AMP #4956
|
198 |
+
* Improvements: Added support for the audio from the Pennews Theme #4576
|
199 |
+
* Improvements: Added Getty Images embed Compatibility #4188
|
200 |
+
* Improvements: Added an option to move the search bar top and bottom. #4748
|
201 |
+
* Improvements: Added an option for autoplay in slider module of AMP pagebuilder #3859
|
202 |
+
* Improvements: Added an option to remove Site navigation element schema #4583
|
203 |
+
* Improvements: Added related posts after the last post for infinity scroll posts in AMP layout #4652
|
204 |
+
* Fixed: Call to undefined method MCI_Footnotes_Convert error #4993
|
205 |
+
* Fixed: Search bar close icon is hidden behind the admin navigation bar #4991
|
206 |
+
* Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
|
207 |
+
* Fixed: Single post content not showing when using AMP on subdomain #4996
|
208 |
+
|
209 |
= 1.0.76.13 (19th April 2021) =
|
210 |
* Improvements: Added an option to preserve original permalinks in mobile redirection #4207
|
211 |
* Improvements: Added an option to add moderation tool for the Facebook comments #4485
|
218 |
= 1.0.76.12(14th April 2021) =
|
219 |
* Fixed: Fatal error occuring with the recent update Version 1.0.76.11 #4986
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
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.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.14
|
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.14');
|
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.76.13 (19th April 2021) =
|
4 |
* Improvements: Added an option to preserve original permalinks in mobile redirection #4207
|
5 |
* Improvements: Added an option to add moderation tool for the Facebook comments #4485
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.76.14 (23rd April 2021) =
|
4 |
+
* Improvements: Added an option to add Schema Pro FAQ in AMP #4956
|
5 |
+
* Improvements: Added support for the audio from the Pennews Theme #4576
|
6 |
+
* Improvements: Added Getty Images embed Compatibility #4188
|
7 |
+
* Improvements: Added an option to move the search bar top and bottom. #4748
|
8 |
+
* Improvements: Added an option for autoplay in slider module of AMP pagebuilder #3859
|
9 |
+
* Improvements: Added an option to remove Site navigation element schema #4583
|
10 |
+
* Improvements: Added related posts after the last post for infinity scroll posts in AMP layout #4652
|
11 |
+
* Fixed: Call to undefined method MCI_Footnotes_Convert error #4993
|
12 |
+
* Fixed: Search bar close icon is hidden behind the admin navigation bar #4991
|
13 |
+
* Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
|
14 |
+
* Fixed: Single post content not showing when using AMP on subdomain #4996
|
15 |
+
|
16 |
= 1.0.76.13 (19th April 2021) =
|
17 |
* Improvements: Added an option to preserve original permalinks in mobile redirection #4207
|
18 |
* Improvements: Added an option to add moderation tool for the Facebook comments #4485
|
@@ -25,7 +25,7 @@ if( ! class_exists('AMPforWP_Infinite_Scroll') ) {
|
|
25 |
// amp-next-page script
|
26 |
add_filter('ampforwp_post_template_data', array( $this , 'amp_infinite_scroll_script') );
|
27 |
// amp-next-page tag
|
28 |
-
if ( 4 != ampforwp_get_setting('amp-design-selector') )
|
29 |
add_action('ampforwp_above_related_post', array( $this , 'amp_next_page') );
|
30 |
else
|
31 |
add_action('ampforwp_single_design_type_handle', array( $this , 'amp_next_page') );
|
25 |
// amp-next-page script
|
26 |
add_filter('ampforwp_post_template_data', array( $this , 'amp_infinite_scroll_script') );
|
27 |
// amp-next-page tag
|
28 |
+
if ( 4 != ampforwp_get_setting('amp-design-selector') || (class_exists('AmpforwpAmpLayouts')) && 3 == ampforwp_get_setting('single-design-type') )
|
29 |
add_action('ampforwp_above_related_post', array( $this , 'amp_next_page') );
|
30 |
else
|
31 |
add_action('ampforwp_single_design_type_handle', array( $this , 'amp_next_page') );
|
@@ -237,7 +237,10 @@ function ampforwp_the_content_filter_full( $content_buffer ) {
|
|
237 |
// Compatibility with the footnotes plugin. #2447
|
238 |
if(class_exists('MCI_Footnotes')){
|
239 |
$footnote_collapse_link = '';
|
240 |
-
$footnote_collapse =
|
|
|
|
|
|
|
241 |
if( $footnote_collapse == true ){
|
242 |
$footnote_collapse_link = 'on="tap:footnote_references_container.show" role="click" tabindex="1" ';
|
243 |
$content_buffer = preg_replace( '/<div id=(.*?)footnote_references_container(.*?)\s/m','<div id=$1footnote_references_container$2 hidden ',$content_buffer);
|
237 |
// Compatibility with the footnotes plugin. #2447
|
238 |
if(class_exists('MCI_Footnotes')){
|
239 |
$footnote_collapse_link = '';
|
240 |
+
$footnote_collapse = false;
|
241 |
+
if (method_exists('MCI_Footnotes_Convert', 'toBool')) {
|
242 |
+
$footnote_collapse = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE));
|
243 |
+
}
|
244 |
if( $footnote_collapse == true ){
|
245 |
$footnote_collapse_link = 'on="tap:footnote_references_container.show" role="click" tabindex="1" ';
|
246 |
$content_buffer = preg_replace( '/<div id=(.*?)footnote_references_container(.*?)\s/m','<div id=$1footnote_references_container$2 hidden ',$content_buffer);
|
@@ -495,7 +495,7 @@ function ampforwp_sd_sitenavigation(){
|
|
495 |
}
|
496 |
echo '<script type="application/ld+json">' . json_encode($schema) . "</script>";
|
497 |
}
|
498 |
-
if ( ! class_exists('saswp_fields_generator') ) {
|
499 |
$input = array();
|
500 |
$navObj = array();
|
501 |
$ampforwp_sd_menu = get_transient('ampforwp_sd_menu');
|
495 |
}
|
496 |
echo '<script type="application/ld+json">' . json_encode($schema) . "</script>";
|
497 |
}
|
498 |
+
if ( ! class_exists('saswp_fields_generator') && ampforwp_get_setting('ampforwp-sd-navigation-schema')) {
|
499 |
$input = array();
|
500 |
$navObj = array();
|
501 |
$ampforwp_sd_menu = get_transient('ampforwp_sd_menu');
|
@@ -117,6 +117,13 @@ function ampforwp_add_sd_fields($fields){
|
|
117 |
'default' => 'BlogPosting',
|
118 |
'required'=>array('ampforwp-sd-switch','=','1'),
|
119 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
$fields[] = array(
|
121 |
'id' => 'ampforwp-sd_2',
|
122 |
'type' => 'section',
|
117 |
'default' => 'BlogPosting',
|
118 |
'required'=>array('ampforwp-sd-switch','=','1'),
|
119 |
);
|
120 |
+
$fields[] = array(
|
121 |
+
'id' => 'ampforwp-sd-navigation-schema',
|
122 |
+
'type' => 'switch',
|
123 |
+
'title' => esc_html__('Site Navigation Schema', 'accelerated-mobile-pages'),
|
124 |
+
'tooltip-subtitle' => esc_html__('Enable or disable site navigation schema', 'accelerated-mobile-pages'),
|
125 |
+
'default' => 1,
|
126 |
+
);
|
127 |
$fields[] = array(
|
128 |
'id' => 'ampforwp-sd_2',
|
129 |
'type' => 'section',
|
@@ -4395,6 +4395,22 @@ Redux::setSection( $opt_name, array(
|
|
4395 |
),
|
4396 |
'default' => '1'
|
4397 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4398 |
array(
|
4399 |
'id' => 'amp-swift-menu-cprt',
|
4400 |
'type' => 'switch',
|
4395 |
),
|
4396 |
'default' => '1'
|
4397 |
),
|
4398 |
+
array(
|
4399 |
+
'id' => 'menu-search-after-menu',
|
4400 |
+
'class' => 'child_opt child_opt_arrow',
|
4401 |
+
'type' => 'switch',
|
4402 |
+
'title' => esc_html__('After Menu', 'accelerated-mobile-pages'),
|
4403 |
+
'required' => array('menu-search', '=' , '1'),
|
4404 |
+
'default' => '1'
|
4405 |
+
),
|
4406 |
+
array(
|
4407 |
+
'id' => 'menu-search-before-menu',
|
4408 |
+
'class' => 'child_opt child_opt_arrow',
|
4409 |
+
'type' => 'switch',
|
4410 |
+
'title' => esc_html__('Before Menu', 'accelerated-mobile-pages'),
|
4411 |
+
'required' => array('menu-search', '=' , '1'),
|
4412 |
+
'default' => '0'
|
4413 |
+
),
|
4414 |
array(
|
4415 |
'id' => 'amp-swift-menu-cprt',
|
4416 |
'type' => 'switch',
|
@@ -71,6 +71,10 @@ function ampforwp_thirdparty_compatibility(){
|
|
71 |
if(class_exists('FinalTiles_Gallery')){
|
72 |
add_filter('wp_is_mobile','ampforwp_final_tiles_grid_gallery');
|
73 |
}
|
|
|
|
|
|
|
|
|
74 |
$yoast_canonical = $yoast_canonical_post = $yoast_canonical_page = '';
|
75 |
$yoast_canonical = get_option( 'wpseo_titles' );
|
76 |
if(isset($yoast_canonical['noindex-post'])){
|
@@ -1214,6 +1218,9 @@ function ampforwp_is_amp_inURL($url){
|
|
1214 |
if(get_option('permalink_structure') == '' && isset($_GET['amp'])){
|
1215 |
return true;
|
1216 |
}
|
|
|
|
|
|
|
1217 |
$urlArray = explode("/", $url);
|
1218 |
if( !in_array( AMPFORWP_AMP_QUERY_VAR , $urlArray ) ) {
|
1219 |
return false;
|
71 |
if(class_exists('FinalTiles_Gallery')){
|
72 |
add_filter('wp_is_mobile','ampforwp_final_tiles_grid_gallery');
|
73 |
}
|
74 |
+
if(class_exists('Getty_Images')){
|
75 |
+
add_filter( 'embed_oembed_html', 'ampforwp_get_gitty_image_embed',10,4);
|
76 |
+
add_filter( 'ampforwp_the_content_last_filter','ampforwp_getty_image_compatibility',10);
|
77 |
+
}
|
78 |
$yoast_canonical = $yoast_canonical_post = $yoast_canonical_page = '';
|
79 |
$yoast_canonical = get_option( 'wpseo_titles' );
|
80 |
if(isset($yoast_canonical['noindex-post'])){
|
1218 |
if(get_option('permalink_structure') == '' && isset($_GET['amp'])){
|
1219 |
return true;
|
1220 |
}
|
1221 |
+
if (class_exists('AMPforWP_Subdomain_Endpoint') && ampforwp_get_setting('amp-subdomain-url-format')) {
|
1222 |
+
return true;
|
1223 |
+
}
|
1224 |
$urlArray = explode("/", $url);
|
1225 |
if( !in_array( AMPFORWP_AMP_QUERY_VAR , $urlArray ) ) {
|
1226 |
return false;
|
@@ -5,7 +5,7 @@ $output = '
|
|
5 |
<div {{if_id}}id="{{id}}"{{ifend_id}} class="{{user_class}}">
|
6 |
{{if_condition_carousel_layout_type==1}}
|
7 |
<amp-carousel {{if_condition_lightbox_gallery==1}} lightbox {{ifend_condition_lightbox_gallery_1}}
|
8 |
-
width="400" height="300" layout="responsive" type="slides" autoplay delay="{{delay}}">
|
9 |
{{repeater_image}}
|
10 |
</amp-carousel>
|
11 |
{{ifend_condition_carousel_layout_type_1}}
|
@@ -103,6 +103,20 @@ return array(
|
|
103 |
),
|
104 |
'content_type'=>'html',
|
105 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
array(
|
107 |
'type' =>'checkbox_bool',
|
108 |
'name' =>"lightbox_gallery",
|
5 |
<div {{if_id}}id="{{id}}"{{ifend_id}} class="{{user_class}}">
|
6 |
{{if_condition_carousel_layout_type==1}}
|
7 |
<amp-carousel {{if_condition_lightbox_gallery==1}} lightbox {{ifend_condition_lightbox_gallery_1}}
|
8 |
+
width="400" height="300" layout="responsive" type="slides" {{if_condition_slider_autoplay==1}} autoplay {{ifend_condition_slider_autoplay_1}} controls delay="{{delay}}">
|
9 |
{{repeater_image}}
|
10 |
</amp-carousel>
|
11 |
{{ifend_condition_carousel_layout_type_1}}
|
103 |
),
|
104 |
'content_type'=>'html',
|
105 |
),
|
106 |
+
array(
|
107 |
+
'type' => 'checkbox_bool',
|
108 |
+
'name' => "slider_autoplay",
|
109 |
+
'tab' => 'customizer',
|
110 |
+
'label' => 'Autoplay',
|
111 |
+
'default' => 1,
|
112 |
+
'content_type'=> 'html',
|
113 |
+
'options' => array(
|
114 |
+
array(
|
115 |
+
'label'=>esc_html__('Autoplay','accelerated-mobile-pages'),
|
116 |
+
'value'=>1,
|
117 |
+
),
|
118 |
+
),
|
119 |
+
),
|
120 |
array(
|
121 |
'type' =>'checkbox_bool',
|
122 |
'name' =>"lightbox_gallery",
|
@@ -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,19 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
190 |
|
191 |
== Changelog ==
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
= 1.0.76.13 (19th April 2021) =
|
194 |
* Improvements: Added an option to preserve original permalinks in mobile redirection #4207
|
195 |
* Improvements: Added an option to add moderation tool for the Facebook comments #4485
|
@@ -202,13 +215,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
202 |
= 1.0.76.12 (14th April 2021) =
|
203 |
* Fixed: Fatal error occuring with the recent update Version 1.0.76.11 #4986
|
204 |
|
205 |
-
= 1.0.76.11 (14th April 2021) =
|
206 |
-
* Improvements: Added an option to select same categories in infinite scroll #4017
|
207 |
-
* Improvements: Added an option to select same tags in infinite scroll #4939
|
208 |
-
* Improvements: Added the filter to change breadcrumbs name #4979
|
209 |
-
* Fixed: Muffin pagebuilder not working in AMP #4983
|
210 |
-
* Fixed: PHP 8 debug errors #4981
|
211 |
-
* Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
|
212 |
-
* Fixed: Deprecated Filters Detected Warning in All in one SEO plugin #4980
|
213 |
-
|
214 |
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.14
|
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.14 (23rd April 2021) =
|
194 |
+
* Improvements: Added an option to add Schema Pro FAQ in AMP #4956
|
195 |
+
* Improvements: Added support for the audio from the Pennews Theme #4576
|
196 |
+
* Improvements: Added Getty Images embed Compatibility #4188
|
197 |
+
* Improvements: Added an option to move the search bar top and bottom. #4748
|
198 |
+
* Improvements: Added an option for autoplay in slider module of AMP pagebuilder #3859
|
199 |
+
* Improvements: Added an option to remove Site navigation element schema #4583
|
200 |
+
* Improvements: Added related posts after the last post for infinity scroll posts in AMP layout #4652
|
201 |
+
* Fixed: Call to undefined method MCI_Footnotes_Convert error #4993
|
202 |
+
* Fixed: Search bar close icon is hidden behind the admin navigation bar #4991
|
203 |
+
* Fixed: AMP menu automatically scrolls down to bottom in Design three #4967
|
204 |
+
* Fixed: Single post content not showing when using AMP on subdomain #4996
|
205 |
+
|
206 |
= 1.0.76.13 (19th April 2021) =
|
207 |
* Improvements: Added an option to preserve original permalinks in mobile redirection #4207
|
208 |
* Improvements: Added an option to add moderation tool for the Facebook comments #4485
|
215 |
= 1.0.76.12 (14th April 2021) =
|
216 |
* Fixed: Fatal error occuring with the recent update Version 1.0.76.11 #4986
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -90,7 +90,7 @@ if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforw
|
|
90 |
</ul>
|
91 |
</div>
|
92 |
</div>
|
93 |
-
<
|
94 |
</amp-sidebar>
|
95 |
<?php } ?>
|
96 |
<div id="designthree" class="designthree main_container">
|
90 |
</ul>
|
91 |
</div>
|
92 |
</div>
|
93 |
+
<div on='tap:sidebar.toggle' role="button" class="cl-btn" tabindex="initial"></div>
|
94 |
</amp-sidebar>
|
95 |
<?php } ?>
|
96 |
<div id="designthree" class="designthree main_container">
|
@@ -26,7 +26,11 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
|
|
26 |
<div class="menu-heading clearfix">
|
27 |
<label for="offcanvas-menu" class="c-btn"></label>
|
28 |
</div><!--end menu-heading-->
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
<?php if ( amp_menu(false) ) : ?>
|
31 |
<nav class="m-menu">
|
32 |
<?php amp_menu();?>
|
@@ -34,7 +38,7 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
|
|
34 |
<?php endif; ?>
|
35 |
<?php do_action('ampforwp_after_amp_menu');?>
|
36 |
|
37 |
-
<?php if (
|
38 |
<div class="m-srch">
|
39 |
<?php amp_search();?>
|
40 |
</div>
|
@@ -162,6 +166,11 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
|
|
162 |
<div class="menu-heading clearfix">
|
163 |
<label for="offcanvas-menu" class="c-btn"></label>
|
164 |
</div><!--end menu-heading-->
|
|
|
|
|
|
|
|
|
|
|
165 |
<?php if ( amp_menu(false) ) : ?>
|
166 |
<nav class="m-menu">
|
167 |
<?php amp_menu();?>
|
@@ -173,7 +182,7 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
|
|
173 |
<a target="_blank" <?php ampforwp_nofollow_cta_header_link(); ?> href="<?php echo esc_url(ampforwp_get_setting('signin-button-link'))?>"><?php echo esc_html__(ampforwp_get_setting('signin-button-text'), 'accelerated-mobile-pages'); ?></a>
|
174 |
</div>
|
175 |
<?php } ?>
|
176 |
-
<?php if (
|
177 |
<div class="m-srch">
|
178 |
<?php amp_search();?>
|
179 |
</div>
|
@@ -293,13 +302,18 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
|
|
293 |
<div class="menu-heading clearfix">
|
294 |
<label for="offcanvas-menu" class="c-btn"></label>
|
295 |
</div><!--end menu-heading-->
|
|
|
|
|
|
|
|
|
|
|
296 |
<?php if ( amp_menu(false) ) : ?>
|
297 |
<nav class="m-menu">
|
298 |
<?php amp_menu();?>
|
299 |
</nav><!--end slide-menu -->
|
300 |
<?php endif; ?>
|
301 |
<?php do_action('ampforwp_after_amp_menu');?>
|
302 |
-
<?php if (
|
303 |
<div class="m-srch">
|
304 |
<?php amp_search();?>
|
305 |
</div>
|
26 |
<div class="menu-heading clearfix">
|
27 |
<label for="offcanvas-menu" class="c-btn"></label>
|
28 |
</div><!--end menu-heading-->
|
29 |
+
<?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-before-menu') ){ ?>
|
30 |
+
<div class="m-srch">
|
31 |
+
<?php amp_search();?>
|
32 |
+
</div>
|
33 |
+
<?php } ?>
|
34 |
<?php if ( amp_menu(false) ) : ?>
|
35 |
<nav class="m-menu">
|
36 |
<?php amp_menu();?>
|
38 |
<?php endif; ?>
|
39 |
<?php do_action('ampforwp_after_amp_menu');?>
|
40 |
|
41 |
+
<?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-after-menu') ){ ?>
|
42 |
<div class="m-srch">
|
43 |
<?php amp_search();?>
|
44 |
</div>
|
166 |
<div class="menu-heading clearfix">
|
167 |
<label for="offcanvas-menu" class="c-btn"></label>
|
168 |
</div><!--end menu-heading-->
|
169 |
+
<?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-before-menu') ){ ?>
|
170 |
+
<div class="m-srch">
|
171 |
+
<?php amp_search();?>
|
172 |
+
</div>
|
173 |
+
<?php } ?>
|
174 |
<?php if ( amp_menu(false) ) : ?>
|
175 |
<nav class="m-menu">
|
176 |
<?php amp_menu();?>
|
182 |
<a target="_blank" <?php ampforwp_nofollow_cta_header_link(); ?> href="<?php echo esc_url(ampforwp_get_setting('signin-button-link'))?>"><?php echo esc_html__(ampforwp_get_setting('signin-button-text'), 'accelerated-mobile-pages'); ?></a>
|
183 |
</div>
|
184 |
<?php } ?>
|
185 |
+
<?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-after-menu') ){ ?>
|
186 |
<div class="m-srch">
|
187 |
<?php amp_search();?>
|
188 |
</div>
|
302 |
<div class="menu-heading clearfix">
|
303 |
<label for="offcanvas-menu" class="c-btn"></label>
|
304 |
</div><!--end menu-heading-->
|
305 |
+
<?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-before-menu') ){ ?>
|
306 |
+
<div class="m-srch">
|
307 |
+
<?php amp_search();?>
|
308 |
+
</div>
|
309 |
+
<?php } ?>
|
310 |
<?php if ( amp_menu(false) ) : ?>
|
311 |
<nav class="m-menu">
|
312 |
<?php amp_menu();?>
|
313 |
</nav><!--end slide-menu -->
|
314 |
<?php endif; ?>
|
315 |
<?php do_action('ampforwp_after_amp_menu');?>
|
316 |
+
<?php if (ampforwp_get_setting('menu-search' ) && ampforwp_get_setting('menu-search-after-menu') ){ ?>
|
317 |
<div class="m-srch">
|
318 |
<?php amp_search();?>
|
319 |
</div>
|
@@ -225,6 +225,7 @@ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
|
|
225 |
.lb-t:target {opacity: 1;top: 0;bottom: 0;left:0;z-index:2;}
|
226 |
.lb-t:target img {max-height: 100%;max-width: 100%;}
|
227 |
.lb-t:target a.lb-x {top: 25px;}
|
|
|
228 |
.lb img{cursor:pointer;}
|
229 |
.lb-btn form{position: absolute;top: 200px;left: 0;right: 0;margin: 0 auto;text-align: center;}
|
230 |
.lb-btn .s{padding:10px;}
|
225 |
.lb-t:target {opacity: 1;top: 0;bottom: 0;left:0;z-index:2;}
|
226 |
.lb-t:target img {max-height: 100%;max-width: 100%;}
|
227 |
.lb-t:target a.lb-x {top: 25px;}
|
228 |
+
<?php if ( is_admin_bar_showing() ) {?>.lb-t:target a.lb-x {top: 70px;}<?php } ?>
|
229 |
.lb img{cursor:pointer;}
|
230 |
.lb-btn form{position: absolute;top: 200px;left: 0;right: 0;margin: 0 auto;text-align: center;}
|
231 |
.lb-btn .s{padding:10px;}
|
@@ -9420,4 +9420,111 @@ function ampforwp_facebook_moderation_tool(){
|
|
9420 |
}
|
9421 |
}
|
9422 |
}
|
9423 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9420 |
}
|
9421 |
}
|
9422 |
}
|
9423 |
+
}
|
9424 |
+
|
9425 |
+
//Schema Pro FAQ block compatibility #4956
|
9426 |
+
add_filter('ampforwp_modify_the_content','ampforwp_schema_pro_faq_block');
|
9427 |
+
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('/<span class="wpsp-question">(.*?)<\/span>(.*?)class="wpsp-faq-content"><span><p>(.*?)<\/p>/', $content_buffer, $matches);
|
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[1]);$i++){
|
9437 |
+
$questions = $matches[1];
|
9438 |
+
$answers = $matches[3];
|
9439 |
+
foreach ( $questions as $key => $question ) {
|
9440 |
+
$schema['mainEntity'][ $key ]['@type'] = 'Question';
|
9441 |
+
$schema['mainEntity'][ $key ]['name'] = $question;
|
9442 |
+
}
|
9443 |
+
foreach ( $answers as $key => $answer ) {
|
9444 |
+
$schema['mainEntity'][ $key ]['acceptedAnswer']['@type'] = 'Answer';
|
9445 |
+
$schema['mainEntity'][ $key ]['acceptedAnswer']['text'] = $answer;
|
9446 |
+
}
|
9447 |
+
}
|
9448 |
+
$schema = '<script type="application/ld+json">'.wp_json_encode( $schema, JSON_UNESCAPED_UNICODE ).'</script>';
|
9449 |
+
$content_buffer = preg_replace('/(<div class="wp-block-wpsp-faq\s(.*?)<\/div>)/s', ''.$schema.'$1', $content_buffer);
|
9450 |
+
}
|
9451 |
+
return $content_buffer;
|
9452 |
+
}
|
9453 |
+
|
9454 |
+
function ampforwp_get_gitty_image_embed( $html, $url, $attr, $post_ID ) {
|
9455 |
+
global $getty_img_content;
|
9456 |
+
$getty_img_content[] = $html;
|
9457 |
+
return $html;
|
9458 |
+
}
|
9459 |
+
|
9460 |
+
function ampforwp_getty_image_compatibility($content){
|
9461 |
+
global $getty_img_content;
|
9462 |
+
if(is_array($getty_img_content)){
|
9463 |
+
if(preg_match_all('/<a id="(.*?)"\sclass="gie-single(.*?)">Embed from Getty Images<\/a>/', $content, $matches)){
|
9464 |
+
if(isset($matches[0])){
|
9465 |
+
for($i=0;$i<count($matches[0]);$i++){
|
9466 |
+
$full_content = $matches[0][$i];
|
9467 |
+
$img_id = $matches[1][$i];
|
9468 |
+
if(isset($getty_img_content[$i])){
|
9469 |
+
if(preg_match('/gie\.widgets\.load\({id:\'(.*?)\',sig:\'(.*?)\',w:\'(.*?)\',h:\'(.*?)\',items:\'(.*?)\'/',$getty_img_content[$i],$match)){
|
9470 |
+
if(isset($match[1]) && isset($match[2]) && isset($match[3]) && isset($match[4]) && isset($match[5])){
|
9471 |
+
$image_id = $match[1];
|
9472 |
+
$image_key = $match[2];
|
9473 |
+
$width = $match[3];
|
9474 |
+
$height = $match[4];
|
9475 |
+
$img_emb_id = $match[5];
|
9476 |
+
$iframe = '<iframe src="//embed.gettyimages.com/embed/'.esc_attr($img_emb_id).'?et='.esc_attr($image_id).'&tld=com&sig='.esc_attr($image_key).'&caption=false&ver=2" scrolling="no" frameborder="0" width="'.esc_attr($width).'" height="'.esc_attr($height).'"></iframe>';
|
9477 |
+
$description = get_the_archive_description();
|
9478 |
+
$sanitizer = new AMPFORWP_Content( $iframe, array(),
|
9479 |
+
apply_filters( 'ampforwp_content_sanitizers',
|
9480 |
+
array(
|
9481 |
+
'AMP_Style_Sanitizer' => array(),
|
9482 |
+
'AMP_Blacklist_Sanitizer' => array(),
|
9483 |
+
'AMP_Img_Sanitizer' => array(),
|
9484 |
+
'AMP_Video_Sanitizer' => array(),
|
9485 |
+
'AMP_Audio_Sanitizer' => array(),
|
9486 |
+
'AMP_Iframe_Sanitizer' => array(
|
9487 |
+
'add_placeholder' => true,
|
9488 |
+
)
|
9489 |
+
) ) );
|
9490 |
+
$iframe_content = $sanitizer->get_amp_content();
|
9491 |
+
$content = str_replace($full_content, $iframe_content, $content );
|
9492 |
+
}
|
9493 |
+
}
|
9494 |
+
}
|
9495 |
+
}
|
9496 |
+
}
|
9497 |
+
}
|
9498 |
+
}
|
9499 |
+
return $content;
|
9500 |
+
}
|
9501 |
+
|
9502 |
+
if(function_exists('vp_pfui_admin_init') && function_exists('penci_setup')){
|
9503 |
+
add_action('ampforwp_before_post_content','ampforwp_pennews_audio_embed');
|
9504 |
+
}
|
9505 |
+
function ampforwp_pennews_audio_embed(){
|
9506 |
+
$audio = get_post_meta(ampforwp_get_the_ID(), '_format_audio_embed', true);
|
9507 |
+
if(empty($audio)){
|
9508 |
+
return;
|
9509 |
+
}
|
9510 |
+
$audio_str = substr( $audio, -4 );
|
9511 |
+
$html ='<div class="audio-iframe">';
|
9512 |
+
if ( wp_oembed_get( $audio ) ) {
|
9513 |
+
$html .= wp_oembed_get( $audio );
|
9514 |
+
}elseif( $audio_str == '.mp3' ) {
|
9515 |
+
$html .= do_shortcode('[audio src="'. esc_url( $audio ) .'"]');
|
9516 |
+
}else{
|
9517 |
+
$html .= do_shortcode( $audio );
|
9518 |
+
}
|
9519 |
+
$html .= '</div>';
|
9520 |
+
$sanitizer = new AMPFORWP_Content( $html, array(),
|
9521 |
+
apply_filters( 'ampforwp_content_sanitizers',
|
9522 |
+
array(
|
9523 |
+
'AMP_Audio_Sanitizer' => array(),
|
9524 |
+
'AMP_Iframe_Sanitizer' => array(
|
9525 |
+
'add_placeholder' => true,
|
9526 |
+
)
|
9527 |
+
) ) );
|
9528 |
+
$sanitized_html = $sanitizer->get_amp_content();
|
9529 |
+
echo $sanitized_html;
|
9530 |
+
}
|