Version Description
(1st October 2021) = * Improvements: Added Plausible analytics compatible in AMP #5142 * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146 * Fixed: Author profile images not loading from Ultimate Member plugin #5141 * Fixed: AMP Page builder content not rendering with Muffin builder #5147 * Fixed: Debug log Errors #5145
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.77.25 |
Comparing to | |
See all releases |
Code changes from version 1.0.77.24 to 1.0.77.25
- README.md +8 -4
- accelerated-moblie-pages.php +2 -2
- changelog.txt +7 -0
- classes/class-ampforwp-walker-nav-menu.php +1 -1
- components/components-core.php +2 -1
- includes/features/analytics/analytics-functions.php +30 -0
- includes/features/analytics/analytics-options.php +10 -0
- includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php +53 -0
- includes/vendor/amp/includes/utils/class-amp-image-dimension-extractor.php +3 -1
- readme.txt +8 -4
- templates/design-manager/design-3/archive.php +7 -0
- templates/design-manager/design-3/elements/featured-image.php +1 -1
- templates/features.php +5 -5
README.md
CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 1.0.77.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -197,6 +197,13 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
197 |
|
198 |
== Changelog ==
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
= 1.0.77.24 (23rd September 2021) =
|
201 |
* Improvements: Added Filter to disable AMP for all categories except one #5139
|
202 |
* Improvements: Added Ninja Form in the description of contact form module #5138
|
@@ -212,7 +219,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
212 |
* Improvements: Added an option to move sponsorship label above the ad
|
213 |
* Improvements: Updated the facebook instant articles to 50 when limit is not set #5131
|
214 |
|
215 |
-
= 1.0.77.22 (6th September 2021) =
|
216 |
-
* Fixed: Validation error with rankmath's "open external links in new tab" option #5129
|
217 |
-
|
218 |
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.8
|
7 |
+
Stable tag: 1.0.77.25
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
197 |
|
198 |
== Changelog ==
|
199 |
|
200 |
+
= 1.0.77.25 (1st October 2021) =
|
201 |
+
* Improvements: Added Plausible analytics compatible in AMP #5142
|
202 |
+
* Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
|
203 |
+
* Fixed: Author profile images not loading from Ultimate Member plugin #5141
|
204 |
+
* Fixed: AMP Page builder content not rendering with Muffin builder #5147
|
205 |
+
* Fixed: Debug log Errors #5145
|
206 |
+
|
207 |
= 1.0.77.24 (23rd September 2021) =
|
208 |
* Improvements: Added Filter to disable AMP for all categories except one #5139
|
209 |
* Improvements: Added Ninja Form in the description of contact form module #5138
|
219 |
* Improvements: Added an option to move sponsorship label above the ad
|
220 |
* Improvements: Updated the facebook instant articles to 50 when limit is not set #5131
|
221 |
|
|
|
|
|
|
|
222 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
accelerated-moblie-pages.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accelerated Mobile Pages
|
4 |
Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
|
5 |
Description: AMP for WP - Accelerated Mobile Pages for WordPress
|
6 |
-
Version: 1.0.77.
|
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.77.
|
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.77.25
|
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.77.25');
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
changelog.txt
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.77.24 (23rd September 2021) =
|
4 |
* Improvements: Added Filter to disable AMP for all categories except one #5139
|
5 |
* Improvements: Added Ninja Form in the description of contact form module #5138
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.77.25 (1st October 2021) =
|
4 |
+
* Improvements: Added Plausible analytics compatible in AMP #5142
|
5 |
+
* Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
|
6 |
+
* Fixed: Author profile images not loading from Ultimate Member plugin #5141
|
7 |
+
* Fixed: AMP Page builder content not rendering with Muffin builder #5147
|
8 |
+
* Fixed: Debug log Errors #5145
|
9 |
+
|
10 |
= 1.0.77.24 (23rd September 2021) =
|
11 |
* Improvements: Added Filter to disable AMP for all categories except one #5139
|
12 |
* Improvements: Added Ninja Form in the description of contact form module #5138
|
classes/class-ampforwp-walker-nav-menu.php
CHANGED
@@ -77,7 +77,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
77 |
$attributes .= ' data-toggle="dropdown"';
|
78 |
}
|
79 |
global $is_safari;
|
80 |
-
if ($is_safari || strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox')) {
|
81 |
$attributes .= 'on="tap:sidebar.close"';
|
82 |
}
|
83 |
$item_output = isset($args->before) ? $args->before : 1;
|
77 |
$attributes .= ' data-toggle="dropdown"';
|
78 |
}
|
79 |
global $is_safari;
|
80 |
+
if ($is_safari || ( isset($_SERVER["HTTP_USER_AGENT"]) && strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox'))) {
|
81 |
$attributes .= 'on="tap:sidebar.close"';
|
82 |
}
|
83 |
$item_output = isset($args->before) ? $args->before : 1;
|
components/components-core.php
CHANGED
@@ -526,8 +526,9 @@ function amp_content($post_id= ''){
|
|
526 |
// Custom/Alternative AMP content added through post meta
|
527 |
$ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
|
528 |
}
|
|
|
529 |
// Muffin Builder Compatibility #1455 #1893 #4983
|
530 |
-
if ( class_exists('Mfn_Builder_Front') && ! $amp_custom_content_enable ) {
|
531 |
$mfn_page = get_post_field( 'mfn-page-items-seo', ampforwp_get_the_ID());
|
532 |
if (!empty($mfn_page)) {
|
533 |
$mfn_builder = $content = '';
|
526 |
// Custom/Alternative AMP content added through post meta
|
527 |
$ampforwp_the_content = $thisTemplate->get( 'ampforwp_amp_content' );
|
528 |
}
|
529 |
+
$ampforwp_pb = get_post_meta(ampforwp_get_the_ID(),'ampforwp_page_builder_enable', true);
|
530 |
// Muffin Builder Compatibility #1455 #1893 #4983
|
531 |
+
if ( isset($ampforwp_pb) && $ampforwp_pb != "yes" && class_exists('Mfn_Builder_Front') && ! $amp_custom_content_enable ) {
|
532 |
$mfn_page = get_post_field( 'mfn-page-items-seo', ampforwp_get_the_ID());
|
533 |
if (!empty($mfn_page)) {
|
534 |
$mfn_builder = $content = '';
|
includes/features/analytics/analytics-functions.php
CHANGED
@@ -335,6 +335,36 @@ function ampforwp_analytics() {
|
|
335 |
</script>
|
336 |
</amp-analytics>
|
337 |
<?php } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
if( true == ampforwp_get_setting('ampforwp-iotech-switch')) {
|
339 |
$project_id = $id = $title = $author = $categories = $cat_names = '';
|
340 |
$project_id = ampforwp_get_setting('ampforwp-iotech-projectid');
|
335 |
</script>
|
336 |
</amp-analytics>
|
337 |
<?php } }
|
338 |
+
if( true == ampforwp_get_setting('ampforwp-plausible-switch')) {
|
339 |
+
$site_url = site_url();?>
|
340 |
+
<amp-analytics>
|
341 |
+
<script type="application/json">
|
342 |
+
{
|
343 |
+
"vars": {
|
344 |
+
"dataDomain": "<?php echo esc_attr($site_url);?>"
|
345 |
+
},
|
346 |
+
"requests": {
|
347 |
+
"event": "https://plausible.io/api/event"
|
348 |
+
},
|
349 |
+
"triggers": {
|
350 |
+
"trackPageview": {
|
351 |
+
"on": "visible",
|
352 |
+
"request": "event",
|
353 |
+
"extraUrlParams": {
|
354 |
+
"n": "pageview"
|
355 |
+
}
|
356 |
+
},
|
357 |
+
},
|
358 |
+
"transport": {
|
359 |
+
"beacon": true,
|
360 |
+
"xhrpost": true,
|
361 |
+
"image": false,
|
362 |
+
"useBody": true
|
363 |
+
}
|
364 |
+
}
|
365 |
+
</script>
|
366 |
+
</amp-analytics>
|
367 |
+
<?php }
|
368 |
if( true == ampforwp_get_setting('ampforwp-iotech-switch')) {
|
369 |
$project_id = $id = $title = $author = $categories = $cat_names = '';
|
370 |
$project_id = ampforwp_get_setting('ampforwp-iotech-projectid');
|
includes/features/analytics/analytics-options.php
CHANGED
@@ -639,6 +639,16 @@ function ampforwp_analytics_options($opt_name){
|
|
639 |
'tooltip-subtitle' => esc_html__( 'Enter Your Counter ID Here','accelerated-mobile-pages'),
|
640 |
'required' => array('ampforwp-topmailru-switch', '=' , '1')
|
641 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
)
|
643 |
)
|
644 |
);
|
639 |
'tooltip-subtitle' => esc_html__( 'Enter Your Counter ID Here','accelerated-mobile-pages'),
|
640 |
'required' => array('ampforwp-topmailru-switch', '=' , '1')
|
641 |
),
|
642 |
+
|
643 |
+
//Plausible Analytics
|
644 |
+
array(
|
645 |
+
'id' =>'ampforwp-plausible-switch',
|
646 |
+
'type' => 'switch',
|
647 |
+
'title' => esc_html__('Plausible Analytics','accelerated-mobile-pages'),
|
648 |
+
'default' => 0,
|
649 |
+
'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
|
650 |
+
esc_html__('Enable this option to track plausible analytics in AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-plausible-analytics-in-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
|
651 |
+
),
|
652 |
)
|
653 |
)
|
654 |
);
|
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php
CHANGED
@@ -1904,6 +1904,59 @@ class AMP_Allowed_Tags_Generated {
|
|
1904 |
),
|
1905 |
),
|
1906 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1907 |
'amp-nexxtv-player' => array(
|
1908 |
array(
|
1909 |
'attr_spec_list' => array(
|
1904 |
),
|
1905 |
),
|
1906 |
),
|
1907 |
+
'amp-minute-media-player' => array(
|
1908 |
+
array(
|
1909 |
+
'attr_spec_list' => array(
|
1910 |
+
'autoplay' => array(),
|
1911 |
+
'data-content-id' => array(),
|
1912 |
+
'data-content-type' => array(
|
1913 |
+
'mandatory' => true,
|
1914 |
+
'value' => array(
|
1915 |
+
'curated',
|
1916 |
+
'semantic',
|
1917 |
+
'specific',
|
1918 |
+
),
|
1919 |
+
),
|
1920 |
+
'data-minimum-date-factor' => array(),
|
1921 |
+
'data-scanned-element' => array(),
|
1922 |
+
'data-scanned-element-type' => array(
|
1923 |
+
'value' => array(
|
1924 |
+
'className',
|
1925 |
+
'id',
|
1926 |
+
'tag',
|
1927 |
+
),
|
1928 |
+
),
|
1929 |
+
'data-scoped-keywords' => array(),
|
1930 |
+
'data-tags' => array(),
|
1931 |
+
'dock' => array(
|
1932 |
+
'requires_extension' => array(
|
1933 |
+
'amp-video-docking',
|
1934 |
+
),
|
1935 |
+
),
|
1936 |
+
'media' => array(),
|
1937 |
+
'noloading' => array(
|
1938 |
+
'value' => array(
|
1939 |
+
'',
|
1940 |
+
),
|
1941 |
+
),
|
1942 |
+
),
|
1943 |
+
'tag_spec' => array(
|
1944 |
+
'amp_layout' => array(
|
1945 |
+
'supported_layouts' => array(
|
1946 |
+
6,
|
1947 |
+
2,
|
1948 |
+
3,
|
1949 |
+
7,
|
1950 |
+
4,
|
1951 |
+
),
|
1952 |
+
),
|
1953 |
+
'requires_extension' => array(
|
1954 |
+
'amp-minute-media-player',
|
1955 |
+
),
|
1956 |
+
'spec_url' => 'https://amp.dev/documentation/components/amp-minute-media-player/',
|
1957 |
+
),
|
1958 |
+
),
|
1959 |
+
),
|
1960 |
'amp-nexxtv-player' => array(
|
1961 |
array(
|
1962 |
'attr_spec_list' => array(
|
includes/vendor/amp/includes/utils/class-amp-image-dimension-extractor.php
CHANGED
@@ -244,7 +244,9 @@ class AMP_Image_Dimension_Extractor {
|
|
244 |
if (array_key_exists( 1, $parsed_url )){
|
245 |
$height = explode( '.', $parsed_url[1] );
|
246 |
}
|
247 |
-
|
|
|
|
|
248 |
}
|
249 |
}
|
250 |
}
|
244 |
if (array_key_exists( 1, $parsed_url )){
|
245 |
$height = explode( '.', $parsed_url[1] );
|
246 |
}
|
247 |
+
if (isset($height[0]) && !empty($height[0])) {
|
248 |
+
$image_data['size'] = array( $parsed_url[0], $height[0] );
|
249 |
+
}
|
250 |
}
|
251 |
}
|
252 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
|
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 1.0.77.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -194,6 +194,13 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
= 1.0.77.24 (23rd September 2021) =
|
198 |
* Improvements: Added Filter to disable AMP for all categories except one #5139
|
199 |
* Improvements: Added Ninja Form in the description of contact form module #5138
|
@@ -209,7 +216,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
209 |
* Improvements: Added an option to move sponsorship label above the ad
|
210 |
* Improvements: Updated the facebook instant articles to 50 when limit is not set #5131
|
211 |
|
212 |
-
= 1.0.77.22 (6th September 2021) =
|
213 |
-
* Fixed: Validation error with rankmath's "open external links in new tab" option #5129
|
214 |
-
|
215 |
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.8
|
7 |
+
Stable tag: 1.0.77.25
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
194 |
|
195 |
== Changelog ==
|
196 |
|
197 |
+
= 1.0.77.25 (1st October 2021) =
|
198 |
+
* Improvements: Added Plausible analytics compatible in AMP #5142
|
199 |
+
* Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
|
200 |
+
* Fixed: Author profile images not loading from Ultimate Member plugin #5141
|
201 |
+
* Fixed: AMP Page builder content not rendering with Muffin builder #5147
|
202 |
+
* Fixed: Debug log Errors #5145
|
203 |
+
|
204 |
= 1.0.77.24 (23rd September 2021) =
|
205 |
* Improvements: Added Filter to disable AMP for all categories except one #5139
|
206 |
* Improvements: Added Ninja Form in the description of contact form module #5138
|
216 |
* Improvements: Added an option to move sponsorship label above the ad
|
217 |
* Improvements: Updated the facebook instant articles to 50 when limit is not set #5131
|
218 |
|
|
|
|
|
|
|
219 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
templates/design-manager/design-3/archive.php
CHANGED
@@ -83,6 +83,13 @@ if ( get_query_var( 'paged' ) ) {
|
|
83 |
$curauth = (get_query_var('author_name')) ? get_user_by('slug', esc_attr($author_name)) : get_userdata(esc_attr($author));
|
84 |
if( true == ampforwp_gravatar_checker($curauth->user_email) ){
|
85 |
$curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
if($curauth_url){ ?>
|
87 |
<div class="amp-wp-content author-img">
|
88 |
<amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> src="<?php echo esc_url($curauth_url); ?>" width="90" height="90" layout="responsive"></amp-img>
|
83 |
$curauth = (get_query_var('author_name')) ? get_user_by('slug', esc_attr($author_name)) : get_userdata(esc_attr($author));
|
84 |
if( true == ampforwp_gravatar_checker($curauth->user_email) ){
|
85 |
$curauth_url = get_avatar_url( $curauth->user_email, array('size'=>180) );
|
86 |
+
if(class_exists( 'UM_Functions' )){
|
87 |
+
$author = get_user_by( 'slug', get_query_var( 'author_name' ) );
|
88 |
+
$author_id = $author->ID;
|
89 |
+
if(isset($author_id)){
|
90 |
+
$curauth_url = "".esc_url(get_site_url())."/wp-content/uploads/ultimatemember/".intval($author_id)."/profile_photo-190x190.jpg";
|
91 |
+
}
|
92 |
+
}
|
93 |
if($curauth_url){ ?>
|
94 |
<div class="amp-wp-content author-img">
|
95 |
<amp-img <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> src="<?php echo esc_url($curauth_url); ?>" width="90" height="90" layout="responsive"></amp-img>
|
templates/design-manager/design-3/elements/featured-image.php
CHANGED
@@ -12,7 +12,7 @@ $featured_image = $this->get( 'featured_image' );
|
|
12 |
if($featured_image || ( ampforwp_is_custom_field_featured_image() && ampforwp_cf_featured_image_src() ) || true == $redux_builder_amp['ampforwp-featured-image-from-content'] || (class_exists('Bunyad') && Bunyad::posts()->meta('featured_video')) || (function_exists('has_post_video') && has_post_video($post->ID))){
|
13 |
|
14 |
$get_webp = $get_webp_type = "";
|
15 |
-
$get_webp = get_post_thumbnail_id(
|
16 |
if ($get_webp ){
|
17 |
$get_webp_type = get_post_mime_type( $get_webp );
|
18 |
}
|
12 |
if($featured_image || ( ampforwp_is_custom_field_featured_image() && ampforwp_cf_featured_image_src() ) || true == $redux_builder_amp['ampforwp-featured-image-from-content'] || (class_exists('Bunyad') && Bunyad::posts()->meta('featured_video')) || (function_exists('has_post_video') && has_post_video($post->ID))){
|
13 |
|
14 |
$get_webp = $get_webp_type = "";
|
15 |
+
$get_webp = get_post_thumbnail_id( ampforwp_get_the_ID() );
|
16 |
if ($get_webp ){
|
17 |
$get_webp_type = get_post_mime_type( $get_webp );
|
18 |
}
|
templates/features.php
CHANGED
@@ -6995,15 +6995,15 @@ if ( ! function_exists('ampforwp_ia_meta_box') ) {
|
|
6995 |
function ampforwp_ia_meta_callback( $post ) {
|
6996 |
global $redux_builder_amp;
|
6997 |
wp_nonce_field( basename( __FILE__ ), 'ampforwp_ia_nonce' );
|
6998 |
-
$ampforwp_stored_meta = get_post_meta(
|
6999 |
if ( ! isset($ampforwp_stored_meta['ampforwp-ia-on-off']) && ! isset($ampforwp_stored_meta['ampforwp-ia-on-off'][0]) && $ampforwp_stored_meta['ampforwp-ia-on-off'][0] == 'hide-ia') {
|
7000 |
$exclude_post_value = get_option('ampforwp_ia_exclude_post');
|
7001 |
if ( $exclude_post_value == null ) {
|
7002 |
$exclude_post_value[] = 0;
|
7003 |
}
|
7004 |
if ( $exclude_post_value ) {
|
7005 |
-
if ( ! in_array(
|
7006 |
-
$exclude_post_value[] =
|
7007 |
update_option('ampforwp_ia_exclude_post', $exclude_post_value);
|
7008 |
}
|
7009 |
}
|
@@ -7013,8 +7013,8 @@ function ampforwp_ia_meta_callback( $post ) {
|
|
7013 |
$exclude_post_value[] = 0;
|
7014 |
}
|
7015 |
if ( $exclude_post_value ) {
|
7016 |
-
if ( in_array(
|
7017 |
-
$exclude_ids = array_diff($exclude_post_value, array(
|
7018 |
update_option('ampforwp_ia_exclude_post', $exclude_ids);
|
7019 |
}
|
7020 |
}
|
6995 |
function ampforwp_ia_meta_callback( $post ) {
|
6996 |
global $redux_builder_amp;
|
6997 |
wp_nonce_field( basename( __FILE__ ), 'ampforwp_ia_nonce' );
|
6998 |
+
$ampforwp_stored_meta = get_post_meta( ampforwp_get_the_ID() );
|
6999 |
if ( ! isset($ampforwp_stored_meta['ampforwp-ia-on-off']) && ! isset($ampforwp_stored_meta['ampforwp-ia-on-off'][0]) && $ampforwp_stored_meta['ampforwp-ia-on-off'][0] == 'hide-ia') {
|
7000 |
$exclude_post_value = get_option('ampforwp_ia_exclude_post');
|
7001 |
if ( $exclude_post_value == null ) {
|
7002 |
$exclude_post_value[] = 0;
|
7003 |
}
|
7004 |
if ( $exclude_post_value ) {
|
7005 |
+
if ( ! in_array( ampforwp_get_the_ID(), $exclude_post_value ) ) {
|
7006 |
+
$exclude_post_value[] = ampforwp_get_the_ID();
|
7007 |
update_option('ampforwp_ia_exclude_post', $exclude_post_value);
|
7008 |
}
|
7009 |
}
|
7013 |
$exclude_post_value[] = 0;
|
7014 |
}
|
7015 |
if ( $exclude_post_value ) {
|
7016 |
+
if ( in_array( ampforwp_get_the_ID(), $exclude_post_value ) ) {
|
7017 |
+
$exclude_ids = array_diff($exclude_post_value, array(ampforwp_get_the_ID()) );
|
7018 |
update_option('ampforwp_ia_exclude_post', $exclude_ids);
|
7019 |
}
|
7020 |
}
|