Version Description
(24th October 2020) = * Improvement: Added filter to modify GDPR popup output #4778 * Improvement: Added Polylang string transaltion support #4784 * Improvement: Added IO Technologies company analytics tracking code. #4753 * Improvement: Added Ultimate Membership Pro Compatibility for AMP Extension #4790 * Improvement: Code improvements #4744 * Fixed: Validation error when the "OMGF | Host Google Fonts Locally" plugin is active #4775 * Fixed: Margin top added in the twitter embed through the Gutenberg editor #4750 * Fixed: Truepush push notification not working in AMP #4644 * Fixed: Wrong amphtml on category and tags when ?amp is selected #4780 * Fixed: Missing the amp-bind script tag #4776 * Fixed: Two H1 tags appears in AMP #4786 * Fixed: Debug warnings #4767 * Fixed: Fallback images removed when Convert AMP to WP theme is enabled #4773
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.66 |
Comparing to | |
See all releases |
Code changes from version 1.0.65.2 to 1.0.66
- README.md +16 -72
- accelerated-moblie-pages.php +2 -2
- changelog.txt +15 -0
- components/breadcrumb/breadcrumb.php +3 -1
- components/components-core.php +6 -2
- components/gdpr/gdpr.php +11 -1
- components/post-navigation/post-navigation.php +13 -2
- components/related-posts/related-posts.php +6 -1
- components/search/search.php +3 -0
- images/ultimate-membership-pro-for-amp.png +0 -0
- includes/features/analytics/analytics-functions.php +89 -1
- includes/features/analytics/analytics-options.php +16 -1
- includes/features/push-notification/push-notification-functions.php +9 -7
- includes/options/admin-config.php +13 -1
- includes/thirdparty-compatibility.php +7 -0
- readme.txt +16 -72
- templates/design-manager.php +8 -10
- templates/design-manager/design-1/elements/bread-crumbs.php +3 -1
- templates/design-manager/design-1/elements/related-posts.php +6 -1
- templates/design-manager/design-1/elements/title.php +1 -1
- templates/design-manager/design-1/footer.php +5 -2
- templates/design-manager/design-2/elements/bread-crumbs.php +3 -1
- templates/design-manager/design-2/elements/related-posts.php +6 -1
- templates/design-manager/design-2/elements/title.php +1 -1
- templates/design-manager/design-2/footer.php +5 -1
- templates/design-manager/design-3/elements/bread-crumbs.php +3 -1
- templates/design-manager/design-3/elements/related-posts.php +6 -1
- templates/design-manager/design-3/elements/title.php +1 -1
- templates/design-manager/design-3/footer.php +5 -1
- templates/design-manager/swift/single.php +6 -1
- templates/design-manager/swift/style.php +1 -0
- templates/features.php +22 -8
@@ -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.5
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -193,6 +193,21 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
193 |
|
194 |
== Changelog ==
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
= 1.0.65.2 (17th October 2020) =
|
197 |
* Fixed: Menu not appearing in AMP #4657
|
198 |
* Fixed: Wrong amphtml on homepage when ?amp is selected #4780
|
@@ -200,75 +215,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
200 |
= 1.0.65.1 (16th October 2020) =
|
201 |
* Fixed: Jquery issue fixed due to Easy select option for category module #4672
|
202 |
|
203 |
-
= 1.0.65 (15th October 2020) =
|
204 |
-
* Added: Integrated Truepush in push notification section #4644
|
205 |
-
* Added: Easy select option for category module #4672
|
206 |
-
* Added: Option to change the image size for the related posts thumbnail #4534
|
207 |
-
* Added: Option to change the image size of the first image in Swift theme #4476
|
208 |
-
* Added: AMP compatibility with Web stories by Google #4667
|
209 |
-
* Fixed: Validation error in the in-content related post #4729
|
210 |
-
* Fixed: Image elements do not have alt attributes #4757
|
211 |
-
* Fixed: When genesis theme is activated getting SEO error notice #4758
|
212 |
-
* Fixed: Removed third party plugins notices on the AMP option panel #4730
|
213 |
-
* Fixed: Instant articles not working when Site directory or Installation directory is different #4690
|
214 |
-
* Fixed: Clicking on the menu gets # at the end of the URL in design 2 #4722
|
215 |
-
* Fixed: Need to add tag for disqus comments #4692
|
216 |
-
* Fixed: Optimize menu caching code #4657
|
217 |
-
* Fixed: View non amp version is not working in mobile due to conflict with Redis Cache and WP Rocket #4614
|
218 |
-
* Fixed: Social share Buttons do not have an accessible name using Design One #4764
|
219 |
-
* Fixed: In the Contact form module, wp form options are not getting selected #4761
|
220 |
-
* Fixed: Uncaught Error: Call to undefined function ampforwp_is_home() main file #4782#4782
|
221 |
-
|
222 |
-
= 1.0.64.1 (5th October 2020) =
|
223 |
-
* Fixed: Images are not appearing in AMP with Shortpixel plugin #4738
|
224 |
-
|
225 |
-
= 1.0.64 (5th October 2020) =
|
226 |
-
* Fixed: Comments module of AMP pagebuilder is rendering only admin comments not the others #4745
|
227 |
-
* Fixed: Shortpixel is not generating WebP in AMP #4738
|
228 |
-
* Fixed: SEO option appearing in wordpress tool bar even No SEO plugin is active #4698
|
229 |
-
* Fixed: Auto add amp in menu url functionality is not working in tags #4734
|
230 |
-
* Fixed: The internal link for the the author page is generating in the AMP if the archive page support is disabled #4746
|
231 |
-
* Fixed: Scroll to top button not visible in Design 2 #4693
|
232 |
-
* Fixed: Notice: Undefined index: Cpage #4728
|
233 |
-
* Fixed: GDPR banner is off-centered, the 'X 'is out of the screen #4724
|
234 |
-
* Fixed: Wrong AMP html when the AMP takeover and ?amp is enabled #4731
|
235 |
-
* Fixed: Addon mode forcefully redirecting to reader mode not others #4742
|
236 |
-
* Fixed: Images not appearing with Image Photo Gallery Final Tiles Grid plugin #4675
|
237 |
-
* Fixed: In Design three, when click on the menu, the page gets pushed to the right side #4736
|
238 |
-
* Fixed: FAQ icon button is a too big in amp page. #4747
|
239 |
-
* Fixed: Added meta name="referrer" content="no-referrer-when-downgrade" #4715
|
240 |
-
* Fixed: In admin tool bar, (+) icon loading small and also author image invisible #4700
|
241 |
-
* Fixed: Issue with menu background when user add internal page navigation menu-items. #4630
|
242 |
-
* Fixed: Anchor tag getting stripped when Site Kit by Google is active. #4699
|
243 |
-
* Fixed: Merriweather font option in Design 1 does not work. #4726
|
244 |
-
* Fixed: If the user is adding the HTML code in the background video module then code is showing as output #4755
|
245 |
-
* Fixed: AMP 404 template is applying on non amp page #4723
|
246 |
-
* Fixed: In-Content Related Post appearing inside the blockquote when "After 50% of content" option is selected #4743
|
247 |
-
* Fixed: If the sticky ads is active then the sticky social share link tab is hiding behind the ads #4749
|
248 |
-
|
249 |
-
= 1.0.63 (26th September 2020) =
|
250 |
-
* Improvement: Added Reddit embeds support #4406
|
251 |
-
* Improvement: Added multi select for post type in loop field #4365
|
252 |
-
* Improvement: Added custom classes in Body tag in AMP in all Designs #4594
|
253 |
-
* Improvement: Added filter for GDPR on-off #4471
|
254 |
-
* Improvement: Added admin notice when wrong seo plugin is selected #4678
|
255 |
-
* Improvement: Added TikTok embed support #4504
|
256 |
-
* Improvement: Added related post on/off in YouTube #4503
|
257 |
-
* Improvement: Added Nofollow Link button on pricing tabs in AMP Page Builder #4505
|
258 |
-
* Improvement: Improved Lighthouse Audits #4654
|
259 |
-
* Improvement: Added filter for AMP front page function #4634
|
260 |
-
* Fixed: Facebook Instant Articles (FBIA) Crawler Ingestion not working #4463
|
261 |
-
* Fixed: Incontent related post not aligned if the post does not have featured image #4691
|
262 |
-
* Fixed: Incontent path passed to load_plugin_textdomain function #4694
|
263 |
-
* Fixed: Incorrect Styling for header area #4703
|
264 |
-
* Fixed: Breadcrumb links are not generating the "amp/" #4708
|
265 |
-
* Fixed: Google Analytics is not firing when GTM is enabled #4707
|
266 |
-
* Fixed: Featured Image doesn’t appear on single post #4711
|
267 |
-
* Fixed: Code improvements for options panel #4622 #4532 #4407 #4090
|
268 |
-
* Fixed: Advanced section showing blank randomly #4741
|
269 |
-
|
270 |
-
= 1.0.62.2 (21st August 2020) =
|
271 |
-
* Fixed: Gutenberg gallery block caption appearing at the end of the content #4716
|
272 |
-
* Fixed: Validation error - accordion section must have 2 child tags #4208
|
273 |
-
|
274 |
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.5
|
7 |
+
Stable tag: 1.0.66
|
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.66 (24th October 2020) =
|
197 |
+
* Improvement: Added filter to modify GDPR popup output #4778
|
198 |
+
* Improvement: Added Polylang string transaltion support #4784
|
199 |
+
* Improvement: Added IO Technologies company analytics tracking code. #4753
|
200 |
+
* Improvement: Added Ultimate Membership Pro Compatibility for AMP Extension #4790
|
201 |
+
* Improvement: Code improvements #4744
|
202 |
+
* Fixed: Validation error when the "OMGF | Host Google Fonts Locally" plugin is active #4775
|
203 |
+
* Fixed: Margin top added in the twitter embed through the Gutenberg editor #4750
|
204 |
+
* Fixed: Truepush push notification not working in AMP #4644
|
205 |
+
* Fixed: Wrong amphtml on category and tags when ?amp is selected #4780
|
206 |
+
* Fixed: Missing the amp-bind script tag #4776
|
207 |
+
* Fixed: Two H1 tags appears in AMP #4786
|
208 |
+
* Fixed: Debug warnings #4767
|
209 |
+
* Fixed: Fallback images removed when Convert AMP to WP theme is enabled #4773
|
210 |
+
|
211 |
= 1.0.65.2 (17th October 2020) =
|
212 |
* Fixed: Menu not appearing in AMP #4657
|
213 |
* Fixed: Wrong amphtml on homepage when ?amp is selected #4780
|
215 |
= 1.0.65.1 (16th October 2020) =
|
216 |
* Fixed: Jquery issue fixed due to Easy select option for category module #4672
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
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.66
|
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.66');
|
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,20 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.65.2 (17th October 2020) =
|
4 |
* Fixed: Menu not appearing in AMP #4657
|
5 |
* Fixed: Wrong amphtml on homepage when ?amp is selected #4780
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.66 (24th October 2020) =
|
4 |
+
* Improvement: Added filter to modify GDPR popup output #4778
|
5 |
+
* Improvement: Added Polylang string transaltion support #4784
|
6 |
+
* Improvement: Added IO Technologies company analytics tracking code. #4753
|
7 |
+
* Improvement: Added Ultimate Membership Pro Compatibility for AMP Extension #4790
|
8 |
+
* Improvement: Code improvements #4744
|
9 |
+
* Fixed: Validation error when the "OMGF | Host Google Fonts Locally" plugin is active #4775
|
10 |
+
* Fixed: Margin top added in the twitter embed through the Gutenberg editor #4750
|
11 |
+
* Fixed: Truepush push notification not working in AMP #4644
|
12 |
+
* Fixed: Wrong amphtml on category and tags when ?amp is selected #4780
|
13 |
+
* Fixed: Missing the amp-bind script tag #4776
|
14 |
+
* Fixed: Two H1 tags appears in AMP #4786
|
15 |
+
* Fixed: Debug warnings #4767
|
16 |
+
* Fixed: Fallback images removed when Convert AMP to WP theme is enabled #4773
|
17 |
+
|
18 |
= 1.0.65.2 (17th October 2020) =
|
19 |
* Fixed: Menu not appearing in AMP #4657
|
20 |
* Fixed: Wrong amphtml on homepage when ?amp is selected #4780
|
@@ -23,7 +23,9 @@ function amp_breadcrumb_output(){
|
|
23 |
$breadcrums_id = 'breadcrumbs';
|
24 |
$breadcrums_class = 'breadcrumbs';
|
25 |
$home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
|
26 |
-
|
|
|
|
|
27 |
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
28 |
$custom_taxonomy = 'product_cat';
|
29 |
|
23 |
$breadcrums_id = 'breadcrumbs';
|
24 |
$breadcrums_class = 'breadcrumbs';
|
25 |
$home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
|
26 |
+
if (function_exists('pll__')) {
|
27 |
+
$home_title = pll__(esc_html__( ampforwp_get_setting('amp-translator-breadcrumbs-homepage-text'), 'accelerated-mobile-pages'));
|
28 |
+
}
|
29 |
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
30 |
$custom_taxonomy = 'product_cat';
|
31 |
|
@@ -118,7 +118,7 @@ function amp_title(){
|
|
118 |
do_action('ampforwp_above_the_title');
|
119 |
$ampforwp_title = get_the_title($ID);
|
120 |
$ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
|
121 |
-
if(!empty($ampforwp_title) &&
|
122 |
$title_tag = '<h1 class="amp-post-title">' . wp_kses_data( $ampforwp_title ) . '</h1>';
|
123 |
}else{
|
124 |
$title_tag = '<h2 class="amp-post-title">' . wp_kses_data( $ampforwp_title ) . '</h2>';
|
@@ -454,7 +454,11 @@ function amp_footer_core(){
|
|
454 |
|
455 |
function amp_non_amp_link(){
|
456 |
$allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
|
457 |
-
|
|
|
|
|
|
|
|
|
458 |
if(ampforwp_get_setting('amp-footer-link-non-amp-page')=='1') { ampforwp_view_nonamp(); }
|
459 |
}
|
460 |
|
118 |
do_action('ampforwp_above_the_title');
|
119 |
$ampforwp_title = get_the_title($ID);
|
120 |
$ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
|
121 |
+
if(!empty($ampforwp_title) && ampforwp_default_logo() && ampforwp_get_setting('opt-media','url')!=''){
|
122 |
$title_tag = '<h1 class="amp-post-title">' . wp_kses_data( $ampforwp_title ) . '</h1>';
|
123 |
}else{
|
124 |
$title_tag = '<h2 class="amp-post-title">' . wp_kses_data( $ampforwp_title ) . '</h2>';
|
454 |
|
455 |
function amp_non_amp_link(){
|
456 |
$allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
|
457 |
+
if (function_exists('pll__')) {
|
458 |
+
echo '<span>' . strip_tags(pll__(ampforwp_get_setting('amp-translator-footer-text'),'All Rights Reserved'),$allowed_tags) . '</span>';
|
459 |
+
}else {
|
460 |
+
echo '<span>' . strip_tags(ampforwp_translation(ampforwp_get_setting('amp-translator-footer-text'),'All Rights Reserved'),$allowed_tags) . '</span>';
|
461 |
+
}
|
462 |
if(ampforwp_get_setting('amp-footer-link-non-amp-page')=='1') { ampforwp_view_nonamp(); }
|
463 |
}
|
464 |
|
@@ -22,7 +22,17 @@ function amp_gdpr_output(){
|
|
22 |
$privacy_button_text = $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text'];
|
23 |
}
|
24 |
$gdpr_countries = array("AT","BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT", "LU", "MT", "NL", "NO", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "GB", "AX", "IC", "EA", "GF", "PF", "TF", "GI", "GP", "GG", "JE", "MQ", "YT", "NC", "RE", "BL", "MF", "PM", "SJ", "VA", "WF", "EZ", "CH");
|
25 |
-
$gdpr_countries = apply_filters( 'ampforwp_gdpr_country_list' , $gdpr_countries );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
<amp-geo layout="nodisplay">
|
27 |
<script type="application/json">
|
28 |
{
|
22 |
$privacy_button_text = $redux_builder_amp['amp-gdpr-compliance-privacy-page-button-text'];
|
23 |
}
|
24 |
$gdpr_countries = array("AT","BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT", "LU", "MT", "NL", "NO", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "GB", "AX", "IC", "EA", "GF", "PF", "TF", "GI", "GP", "GG", "JE", "MQ", "YT", "NC", "RE", "BL", "MF", "PM", "SJ", "VA", "WF", "EZ", "CH");
|
25 |
+
$gdpr_countries = apply_filters( 'ampforwp_gdpr_country_list' , $gdpr_countries );
|
26 |
+
$gdpr_text = array("headline"=>$headline,"user_data"=>$user_data,"accept"=>$accept,"reject"=>$reject,"settings"=>$settings,"more_info "=>$more_info,"privacy_button_text"=>$privacy_button_text );
|
27 |
+
$gdpr_text = apply_filters('ampforwp_modify_gdpr_output',$gdpr_text);
|
28 |
+
$headline = $gdpr_text['headline'];
|
29 |
+
$user_data = $gdpr_text['user_data'];
|
30 |
+
$accept = $gdpr_text['accept'];
|
31 |
+
$reject = $gdpr_text['reject'];
|
32 |
+
$settings = $gdpr_text['settings'];
|
33 |
+
$more_info = $gdpr_text['more_info'];
|
34 |
+
$privacy_button_text = $gdpr_text['privacy_button_text'];
|
35 |
+
?>
|
36 |
<amp-geo layout="nodisplay">
|
37 |
<script type="application/json">
|
38 |
{
|
@@ -14,7 +14,13 @@ function ampforwp_framework_get_post_navigation(){
|
|
14 |
if(true == ampforwp_get_setting('single-next-prev-to-nonamp')){
|
15 |
$next_link = get_permalink( $next_post->ID );
|
16 |
} ?>
|
17 |
-
<a href="<?php echo esc_url($next_link); ?>"><span><?php
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
} ?>
|
19 |
</div>
|
20 |
|
@@ -26,7 +32,12 @@ function ampforwp_framework_get_post_navigation(){
|
|
26 |
if(true == ampforwp_get_setting('single-next-prev-to-nonamp')){
|
27 |
$prev_link = get_permalink( $prev_post->ID );
|
28 |
} ?>
|
29 |
-
<a href="<?php echo esc_url($prev_link); ?>"><span><?php
|
|
|
|
|
|
|
|
|
|
|
30 |
} ?>
|
31 |
</div>
|
32 |
|
14 |
if(true == ampforwp_get_setting('single-next-prev-to-nonamp')){
|
15 |
$next_link = get_permalink( $next_post->ID );
|
16 |
} ?>
|
17 |
+
<a href="<?php echo esc_url($next_link); ?>"><span><?php
|
18 |
+
if (function_exists('pll__')) {
|
19 |
+
echo pll__(esc_html__( ampforwp_get_setting('amp-translator-next-text'), 'accelerated-mobile-pages'));
|
20 |
+
}else {
|
21 |
+
echo ampforwp_translation(ampforwp_get_setting('amp-translator-next-text'), 'Next' );
|
22 |
+
} ?>
|
23 |
+
</span><?php echo apply_filters('ampforwp_next_link',$next_text ); ?> »</a> <?php
|
24 |
} ?>
|
25 |
</div>
|
26 |
|
32 |
if(true == ampforwp_get_setting('single-next-prev-to-nonamp')){
|
33 |
$prev_link = get_permalink( $prev_post->ID );
|
34 |
} ?>
|
35 |
+
<a href="<?php echo esc_url($prev_link); ?>"><span><?php
|
36 |
+
if (function_exists('pll__')) {
|
37 |
+
echo pll__(esc_html__( ampforwp_get_setting('amp-translator-previous-text'), 'accelerated-mobile-pages'));
|
38 |
+
}else {
|
39 |
+
echo ampforwp_translation(ampforwp_get_setting('amp-translator-previous-text'), 'Next' );
|
40 |
+
} ?></span> « <?php echo apply_filters('ampforwp_prev_link',$prev_text ); ?></a> <?php
|
41 |
} ?>
|
42 |
</div>
|
43 |
|
@@ -117,7 +117,12 @@ function ampforwp_related_post(){
|
|
117 |
global $redux_builder_amp;
|
118 |
do_action('ampforwp_above_related_post'); //Above Related Posts
|
119 |
?>
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
121 |
<?php }
|
122 |
|
123 |
function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
|
117 |
global $redux_builder_amp;
|
118 |
do_action('ampforwp_above_related_post'); //Above Related Posts
|
119 |
?>
|
120 |
+
<h3 class="amp-related-posts-title"><?php
|
121 |
+
if (function_exists('pll__')) {
|
122 |
+
echo pll__(esc_html__( ampforwp_get_setting('amp-translator-related-text'), 'accelerated-mobile-pages'));
|
123 |
+
}else {
|
124 |
+
echo esc_html(ampforwp_translation(ampforwp_get_setting('amp-translator-related-text'), 'Related Post' ));
|
125 |
+
}?></h3>
|
126 |
<?php }
|
127 |
|
128 |
function ampforwp_get_relatedpost_image( $imagetype ='thumbnail', $data=array() ){
|
@@ -12,6 +12,9 @@ function ampforwp_framework_get_search_form() {
|
|
12 |
$action_url = ( get_bloginfo('url') );
|
13 |
$action_url = preg_replace('#^http?:#', '', $action_url);
|
14 |
$placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
|
|
|
|
|
|
|
15 |
$rand = rand(10,100);
|
16 |
if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && !$redux_builder_amp['ampforwp-amp-takeover'] ) {
|
17 |
$amp_query_variable = 'amp';
|
12 |
$action_url = ( get_bloginfo('url') );
|
13 |
$action_url = preg_replace('#^http?:#', '', $action_url);
|
14 |
$placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
|
15 |
+
if (function_exists('pll__')) {
|
16 |
+
$placeholder = pll__(esc_html__( ampforwp_get_setting('ampforwp-search-placeholder'), 'accelerated-mobile-pages'));
|
17 |
+
}
|
18 |
$rand = rand(10,100);
|
19 |
if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && !$redux_builder_amp['ampforwp-amp-takeover'] ) {
|
20 |
$amp_query_variable = 'amp';
|
Binary file
|
@@ -303,7 +303,95 @@ function ampforwp_analytics() {
|
|
303 |
$analytics_url = ampforwp_get_setting('ampforwp-callrail-analytics-url');
|
304 |
if(!empty($config_url) && !empty($number) && !empty($analytics_url)){?>
|
305 |
<amp-call-tracking config="<?php echo esc_url($config_url); ?>"><a href="tel:<?php echo esc_attr($number);?>"><?php echo esc_html($number);?></a></amp-call-tracking><amp-analytics config="<?php echo esc_url($analytics_url); ?>"></amp-analytics>
|
306 |
-
<?php } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
}
|
308 |
// 89. Facebook Pixel
|
309 |
add_action('amp_post_template_footer','ampforwp_facebook_pixel',11);
|
303 |
$analytics_url = ampforwp_get_setting('ampforwp-callrail-analytics-url');
|
304 |
if(!empty($config_url) && !empty($number) && !empty($analytics_url)){?>
|
305 |
<amp-call-tracking config="<?php echo esc_url($config_url); ?>"><a href="tel:<?php echo esc_attr($number);?>"><?php echo esc_html($number);?></a></amp-call-tracking><amp-analytics config="<?php echo esc_url($analytics_url); ?>"></amp-analytics>
|
306 |
+
<?php } }
|
307 |
+
if( true == ampforwp_get_setting('ampforwp-iotech-switch')) {
|
308 |
+
$project_id = $id = $title = $author = $categories = $cat_names = '';
|
309 |
+
$project_id = ampforwp_get_setting('ampforwp-iotech-projectid');
|
310 |
+
if(!empty($project_id)){
|
311 |
+
$id = ampforwp_get_the_ID();
|
312 |
+
$title = get_the_title($id);
|
313 |
+
$lang = get_locale();
|
314 |
+
$author = get_the_author_meta('display_name');
|
315 |
+
$categories = get_the_terms( $id, 'category' );
|
316 |
+
foreach ($categories as $key=>$cat ) {
|
317 |
+
$cat_names .= '|' . $cat->name ;
|
318 |
+
}
|
319 |
+
$cat_names = substr($cat_names, 1);
|
320 |
+
$content = get_post_field( 'post_content', $id );
|
321 |
+
$word_count = str_word_count( strip_tags( $content ) );
|
322 |
+
$date = get_post_time('F d, Y g:i a');
|
323 |
+
?>
|
324 |
+
<amp-analytics>
|
325 |
+
<script type="application/json">
|
326 |
+
{
|
327 |
+
"requests": {
|
328 |
+
"pageview": "https://tt.onthe.io/?k[]=<?php echo esc_attr($project_id); ?>:pageviews[user_id:${clientId(_io_un)},author:${article_authors},referrer_uri:${documentReferrer},url:${canonicalPath},domain:${canonicalHostname},user_agent:${userAgent},page:${page_title},platform:amp,language:${page_language},category:${article_categories},type_article:${article_type},word_count:${article_word_count},pub_date:${article_publication_date},page_type:${page_type}]",
|
329 |
+
"read_top": "https://tt.onthe.io/?k[]=<?php echo esc_attr($project_id); ?>:read_top[user_id:${clientId(_io_un)},author:${article_authors},referrer_uri:${documentReferrer},url:${canonicalPath},domain:${canonicalHostname},user_agent:${userAgent},page:${page_title},platform:amp,language:${page_language},category:${article_categories},type_article:${article_type},word_count:${article_word_count},pub_date:${article_publication_date},page_type:${page_type}]",
|
330 |
+
"read_middle": "https://tt.onthe.io/?k[]=<?php echo esc_attr($project_id); ?>:read_middle[user_id:${clientId(_io_un)},author:${article_authors},referrer_uri:${documentReferrer},url:${canonicalPath},domain:${canonicalHostname},user_agent:${userAgent},page:${page_title},platform:amp,language:${page_language},category:${article_categories},type_article:${article_type},word_count:${article_word_count},pub_date:${article_publication_date},page_type:${page_type}]",
|
331 |
+
"read_bottom": "https://tt.onthe.io/?k[]=<?php echo esc_attr($project_id); ?>:read_bottom[user_id:${clientId(_io_un)},author:${article_authors},referrer_uri:${documentReferrer},url:${canonicalPath},domain:${canonicalHostname},user_agent:${userAgent},page:${page_title},platform:amp,language:${page_language},category:${article_categories},type_article:${article_type},word_count:${article_word_count},pub_date:${article_publication_date},page_type:${page_type}]",
|
332 |
+
"read_finished": "https://tt.onthe.io/?k[]=<?php echo esc_attr($project_id); ?>:read_finished[user_id:${clientId(_io_un)},author:${article_authors},referrer_uri:${documentReferrer},url:${canonicalPath},domain:${canonicalHostname},user_agent:${userAgent},page:${page_title},platform:amp,language:${page_language},category:${article_categories},type_article:${article_type},word_count:${article_word_count},pub_date:${article_publication_date},page_type:${page_type}]",
|
333 |
+
"time": "https://tt.onthe.io/?k[]=<?php echo esc_attr($project_id); ?>:time[platform:amp,url:${canonicalPath}]"
|
334 |
+
},
|
335 |
+
"vars": {
|
336 |
+
"page_title": "$<?php echo esc_attr($title) ?>",
|
337 |
+
"page_type": "article",
|
338 |
+
"page_language": "<?php echo esc_attr($lang) ?>",
|
339 |
+
"article_authors": "<?php echo esc_attr($author) ?>",
|
340 |
+
"article_categories": "<?php echo esc_attr($cat_names) ?>",
|
341 |
+
"article_type": "longread",
|
342 |
+
"article_word_count": "<?php echo esc_attr($word_count) ?>",
|
343 |
+
"article_publication_date": "<?php echo esc_attr($date) ?>"
|
344 |
+
},
|
345 |
+
"triggers": {
|
346 |
+
"trackPageview": {
|
347 |
+
"on": "visible",
|
348 |
+
"request": "pageview"
|
349 |
+
},
|
350 |
+
"trackReadTop" : {
|
351 |
+
"on" : "scroll",
|
352 |
+
"scrollSpec": {
|
353 |
+
"verticalBoundaries": [25]
|
354 |
+
},
|
355 |
+
"request": "read_top"
|
356 |
+
},
|
357 |
+
"trackReadMiddle" : {
|
358 |
+
"on" : "scroll",
|
359 |
+
"scrollSpec": {
|
360 |
+
"verticalBoundaries": [50]
|
361 |
+
},
|
362 |
+
"request": "read_middle"
|
363 |
+
},
|
364 |
+
"trackReadBottom" : {
|
365 |
+
"on" : "scroll",
|
366 |
+
"scrollSpec": {
|
367 |
+
"verticalBoundaries": [75]
|
368 |
+
},
|
369 |
+
"request": "read_bottom"
|
370 |
+
},
|
371 |
+
"trackReadFinished" : {
|
372 |
+
"on" : "scroll",
|
373 |
+
"scrollSpec": {
|
374 |
+
"verticalBoundaries": [90]
|
375 |
+
},
|
376 |
+
"request": "read_finished"
|
377 |
+
},
|
378 |
+
"pageTimer": {
|
379 |
+
"on": "timer",
|
380 |
+
"timerSpec": {
|
381 |
+
"interval": 10
|
382 |
+
},
|
383 |
+
"request": "time"
|
384 |
+
}
|
385 |
+
},
|
386 |
+
"transport": {
|
387 |
+
"beacon": false,
|
388 |
+
"xhrpost": false,
|
389 |
+
"image": true
|
390 |
+
}
|
391 |
+
}
|
392 |
+
</script>
|
393 |
+
</amp-analytics>
|
394 |
+
<?php } }
|
395 |
}
|
396 |
// 89. Facebook Pixel
|
397 |
add_action('amp_post_template_footer','ampforwp_facebook_pixel',11);
|
@@ -567,7 +567,22 @@ function ampforwp_analytics_options($opt_name){
|
|
567 |
'tooltip-subtitle' => esc_html__( 'Enter your Analytics Config URL','accelerated-mobile-pages'),
|
568 |
'required' => array('ampforwp-callrail-switch', '=' , '1')
|
569 |
),
|
570 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
571 |
)
|
572 |
)
|
573 |
);
|
567 |
'tooltip-subtitle' => esc_html__( 'Enter your Analytics Config URL','accelerated-mobile-pages'),
|
568 |
'required' => array('ampforwp-callrail-switch', '=' , '1')
|
569 |
),
|
570 |
+
//iotechnologies Analytics
|
571 |
+
array(
|
572 |
+
'id' =>'ampforwp-iotech-switch',
|
573 |
+
'type' => 'switch',
|
574 |
+
'title' => esc_html__('IO Technologies Analytics','accelerated-mobile-pages'),
|
575 |
+
'default' => 0,
|
576 |
+
'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
|
577 |
+
esc_html__('Enable this option to track io technologies analytics in AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-iotechnologies-analytics-in-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
|
578 |
+
),
|
579 |
+
array(
|
580 |
+
'id' => 'ampforwp-iotech-projectid',
|
581 |
+
'type' => 'text',
|
582 |
+
'title' => esc_html__( 'Project ID', 'accelerated-mobile-pages' ),
|
583 |
+
'tooltip-subtitle' => esc_html__( 'Enter Your Project ID Here','accelerated-mobile-pages'),
|
584 |
+
'required' => array('ampforwp-iotech-switch', '=' , '1')
|
585 |
+
),
|
586 |
)
|
587 |
)
|
588 |
);
|
@@ -260,15 +260,17 @@ function ampforwp_truepush_styling(){?>
|
|
260 |
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
261 |
}
|
262 |
<?php }
|
263 |
-
function ampforwp_truepush_markup(){
|
264 |
-
|
265 |
-
<
|
266 |
-
|
267 |
-
|
268 |
-
|
|
|
|
|
269 |
add_action('ampforwp_after_post_content', 'ampforwp_truepush_markup');
|
270 |
}
|
271 |
|
272 |
-
if(
|
273 |
add_action('ampforwp_before_post_content', 'ampforwp_truepush_markup');
|
274 |
}
|
260 |
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
261 |
}
|
262 |
<?php }
|
263 |
+
function ampforwp_truepush_markup(){
|
264 |
+
if (!checkAMPforPageBuilderStatus(get_the_ID()) && is_single()) {?>
|
265 |
+
<amp-web-push-widget visibility="unsubscribed" layout="fixed" width="250" height="45">
|
266 |
+
<button on="tap:amp-web-push.subscribe" class="amp-subscribe"><?php echo ampforwp_translation( ampforwp_get_setting('ampforwp-truepush-translator-subscribe'), 'Subscribe to updates' ); ?></button>
|
267 |
+
</amp-web-push-widget>
|
268 |
+
<?php }
|
269 |
+
}
|
270 |
+
if(ampforwp_get_setting('ampforwp-web-push-truepush-below-content')){
|
271 |
add_action('ampforwp_after_post_content', 'ampforwp_truepush_markup');
|
272 |
}
|
273 |
|
274 |
+
if(ampforwp_get_setting('ampforwp-web-push-truepush-above-content')){
|
275 |
add_action('ampforwp_before_post_content', 'ampforwp_truepush_markup');
|
276 |
}
|
@@ -674,7 +674,19 @@ $extension_listing_array = array(
|
|
674 |
'item_name'=>'Reading Progress Bar for AMP',
|
675 |
'store_url'=>'https://accounts.ampforwp.com',
|
676 |
'is_activated'=>(is_plugin_active('reading-progress-bar-for-amp/reading-progress-bar-for-amp.php')? 1 : 2),
|
677 |
-
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
678 |
array(
|
679 |
'name'=>'Polls for AMP',
|
680 |
'class'=>'new-ext',
|
674 |
'item_name'=>'Reading Progress Bar for AMP',
|
675 |
'store_url'=>'https://accounts.ampforwp.com',
|
676 |
'is_activated'=>(is_plugin_active('reading-progress-bar-for-amp/reading-progress-bar-for-amp.php')? 1 : 2),
|
677 |
+
),
|
678 |
+
array(
|
679 |
+
'name'=>'Ultimate Membership Pro Compatibility for AMP',
|
680 |
+
'class'=>'new-ext',
|
681 |
+
'desc'=>'Add Ultimate Membership Pro Support in AMP',
|
682 |
+
'img_src'=>AMPFORWP_IMAGE_DIR . '/ultimate-membership-pro-for-amp.png',
|
683 |
+
'price'=>'$89',
|
684 |
+
'url_link'=>'https://ampforwp.com/addons/ultimate-membership-pro-compatibility-for-amp/',
|
685 |
+
'plugin_active_path'=> 'ultimate-membership-pro-compatibility-for-amp/ultimate-membership-pro-compatibility-for-amp.php',
|
686 |
+
'item_name'=>'Ultimate Membership Pro Compatibility for AMP',
|
687 |
+
'store_url'=>'https://accounts.ampforwp.com',
|
688 |
+
'is_activated'=>(is_plugin_active('ultimate-membership-pro-compatibility-for-amp/ultimate-membership-pro-compatibility-for-amp.php')? 1 : 2),
|
689 |
+
),
|
690 |
array(
|
691 |
'name'=>'Polls for AMP',
|
692 |
'class'=>'new-ext',
|
@@ -1185,6 +1185,13 @@ function ampforwp_execute_amp_prior_marfeel(){
|
|
1185 |
}
|
1186 |
}
|
1187 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1188 |
}
|
1189 |
function ampforwp_is_amp_inURL($url){
|
1190 |
$urlArray = explode("/", $url);
|
1185 |
}
|
1186 |
}
|
1187 |
}
|
1188 |
+
//Removed OMGF Host Google Fonts Locally in AMP #4775
|
1189 |
+
if(function_exists( 'omgf_pro_init' ) ){
|
1190 |
+
$url_path = trim(parse_url(add_query_arg(array()), PHP_URL_PATH),'/' );
|
1191 |
+
if( function_exists('ampforwp_is_amp_inURL') && ampforwp_is_amp_inURL($url_path)) {
|
1192 |
+
remove_action( 'plugins_loaded', 'omgf_pro_init', 49 );
|
1193 |
+
}
|
1194 |
+
}
|
1195 |
}
|
1196 |
function ampforwp_is_amp_inURL($url){
|
1197 |
$urlArray = explode("/", $url);
|
@@ -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.5
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -190,6 +190,21 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
190 |
|
191 |
== Changelog ==
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
= 1.0.65.2 (17th October 2020) =
|
194 |
* Fixed: Menu not appearing in AMP #4657
|
195 |
* Fixed: Wrong amphtml on homepage when ?amp is selected #4780
|
@@ -197,75 +212,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
197 |
= 1.0.65.1 (16th October 2020) =
|
198 |
* Fixed: Jquery issue fixed due to Easy select option for category module #4672
|
199 |
|
200 |
-
= 1.0.65 (15th October 2020) =
|
201 |
-
* Added: Integrated Truepush in push notification section #4644
|
202 |
-
* Added: Easy select option for category module #4672
|
203 |
-
* Added: Option to change the image size for the related posts thumbnail #4534
|
204 |
-
* Added: Option to change the image size of the first image in Swift theme #4476
|
205 |
-
* Added: AMP compatibility with Web stories by Google #4667
|
206 |
-
* Fixed: Validation error in the in-content related post #4729
|
207 |
-
* Fixed: Image elements do not have alt attributes #4757
|
208 |
-
* Fixed: When genesis theme is activated getting SEO error notice #4758
|
209 |
-
* Fixed: Removed third party plugins notices on the AMP option panel #4730
|
210 |
-
* Fixed: Instant articles not working when Site directory or Installation directory is different #4690
|
211 |
-
* Fixed: Clicking on the menu gets # at the end of the URL in design 2 #4722
|
212 |
-
* Fixed: Need to add tag for disqus comments #4692
|
213 |
-
* Fixed: Optimize menu caching code #4657
|
214 |
-
* Fixed: View non amp version is not working in mobile due to conflict with Redis Cache and WP Rocket #4614
|
215 |
-
* Fixed: Social share Buttons do not have an accessible name using Design One #4764
|
216 |
-
* Fixed: In the Contact form module, wp form options are not getting selected #4761
|
217 |
-
* Fixed: Uncaught Error: Call to undefined function ampforwp_is_home() main file #4782
|
218 |
-
|
219 |
-
= 1.0.64.1 (5th October 2020) =
|
220 |
-
* Fixed: Images are not appearing in AMP with Shortpixel plugin #4738
|
221 |
-
|
222 |
-
= 1.0.64 (5th October 2020) =
|
223 |
-
* Fixed: Comments module of AMP pagebuilder is rendering only admin comments not the others #4745
|
224 |
-
* Fixed: Shortpixel is not generating WebP in AMP #4738
|
225 |
-
* Fixed: SEO option appearing in wordpress tool bar even No SEO plugin is active #4698
|
226 |
-
* Fixed: Auto add amp in menu url functionality is not working in tags #4734
|
227 |
-
* Fixed: The internal link for the the author page is generating in the AMP if the archive page support is disabled #4746
|
228 |
-
* Fixed: Scroll to top button not visible in Design 2 #4693
|
229 |
-
* Fixed: Notice: Undefined index: Cpage #4728
|
230 |
-
* Fixed: GDPR banner is off-centered, the 'X 'is out of the screen #4724
|
231 |
-
* Fixed: Wrong AMP html when the AMP takeover and ?amp is enabled #4731
|
232 |
-
* Fixed: Addon mode forcefully redirecting to reader mode not others #4742
|
233 |
-
* Fixed: Images not appearing with Image Photo Gallery Final Tiles Grid plugin #4675
|
234 |
-
* Fixed: In Design three, when click on the menu, the page gets pushed to the right side #4736
|
235 |
-
* Fixed: FAQ icon button is a too big in amp page. #4747
|
236 |
-
* Fixed: Added meta name="referrer" content="no-referrer-when-downgrade" #4715
|
237 |
-
* Fixed: In admin tool bar, (+) icon loading small and also author image invisible #4700
|
238 |
-
* Fixed: Issue with menu background when user add internal page navigation menu-items. #4630
|
239 |
-
* Fixed: Anchor tag getting stripped when Site Kit by Google is active. #4699
|
240 |
-
* Fixed: Merriweather font option in Design 1 does not work. #4726
|
241 |
-
* Fixed: If the user is adding the HTML code in the background video module then code is showing as output #4755
|
242 |
-
* Fixed: AMP 404 template is applying on non amp page #4723
|
243 |
-
* Fixed: In-Content Related Post appearing inside the blockquote when "After 50% of content" option is selected #4743
|
244 |
-
* Fixed: If the sticky ads is active then the sticky social share link tab is hiding behind the ads #4749
|
245 |
-
|
246 |
-
= 1.0.63 (26th September 2020) =
|
247 |
-
* Improvement: Added Reddit embeds support #4406
|
248 |
-
* Improvement: Added multi select for post type in loop field #4365
|
249 |
-
* Improvement: Added custom classes in Body tag in AMP in all Designs #4594
|
250 |
-
* Improvement: Added filter for GDPR on-off #4471
|
251 |
-
* Improvement: Added admin notice when wrong seo plugin is selected #4678
|
252 |
-
* Improvement: Added TikTok embed support #4504
|
253 |
-
* Improvement: Added related post on/off in YouTube #4503
|
254 |
-
* Improvement: Added Nofollow Link button on pricing tabs in AMP Page Builder #4505
|
255 |
-
* Improvement: Improved Lighthouse Audits #4654
|
256 |
-
* Improvement: Added filter for AMP front page function #4634
|
257 |
-
* Fixed: Facebook Instant Articles (FBIA) Crawler Ingestion not working #4463
|
258 |
-
* Fixed: Incontent related post not aligned if the post does not have featured image #4691
|
259 |
-
* Fixed: Incontent path passed to load_plugin_textdomain function #4694
|
260 |
-
* Fixed: Incorrect Styling for header area #4703
|
261 |
-
* Fixed: Breadcrumb links are not generating the "amp/" #4708
|
262 |
-
* Fixed: Google Analytics is not firing when GTM is enabled #4707
|
263 |
-
* Fixed: Featured Image doesn’t appear on single post #4711
|
264 |
-
* Fixed: Code improvements for options panel #4622 #4532 #4407 #4090
|
265 |
-
* Fixed: Advanced section showing blank randomly #4741
|
266 |
-
|
267 |
-
= 1.0.62.2 (21st August 2020) =
|
268 |
-
* Fixed: Gutenberg gallery block caption appearing at the end of the content #4716
|
269 |
-
* Fixed: Validation error - accordion section must have 2 child tags #4208
|
270 |
-
|
271 |
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.5
|
7 |
+
Stable tag: 1.0.66
|
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.66 (24th October 2020) =
|
194 |
+
* Improvement: Added filter to modify GDPR popup output #4778
|
195 |
+
* Improvement: Added Polylang string transaltion support #4784
|
196 |
+
* Improvement: Added IO Technologies company analytics tracking code. #4753
|
197 |
+
* Improvement: Added Ultimate Membership Pro Compatibility for AMP Extension #4790
|
198 |
+
* Improvement: Code improvements #4744
|
199 |
+
* Fixed: Validation error when the "OMGF | Host Google Fonts Locally" plugin is active #4775
|
200 |
+
* Fixed: Margin top added in the twitter embed through the Gutenberg editor #4750
|
201 |
+
* Fixed: Truepush push notification not working in AMP #4644
|
202 |
+
* Fixed: Wrong amphtml on category and tags when ?amp is selected #4780
|
203 |
+
* Fixed: Missing the amp-bind script tag #4776
|
204 |
+
* Fixed: Two H1 tags appears in AMP #4786
|
205 |
+
* Fixed: Debug warnings #4767
|
206 |
+
* Fixed: Fallback images removed when Convert AMP to WP theme is enabled #4773
|
207 |
+
|
208 |
= 1.0.65.2 (17th October 2020) =
|
209 |
* Fixed: Menu not appearing in AMP #4657
|
210 |
* Fixed: Wrong amphtml on homepage when ?amp is selected #4780
|
212 |
= 1.0.65.1 (16th October 2020) =
|
213 |
* Fixed: Jquery issue fixed due to Easy select option for category module #4672
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -15,7 +15,11 @@ if ( is_customize_preview() ) {
|
|
15 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_related_posts' );
|
16 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_bread_crumbs' );
|
17 |
}
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
$design = ampforwp_get_setting('amp-design-selector');
|
20 |
if ( empty( $design )){
|
21 |
$design = 4;
|
@@ -56,7 +60,6 @@ if ( is_customize_preview() ) {
|
|
56 |
break;
|
57 |
case 'social_icons:1':
|
58 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_social_icons' );
|
59 |
-
define('AMPFORWP_DM_SOCIAL_CHECK','true');
|
60 |
break;
|
61 |
case 'comments:1':
|
62 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_comments' );
|
@@ -69,12 +72,7 @@ if ( is_customize_preview() ) {
|
|
69 |
}
|
70 |
}
|
71 |
endif;
|
72 |
-
|
73 |
-
|
74 |
-
// Design Selector
|
75 |
-
add_action('pre_amp_render_post','ampforwp_design_selector', 11 );
|
76 |
-
function ampforwp_design_selector() {
|
77 |
-
global $redux_builder_amp;
|
78 |
$design = '';
|
79 |
$design = ampforwp_get_setting('amp-design-selector');
|
80 |
if ( empty( $design )){
|
@@ -83,10 +81,10 @@ function ampforwp_design_selector() {
|
|
83 |
|
84 |
if ( $design ) {
|
85 |
if ( file_exists(AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. $design . '/style.php') ) {
|
86 |
-
return
|
87 |
}
|
88 |
elseif ( 4 == $design && file_exists(AMPFORWP_PLUGIN_DIR . 'templates/design-manager/swift/style.php') ) {
|
89 |
-
return
|
90 |
}
|
91 |
else {
|
92 |
if ( file_exists( WP_PLUGIN_DIR.'/'.$design.'/functions.php' ) ){
|
15 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_related_posts' );
|
16 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_bread_crumbs' );
|
17 |
}
|
18 |
+
// Design Selector
|
19 |
+
add_action('pre_amp_render_post','ampforwp_design_selector', 11 );
|
20 |
+
function ampforwp_design_selector() {
|
21 |
+
$url_path = trim(parse_url(add_query_arg(array()), PHP_URL_PATH),'/' );
|
22 |
+
if( function_exists('ampforwp_is_amp_inURL') && ampforwp_is_amp_inURL($url_path)) {
|
23 |
$design = ampforwp_get_setting('amp-design-selector');
|
24 |
if ( empty( $design )){
|
25 |
$design = 4;
|
60 |
break;
|
61 |
case 'social_icons:1':
|
62 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_social_icons' );
|
|
|
63 |
break;
|
64 |
case 'comments:1':
|
65 |
add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_comments' );
|
72 |
}
|
73 |
}
|
74 |
endif;
|
75 |
+
}
|
|
|
|
|
|
|
|
|
|
|
76 |
$design = '';
|
77 |
$design = ampforwp_get_setting('amp-design-selector');
|
78 |
if ( empty( $design )){
|
81 |
|
82 |
if ( $design ) {
|
83 |
if ( file_exists(AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. $design . '/style.php') ) {
|
84 |
+
return ampforwp_get_setting('amp-design-selector');
|
85 |
}
|
86 |
elseif ( 4 == $design && file_exists(AMPFORWP_PLUGIN_DIR . 'templates/design-manager/swift/style.php') ) {
|
87 |
+
return ampforwp_get_setting('amp-design-selector');
|
88 |
}
|
89 |
else {
|
90 |
if ( file_exists( WP_PLUGIN_DIR.'/'.$design.'/functions.php' ) ){
|
@@ -16,7 +16,9 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
16 |
$breadcrums_id = 'breadcrumbs';
|
17 |
$breadcrums_class = 'breadcrumbs';
|
18 |
$home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
|
19 |
-
|
|
|
|
|
20 |
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
21 |
$custom_taxonomy = 'product_cat';
|
22 |
|
16 |
$breadcrums_id = 'breadcrumbs';
|
17 |
$breadcrums_class = 'breadcrumbs';
|
18 |
$home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
|
19 |
+
if (function_exists('pll__')) {
|
20 |
+
$home_title = pll__(esc_html__( ampforwp_get_setting('amp-translator-breadcrumbs-homepage-text'), 'accelerated-mobile-pages'));
|
21 |
+
}
|
22 |
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
23 |
$custom_taxonomy = 'product_cat';
|
24 |
|
@@ -107,7 +107,12 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
|
|
107 |
if( $my_query->have_posts() ) { ?>
|
108 |
<div class="amp-wp-content relatedpost">
|
109 |
<div class="rp">
|
110 |
-
<span><?php
|
|
|
|
|
|
|
|
|
|
|
111 |
<ol class="clearfix">
|
112 |
<?php
|
113 |
|
107 |
if( $my_query->have_posts() ) { ?>
|
108 |
<div class="amp-wp-content relatedpost">
|
109 |
<div class="rp">
|
110 |
+
<span><?php
|
111 |
+
if (function_exists('pll__')) {
|
112 |
+
echo pll__(esc_html__( ampforwp_get_setting('amp-translator-related-text'), 'accelerated-mobile-pages'));
|
113 |
+
}else{
|
114 |
+
echo esc_attr(ampforwp_translation( ampforwp_get_setting('amp-translator-related-text'), 'Related Post' ));
|
115 |
+
}?></span>
|
116 |
<ol class="clearfix">
|
117 |
<?php
|
118 |
|
@@ -8,7 +8,7 @@ do_action('ampforwp_above_the_title',$this); ?>
|
|
8 |
<?php
|
9 |
$ampforwp_title = $this->get( 'post_title' ) ;
|
10 |
$ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
|
11 |
-
if(!empty($ampforwp_title) && ampforwp_default_logo()){
|
12 |
?>
|
13 |
<h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
|
14 |
<?php
|
8 |
<?php
|
9 |
$ampforwp_title = $this->get( 'post_title' ) ;
|
10 |
$ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
|
11 |
+
if(!empty($ampforwp_title) && ampforwp_default_logo() && ampforwp_get_setting('opt-media','url')!=''){
|
12 |
?>
|
13 |
<h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
|
14 |
<?php
|
@@ -47,8 +47,11 @@ wp_reset_postdata(); ?>
|
|
47 |
<div class="cpr-links">
|
48 |
<p class="copyright_txt"><?php
|
49 |
$allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
52 |
<?php
|
53 |
if ( true == ampforwp_get_setting('amp-footer-link-non-amp-page') ) { ?><p class="rightslink back-to-top"><?php
|
54 |
if(true == ampforwp_get_setting('amp-footer-link-non-amp-page')){
|
47 |
<div class="cpr-links">
|
48 |
<p class="copyright_txt"><?php
|
49 |
$allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
|
50 |
+
if (function_exists('pll__')) {
|
51 |
+
echo strip_tags( pll__(ampforwp_get_setting('amp-translator-footer-text')) ,$allowed_tags );
|
52 |
+
}else {
|
53 |
+
echo strip_tags( ampforwp_translation(ampforwp_get_setting('amp-translator-footer-text'), 'All Rights Reserved') ,$allowed_tags );
|
54 |
+
}?></p>
|
55 |
<?php
|
56 |
if ( true == ampforwp_get_setting('amp-footer-link-non-amp-page') ) { ?><p class="rightslink back-to-top"><?php
|
57 |
if(true == ampforwp_get_setting('amp-footer-link-non-amp-page')){
|
@@ -16,7 +16,9 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
16 |
$breadcrums_id = 'breadcrumbs';
|
17 |
$breadcrums_class = 'breadcrumbs';
|
18 |
$home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
|
19 |
-
|
|
|
|
|
20 |
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
21 |
$custom_taxonomy = 'product_cat';
|
22 |
|
16 |
$breadcrums_id = 'breadcrumbs';
|
17 |
$breadcrums_class = 'breadcrumbs';
|
18 |
$home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
|
19 |
+
if (function_exists('pll__')) {
|
20 |
+
$home_title = pll__(esc_html__( ampforwp_get_setting('amp-translator-breadcrumbs-homepage-text'), 'accelerated-mobile-pages'));
|
21 |
+
}
|
22 |
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
23 |
$custom_taxonomy = 'product_cat';
|
24 |
|
@@ -107,7 +107,12 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
|
|
107 |
if( $my_query->have_posts() ) { ?>
|
108 |
<div class="amp-wp-content relatedpost">
|
109 |
<div class="rp">
|
110 |
-
<span class="related-title"
|
|
|
|
|
|
|
|
|
|
|
111 |
<ol class="clearfix">
|
112 |
<?php
|
113 |
|
107 |
if( $my_query->have_posts() ) { ?>
|
108 |
<div class="amp-wp-content relatedpost">
|
109 |
<div class="rp">
|
110 |
+
<span class="related-title">
|
111 |
+
<?php if (function_exists('pll__')) {
|
112 |
+
echo pll__(esc_html__( ampforwp_get_setting('amp-translator-related-text'), 'accelerated-mobile-pages'));
|
113 |
+
}else{
|
114 |
+
echo esc_attr(ampforwp_translation( ampforwp_get_setting('amp-translator-related-text'), 'Related Post' ));
|
115 |
+
} ?></span>
|
116 |
<ol class="clearfix">
|
117 |
<?php
|
118 |
|
@@ -8,7 +8,7 @@ do_action('ampforwp_above_the_title',$this); ?>
|
|
8 |
<?php
|
9 |
$ampforwp_title = $this->get( 'post_title' );
|
10 |
$ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
|
11 |
-
if(!empty($ampforwp_title) && ampforwp_default_logo()){
|
12 |
?>
|
13 |
<h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
|
14 |
<?php
|
8 |
<?php
|
9 |
$ampforwp_title = $this->get( 'post_title' );
|
10 |
$ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
|
11 |
+
if(!empty($ampforwp_title) && ampforwp_default_logo() && ampforwp_get_setting('opt-media','url')!=''){
|
12 |
?>
|
13 |
<h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
|
14 |
<?php
|
@@ -48,7 +48,11 @@ global $redux_builder_amp;
|
|
48 |
ampforwp_view_nonamp();
|
49 |
}
|
50 |
$allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
|
51 |
-
|
|
|
|
|
|
|
|
|
52 |
?>
|
53 |
<?php do_action('amp_footer_link'); ?>
|
54 |
</div>
|
48 |
ampforwp_view_nonamp();
|
49 |
}
|
50 |
$allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
|
51 |
+
if (function_exists('pll__')) {
|
52 |
+
echo strip_tags( pll__(ampforwp_get_setting('amp-translator-footer-text')) ,$allowed_tags );
|
53 |
+
}else {
|
54 |
+
echo strip_tags( ampforwp_translation(ampforwp_get_setting('amp-translator-footer-text'), 'All Rights Reserved') ,$allowed_tags );
|
55 |
+
}?>
|
56 |
?>
|
57 |
<?php do_action('amp_footer_link'); ?>
|
58 |
</div>
|
@@ -16,7 +16,9 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
16 |
$breadcrums_id = 'breadcrumbs';
|
17 |
$breadcrums_class = 'breadcrumbs';
|
18 |
$home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
|
19 |
-
|
|
|
|
|
20 |
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
21 |
$custom_taxonomy = 'product_cat';
|
22 |
|
16 |
$breadcrums_id = 'breadcrumbs';
|
17 |
$breadcrums_class = 'breadcrumbs';
|
18 |
$home_title = ampforwp_translation($redux_builder_amp['amp-translator-breadcrumbs-homepage-text'] , 'Homepage' );
|
19 |
+
if (function_exists('pll__')) {
|
20 |
+
$home_title = pll__(esc_html__( ampforwp_get_setting('amp-translator-breadcrumbs-homepage-text'), 'accelerated-mobile-pages'));
|
21 |
+
}
|
22 |
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
|
23 |
$custom_taxonomy = 'product_cat';
|
24 |
|
@@ -109,7 +109,12 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
|
|
109 |
if( $my_query->have_posts() ) { ?>
|
110 |
<div class="amp-wp-content relatedpost">
|
111 |
<div class="rp">
|
112 |
-
<span class="related-title"
|
|
|
|
|
|
|
|
|
|
|
113 |
<ol class="clearfix">
|
114 |
<?php
|
115 |
|
109 |
if( $my_query->have_posts() ) { ?>
|
110 |
<div class="amp-wp-content relatedpost">
|
111 |
<div class="rp">
|
112 |
+
<span class="related-title">
|
113 |
+
<?php if (function_exists('pll__')) {
|
114 |
+
echo pll__(esc_html__( ampforwp_get_setting('amp-translator-related-text'), 'accelerated-mobile-pages'));
|
115 |
+
}else{
|
116 |
+
echo esc_attr(ampforwp_translation( ampforwp_get_setting('amp-translator-related-text'), 'Related Post' ));
|
117 |
+
} ?></span>
|
118 |
<ol class="clearfix">
|
119 |
<?php
|
120 |
|
@@ -8,7 +8,7 @@ do_action('ampforwp_above_the_title',$this); ?>
|
|
8 |
<?php
|
9 |
$ampforwp_title = $this->get( 'post_title' ) ;
|
10 |
$ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
|
11 |
-
if(!empty($ampforwp_title) && ampforwp_default_logo()){
|
12 |
?>
|
13 |
<h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
|
14 |
<?php
|
8 |
<?php
|
9 |
$ampforwp_title = $this->get( 'post_title' ) ;
|
10 |
$ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
|
11 |
+
if(!empty($ampforwp_title) && ampforwp_default_logo() && ampforwp_get_setting('opt-media','url')!=''){
|
12 |
?>
|
13 |
<h1 class="amp-wp-title"><?php echo wp_kses_data( $ampforwp_title );?></h1>
|
14 |
<?php
|
@@ -99,7 +99,11 @@ global $redux_builder_amp;
|
|
99 |
<?php } ?>
|
100 |
<p class="rightslink"><?php
|
101 |
$allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
|
102 |
-
|
|
|
|
|
|
|
|
|
103 |
if ( '1' == $redux_builder_amp['amp-footer-link-non-amp-page'] ) {
|
104 |
if ( $redux_builder_amp['amp-translator-footer-text'] ) { ?> | <?php ampforwp_view_nonamp(); }
|
105 |
else {
|
99 |
<?php } ?>
|
100 |
<p class="rightslink"><?php
|
101 |
$allowed_tags = '<p><a><b><strong><i><u><ul><ol><li><h1><h2><h3><h4><h5><h6><table><tr><th><td><em><span>';
|
102 |
+
if (function_exists('pll__')) {
|
103 |
+
echo strip_tags( pll__(ampforwp_get_setting('amp-translator-footer-text')) ,$allowed_tags );
|
104 |
+
}else {
|
105 |
+
echo strip_tags( ampforwp_translation(ampforwp_get_setting('amp-translator-footer-text'), 'All Rights Reserved') ,$allowed_tags );
|
106 |
+
}
|
107 |
if ( '1' == $redux_builder_amp['amp-footer-link-non-amp-page'] ) {
|
108 |
if ( $redux_builder_amp['amp-translator-footer-text'] ) { ?> | <?php ampforwp_view_nonamp(); }
|
109 |
else {
|
@@ -263,7 +263,12 @@ do_action("ampforwp_single_design_type_handle_d1");
|
|
263 |
$results = get_posts($args);
|
264 |
$check_rp= count($results);
|
265 |
if ($check_rp > 1) {?>
|
266 |
-
<h3><?php
|
|
|
|
|
|
|
|
|
|
|
267 |
<?php }
|
268 |
$number_of_posts = 6;
|
269 |
$rcp = ampforwp_get_setting('ampforwp-number-of-recent-posts');
|
263 |
$results = get_posts($args);
|
264 |
$check_rp= count($results);
|
265 |
if ($check_rp > 1) {?>
|
266 |
+
<h3><?php
|
267 |
+
if (function_exists('pll__')) {
|
268 |
+
echo pll__(esc_html__( ampforwp_get_setting('amp-translator-recent-text'), 'accelerated-mobile-pages'));
|
269 |
+
}else {
|
270 |
+
echo esc_html(ampforwp_translation(ampforwp_get_setting('amp-translator-recent-text'), 'Recent Posts' ));
|
271 |
+
}?></h3>
|
272 |
<?php }
|
273 |
$number_of_posts = 6;
|
274 |
$rcp = ampforwp_get_setting('ampforwp-number-of-recent-posts');
|
@@ -734,6 +734,7 @@ if($redux_builder_amp['swift-social-position'] == 'below-content'){?>
|
|
734 |
.cntn-wrp .wp-block-image,.wp-block-embed{margin:15px 0px;}
|
735 |
|
736 |
.wp-block-embed{margin-top:45px;}
|
|
|
737 |
.wp-block-embed blockquote a{
|
738 |
position: absolute;
|
739 |
height: 285px;
|
734 |
.cntn-wrp .wp-block-image,.wp-block-embed{margin:15px 0px;}
|
735 |
|
736 |
.wp-block-embed{margin-top:45px;}
|
737 |
+
figure.wp-block-embed-twitter { margin: 0; }
|
738 |
.wp-block-embed blockquote a{
|
739 |
position: absolute;
|
740 |
height: 285px;
|
@@ -285,7 +285,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
285 |
if ( is_home() && ! ampforwp_is_blog() && !ampforwp_get_setting('ampforwp-homepage-on-off-support') ) {
|
286 |
return;
|
287 |
}
|
288 |
-
if (!ampforwp_is_home() && !ampforwp_is_front_page() && !is_category() && !is_tag() && !is_singular( array('page', 'attachment', 'post'))){
|
289 |
global $post_type;
|
290 |
if (empty(ampforwp_get_setting('ampforwp-custom-type'))) {
|
291 |
return;
|
@@ -419,7 +419,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
419 |
}
|
420 |
if(ampforwp_get_setting('amp-core-end-point') && ampforwp_get_setting('ampforwp-amp-takeover') && is_singular()){
|
421 |
$amp_url = get_the_permalink();
|
422 |
-
}else if(ampforwp_get_setting('amp-core-end-point') && (ampforwp_is_home() || ampforwp_is_front_page())){
|
423 |
$amp_url = ampforwp_url_controller($amp_url);
|
424 |
}
|
425 |
return esc_url_raw($amp_url);
|
@@ -3091,7 +3091,7 @@ function ampforwp_add_sidebar_data( $data ) {
|
|
3091 |
// 44. auto adding /amp for the menu
|
3092 |
add_action('amp_init','ampforwp_auto_add_amp_menu_link_insert');
|
3093 |
function ampforwp_auto_add_amp_menu_link_insert() {
|
3094 |
-
add_action( '
|
3095 |
}
|
3096 |
|
3097 |
function ampforwp_auto_add_amp_in_link_check() {
|
@@ -3887,8 +3887,7 @@ function ampforwp_view_nonamp(){
|
|
3887 |
$non_amp_url = '';
|
3888 |
}
|
3889 |
|
3890 |
-
if ( $non_amp_url ) { ?><a class="view-non-amp" href="<?php echo esc_url(apply_filters('ampforwp_view_nonamp_url', $non_amp_url) ) ?>" <?php echo esc_attr($nofollow); ?> title="<?php echo ampforwp_get_setting('amp-translator-non-amp-page-text') ?>"><?php echo esc_html__( ampforwp_get_setting('amp-translator-non-amp-page-text'), 'accelerated-mobile-pages') ;?></a> <?php
|
3891 |
-
}
|
3892 |
}
|
3893 |
|
3894 |
//68. Facebook Instant Articles
|
@@ -7498,6 +7497,9 @@ if ( ! function_exists('ampforwp_search_form') ) {
|
|
7498 |
function ampforwp_search_form($form){
|
7499 |
if ( ampforwp_is_amp_endpoint() ) {
|
7500 |
$placeholder = ampforwp_translation(ampforwp_get_setting('ampforwp-search-placeholder'), 'Type Here' );
|
|
|
|
|
|
|
7501 |
$widgetlabel = ampforwp_translation(ampforwp_get_setting('ampforwp-search-widget-label'), 'Search for:' );
|
7502 |
$form = '<form role="search" method="get" id="searchform" class="search-form" action="' . esc_url( home_url( '/' ) ) . '" target="_top">
|
7503 |
<label>
|
@@ -8467,7 +8469,7 @@ if(!function_exists('ampforwp_get_retina_image_settings')){
|
|
8467 |
if(!function_exists('ampforwp_add_fallback_element')){
|
8468 |
function ampforwp_add_fallback_element($content='',$tag=''){
|
8469 |
preg_match_all('/<'.$tag.' (.*?)<\/'.$tag.'>/', $content, $matches);
|
8470 |
-
if(!empty($matches)){
|
8471 |
if(isset($matches[0])){
|
8472 |
$con = "";
|
8473 |
for($i=0;$i<count($matches[0]);$i++){
|
@@ -8624,8 +8626,11 @@ function ampforwp_themify_compatibility($content){
|
|
8624 |
$get_data = get_post_meta(ampforwp_get_the_ID(),'_themify_builder_settings_json',true);
|
8625 |
if($get_data){
|
8626 |
$decode = json_decode($get_data,true);
|
|
|
8627 |
for($i=0;$i<count($decode);$i++){
|
8628 |
-
$
|
|
|
|
|
8629 |
for($j=0;$j<count($cols);$j++){
|
8630 |
if (isset($cols[$j]['modules'])) {
|
8631 |
$modules = $cols[$j]['modules'];
|
@@ -8654,7 +8659,9 @@ function ampforwp_rank_math_external_link_newtab($content){
|
|
8654 |
if(ampforwp_isexternal($url)){
|
8655 |
$url = esc_url($url);
|
8656 |
$url = str_replace("/", "\/", $url);
|
8657 |
-
|
|
|
|
|
8658 |
}
|
8659 |
}
|
8660 |
}
|
@@ -8932,4 +8939,11 @@ if( !function_exists( 'fifu_amp_url' ) ) {
|
|
8932 |
}
|
8933 |
return array(0 => $url, 1 => $width, 2 => $height);
|
8934 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8935 |
}
|
285 |
if ( is_home() && ! ampforwp_is_blog() && !ampforwp_get_setting('ampforwp-homepage-on-off-support') ) {
|
286 |
return;
|
287 |
}
|
288 |
+
if (!ampforwp_is_home() && !ampforwp_is_front_page() && !ampforwp_is_blog() && !is_category() && !is_tag() && !is_singular( array('page', 'attachment', 'post'))){
|
289 |
global $post_type;
|
290 |
if (empty(ampforwp_get_setting('ampforwp-custom-type'))) {
|
291 |
return;
|
419 |
}
|
420 |
if(ampforwp_get_setting('amp-core-end-point') && ampforwp_get_setting('ampforwp-amp-takeover') && is_singular()){
|
421 |
$amp_url = get_the_permalink();
|
422 |
+
}else if(ampforwp_get_setting('amp-core-end-point') && (ampforwp_is_home() || ampforwp_is_front_page() || ampforwp_is_blog() || is_category() || is_tag())){
|
423 |
$amp_url = ampforwp_url_controller($amp_url);
|
424 |
}
|
425 |
return esc_url_raw($amp_url);
|
3091 |
// 44. auto adding /amp for the menu
|
3092 |
add_action('amp_init','ampforwp_auto_add_amp_menu_link_insert');
|
3093 |
function ampforwp_auto_add_amp_menu_link_insert() {
|
3094 |
+
add_action( 'pre_amp_render_post', 'ampforwp_auto_add_amp_in_link_check', 99 );
|
3095 |
}
|
3096 |
|
3097 |
function ampforwp_auto_add_amp_in_link_check() {
|
3887 |
$non_amp_url = '';
|
3888 |
}
|
3889 |
|
3890 |
+
if ( $non_amp_url ) { ?><a class="view-non-amp" href="<?php echo esc_url(apply_filters('ampforwp_view_nonamp_url', $non_amp_url) ) ?>" <?php echo esc_attr($nofollow); ?> title="<?php echo ampforwp_get_setting('amp-translator-non-amp-page-text') ?>"><?php if(function_exists('pll__')){echo pll__(esc_html__( ampforwp_get_setting('amp-translator-non-amp-page-text'), 'accelerated-mobile-pages'));}else{echo esc_html__( ampforwp_get_setting('amp-translator-non-amp-page-text'), 'accelerated-mobile-pages');?></a> <?php }}
|
|
|
3891 |
}
|
3892 |
|
3893 |
//68. Facebook Instant Articles
|
7497 |
function ampforwp_search_form($form){
|
7498 |
if ( ampforwp_is_amp_endpoint() ) {
|
7499 |
$placeholder = ampforwp_translation(ampforwp_get_setting('ampforwp-search-placeholder'), 'Type Here' );
|
7500 |
+
if (function_exists('pll__')) {
|
7501 |
+
$placeholder = pll__(esc_html__( ampforwp_get_setting('ampforwp-search-placeholder'), 'accelerated-mobile-pages'));
|
7502 |
+
}
|
7503 |
$widgetlabel = ampforwp_translation(ampforwp_get_setting('ampforwp-search-widget-label'), 'Search for:' );
|
7504 |
$form = '<form role="search" method="get" id="searchform" class="search-form" action="' . esc_url( home_url( '/' ) ) . '" target="_top">
|
7505 |
<label>
|
8469 |
if(!function_exists('ampforwp_add_fallback_element')){
|
8470 |
function ampforwp_add_fallback_element($content='',$tag=''){
|
8471 |
preg_match_all('/<'.$tag.' (.*?)<\/'.$tag.'>/', $content, $matches);
|
8472 |
+
if(!empty($matches) && false == ampforwp_get_setting('ampforwp-amp-convert-to-wp')){
|
8473 |
if(isset($matches[0])){
|
8474 |
$con = "";
|
8475 |
for($i=0;$i<count($matches[0]);$i++){
|
8626 |
$get_data = get_post_meta(ampforwp_get_the_ID(),'_themify_builder_settings_json',true);
|
8627 |
if($get_data){
|
8628 |
$decode = json_decode($get_data,true);
|
8629 |
+
$cols = '';
|
8630 |
for($i=0;$i<count($decode);$i++){
|
8631 |
+
if(isset($decode[$i]['cols'])){
|
8632 |
+
$cols = $decode[$i]['cols'];
|
8633 |
+
}
|
8634 |
for($j=0;$j<count($cols);$j++){
|
8635 |
if (isset($cols[$j]['modules'])) {
|
8636 |
$modules = $cols[$j]['modules'];
|
8659 |
if(ampforwp_isexternal($url)){
|
8660 |
$url = esc_url($url);
|
8661 |
$url = str_replace("/", "\/", $url);
|
8662 |
+
if(preg_match('/<a(.*?)href="'.$url.'"(.*?)<\/a>/' , $content)){
|
8663 |
+
$content = preg_replace('/<a(.*?)href="'.$url.'"(.*?)<\/a>/', '<a$1 target="_blank" href="'.stripcslashes($url).'"$2</a>', $content);
|
8664 |
+
}
|
8665 |
}
|
8666 |
}
|
8667 |
}
|
8939 |
}
|
8940 |
return array(0 => $url, 1 => $width, 2 => $height);
|
8941 |
}
|
8942 |
+
}
|
8943 |
+
add_filter('ampforwp_post_template_data','ampforwp_amp_bind_script');
|
8944 |
+
function ampforwp_amp_bind_script($data) {
|
8945 |
+
if ( empty( $data['amp_component_scripts']['amp-bind'] ) ) {
|
8946 |
+
$data['amp_component_scripts']['amp-bind'] = 'https://cdn.ampproject.org/v0/amp-bind-latest.js';
|
8947 |
+
}
|
8948 |
+
return $data;
|
8949 |
}
|