Version Description
(30th December 2020) = * Improvement: Added Oxygen Pagebuilder Compatibility for AMP Pagebuilder Extension #4868 * Improvement: Added disable right click option on AMP for copy protection #4877 * Fixed: Validation Errors when WP Daddy Builder Pro is active #4879 * Fixed: The yoast meta title is not reflecting in AMP with Smartmag theme #4885
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 1.0.74 |
Comparing to | |
See all releases |
Code changes from version 1.0.73 to 1.0.74
- README.md +7 -7
- accelerated-moblie-pages.php +2 -2
- changelog.txt +6 -0
- components/components-core.php +5 -2
- includes/features/pagebuilders-support/pagebuilders_support.php +27 -1
- includes/options/admin-config.php +8 -0
- readme.txt +7 -7
- templates/design-manager/design-1/single.php +6 -3
- templates/design-manager/design-2/single.php +6 -3
- templates/design-manager/design-3/single.php +6 -3
- templates/template-mode/template-mode.php +1 -1
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.6
|
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,12 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
193 |
|
194 |
== Changelog ==
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
= 1.0.73 (23rd December 2020) =
|
197 |
* Fixed: Javascript issues after update to WordPress 5.6 #4867
|
198 |
* Fixed: '-' symbol is not appearing on post title #4866
|
@@ -213,10 +219,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
|
|
213 |
* Fixed: Facebook page embed fails #4871
|
214 |
* Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873
|
215 |
|
216 |
-
= 1.0.71.2 (12th December 2020) =
|
217 |
-
* Fixed: Incorrect AMPHTML on homepage with ?amp #4865
|
218 |
-
|
219 |
-
= 1.0.71.1 (10th December 2020) =
|
220 |
-
* Fixed: Validation error in author bio alt attribute #4864
|
221 |
-
|
222 |
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.6
|
7 |
+
Stable tag: 1.0.74
|
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.74 (30th December 2020) =
|
197 |
+
* Improvement: Added Oxygen Pagebuilder Compatibility for AMP Pagebuilder Extension #4868
|
198 |
+
* Improvement: Added disable right click option on AMP for copy protection #4877
|
199 |
+
* Fixed: Validation Errors when WP Daddy Builder Pro is active #4879
|
200 |
+
* Fixed: The yoast meta title is not reflecting in AMP with Smartmag theme #4885
|
201 |
+
|
202 |
= 1.0.73 (23rd December 2020) =
|
203 |
* Fixed: Javascript issues after update to WordPress 5.6 #4867
|
204 |
* Fixed: '-' symbol is not appearing on post title #4866
|
219 |
* Fixed: Facebook page embed fails #4871
|
220 |
* Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873
|
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.
|
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.74
|
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.74');
|
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,11 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.0.73 (23rd December 2020) =
|
4 |
* Fixed: Javascript issues after update to WordPress 5.6 #4867
|
5 |
* Fixed: '-' symbol is not appearing on post title #4866
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.0.74 (30th December 2020) =
|
4 |
+
* Improvement: Added Oxygen Pagebuilder Compatibility for AMP Pagebuilder Extension #4868
|
5 |
+
* Improvement: Added disable right click option on AMP for copy protection #4877
|
6 |
+
* Fixed: Validation Errors when WP Daddy Builder Pro is active #4879
|
7 |
+
* Fixed: The yoast meta title is not reflecting in AMP with Smartmag theme #4885
|
8 |
+
|
9 |
= 1.0.73 (23rd December 2020) =
|
10 |
* Fixed: Javascript issues after update to WordPress 5.6 #4867
|
11 |
* Fixed: '-' symbol is not appearing on post title #4866
|
components/components-core.php
CHANGED
@@ -364,9 +364,12 @@ function amp_header_core(){
|
|
364 |
if( true == ampforwp_get_setting('amp-rtl-select-option') ){
|
365 |
$bodyClass .= ' rtl ';
|
366 |
}
|
367 |
-
$lightbox = '';
|
368 |
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
369 |
$lightbox = 'data-amp-auto-lightbox-disable';
|
|
|
|
|
|
|
370 |
}
|
371 |
?><!doctype html>
|
372 |
<html <?php echo esc_attr(ampforwp_amp_nonamp_convert('amp ')); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
|
@@ -397,7 +400,7 @@ function amp_header_core(){
|
|
397 |
</style>
|
398 |
<?php do_action('ampforwp_before_head', $thisTemplate); ?>
|
399 |
</head>
|
400 |
-
<body <?php echo esc_attr($lightbox); ?> <?php ampforwp_body_class($bodyClass); ?>>
|
401 |
<?php do_action('amp_start', $thisTemplate); ?>
|
402 |
<?php do_action('ampforwp_admin_menu_bar_front'); ?>
|
403 |
<?php do_action('ampforwp_body_beginning', $thisTemplate);
|
364 |
if( true == ampforwp_get_setting('amp-rtl-select-option') ){
|
365 |
$bodyClass .= ' rtl ';
|
366 |
}
|
367 |
+
$lightbox = $right_click = '';
|
368 |
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
369 |
$lightbox = 'data-amp-auto-lightbox-disable';
|
370 |
+
}
|
371 |
+
if( true == ampforwp_get_setting('ampforwp-right-click-disable') ){
|
372 |
+
$right_click = 'oncontextmenu="return false"';
|
373 |
}
|
374 |
?><!doctype html>
|
375 |
<html <?php echo esc_attr(ampforwp_amp_nonamp_convert('amp ')); ?><?php echo AMP_HTML_Utils::build_attributes_string( $thisTemplate->get( 'html_tag_attributes' ) ); ?>>
|
400 |
</style>
|
401 |
<?php do_action('ampforwp_before_head', $thisTemplate); ?>
|
402 |
</head>
|
403 |
+
<body <?php echo sanitize_text_field($right_click); ?><?php echo esc_attr($lightbox); ?> <?php ampforwp_body_class($bodyClass); ?>>
|
404 |
<?php do_action('amp_start', $thisTemplate); ?>
|
405 |
<?php do_action('ampforwp_admin_menu_bar_front'); ?>
|
406 |
<?php do_action('ampforwp_body_beginning', $thisTemplate);
|
includes/features/pagebuilders-support/pagebuilders_support.php
CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit;
|
5 |
}
|
6 |
function ampforwp_page_builders_support_options($opt_name){
|
7 |
-
$divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = $avada_pb_for_ampchecker = $avia_pb_for_ampchecker = array();
|
8 |
if(!function_exists('amp_pagebuilder_compatibility_init')){
|
9 |
$divi_pb_for_ampchecker = array(
|
10 |
'id' => 'divi_pb_for_amp_info_normal',
|
@@ -42,6 +42,14 @@ if(!function_exists('amp_pagebuilder_compatibility_init')){
|
|
42 |
),
|
43 |
'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder compatibility For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
|
44 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
$pb_for_amp[] = array(
|
47 |
'id' => 'ampforwp-pagebuilder-accor',
|
@@ -130,6 +138,24 @@ if(!function_exists('amp_pagebuilder_compatibility_init')){
|
|
130 |
);
|
131 |
}
|
132 |
$pb_for_amp[] = $avia_pb_for_ampchecker;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
$pb_title = 'Page Builder';
|
134 |
$theme = wp_get_theme(); // gets the current theme
|
135 |
if( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ){
|
4 |
exit;
|
5 |
}
|
6 |
function ampforwp_page_builders_support_options($opt_name){
|
7 |
+
$divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = $avada_pb_for_ampchecker = $avia_pb_for_ampchecker = $oxygen_pb_for_ampchecker = array();
|
8 |
if(!function_exists('amp_pagebuilder_compatibility_init')){
|
9 |
$divi_pb_for_ampchecker = array(
|
10 |
'id' => 'divi_pb_for_amp_info_normal',
|
42 |
),
|
43 |
'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder compatibility For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
|
44 |
);
|
45 |
+
$oxygen_pb_for_ampchecker = array(
|
46 |
+
'id' => 'oxygen_pb_for_amp_info_normal',
|
47 |
+
'type' => 'info',
|
48 |
+
'required' => array(
|
49 |
+
array('ampforwp-oxygen-pb-for-amp', '=' , true),
|
50 |
+
),
|
51 |
+
'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder compatibility For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
|
52 |
+
);
|
53 |
}
|
54 |
$pb_for_amp[] = array(
|
55 |
'id' => 'ampforwp-pagebuilder-accor',
|
138 |
);
|
139 |
}
|
140 |
$pb_for_amp[] = $avia_pb_for_ampchecker;
|
141 |
+
if (is_plugin_active('oxygen/functions.php')) {
|
142 |
+
$pb_for_amp[] = array(
|
143 |
+
'id' => 'ampforwp-oxygen-pb-for-amp-accor',
|
144 |
+
'type' => 'section',
|
145 |
+
'title' => esc_html__('Oxygen Compatibility', 'accelerated-mobile-pages'),
|
146 |
+
'indent' => true,
|
147 |
+
'layout_type' => 'accordion',
|
148 |
+
'accordion-open'=> 1,
|
149 |
+
);
|
150 |
+
$pb_for_amp[] = array(
|
151 |
+
'id' => 'ampforwp-oxygen-pb-for-amp',
|
152 |
+
'type' => 'switch',
|
153 |
+
'title' => esc_html__('Oxygen Support','accelerated-mobile-pages'),
|
154 |
+
'tooltip-subtitle' => esc_html__('Enable or Disable the Oxygen support for AMP', 'accelerated-mobile-pages'),
|
155 |
+
'default' => false
|
156 |
+
);
|
157 |
+
}
|
158 |
+
$pb_for_amp[] = $oxygen_pb_for_ampchecker;
|
159 |
$pb_title = 'Page Builder';
|
160 |
$theme = wp_get_theme(); // gets the current theme
|
161 |
if( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ){
|
includes/options/admin-config.php
CHANGED
@@ -2962,6 +2962,14 @@ Redux::setSection( $opt_name, array(
|
|
2962 |
array('ampforwp-amp-takeover', '=' , '0'),
|
2963 |
)
|
2964 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2965 |
array(
|
2966 |
'id' => 'amp-header-text-area-for-html',
|
2967 |
'type' => 'textarea',
|
2962 |
array('ampforwp-amp-takeover', '=' , '0'),
|
2963 |
)
|
2964 |
),
|
2965 |
+
array(
|
2966 |
+
'id' => 'ampforwp-right-click-disable',
|
2967 |
+
'type' => 'switch',
|
2968 |
+
'title' => esc_html__('Disable Right Click', 'accelerated-mobile-pages'),
|
2969 |
+
'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
|
2970 |
+
esc_html__('Enable this option if you want a disable the right click in AMP to protect your data from copying', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-disable-right-click-in-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
|
2971 |
+
'default' => false,
|
2972 |
+
),
|
2973 |
array(
|
2974 |
'id' => 'amp-header-text-area-for-html',
|
2975 |
'type' => 'textarea',
|
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.6
|
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,12 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
190 |
|
191 |
== Changelog ==
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
= 1.0.73 (23rd December 2020) =
|
194 |
* Fixed: Javascript issues after update to WordPress 5.6 #4867
|
195 |
* Fixed: '-' symbol is not appearing on post title #4866
|
@@ -210,10 +216,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
210 |
* Fixed: Facebook page embed fails #4871
|
211 |
* Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873
|
212 |
|
213 |
-
= 1.0.71.2 (12th December 2020) =
|
214 |
-
* Fixed: Incorrect AMPHTML on homepage with ?amp #4865
|
215 |
-
|
216 |
-
= 1.0.71.1 (10th December 2020) =
|
217 |
-
* Fixed: Validation error in author bio alt attribute #4864
|
218 |
-
|
219 |
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.6
|
7 |
+
Stable tag: 1.0.74
|
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.74 (30th December 2020) =
|
194 |
+
* Improvement: Added Oxygen Pagebuilder Compatibility for AMP Pagebuilder Extension #4868
|
195 |
+
* Improvement: Added disable right click option on AMP for copy protection #4877
|
196 |
+
* Fixed: Validation Errors when WP Daddy Builder Pro is active #4879
|
197 |
+
* Fixed: The yoast meta title is not reflecting in AMP with Smartmag theme #4885
|
198 |
+
|
199 |
= 1.0.73 (23rd December 2020) =
|
200 |
* Fixed: Javascript issues after update to WordPress 5.6 #4867
|
201 |
* Fixed: '-' symbol is not appearing on post title #4866
|
216 |
* Fixed: Facebook page embed fails #4871
|
217 |
* Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
templates/design-manager/design-1/single.php
CHANGED
@@ -16,11 +16,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
</style>
|
17 |
</head>
|
18 |
<?php
|
19 |
-
$lightbox = '';
|
20 |
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
21 |
$lightbox = 'data-amp-auto-lightbox-disable ';
|
22 |
-
}
|
23 |
-
|
|
|
|
|
|
|
24 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
25 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
26 |
<?php do_action( 'below_the_header_design_1', $this ); ?>
|
16 |
</style>
|
17 |
</head>
|
18 |
<?php
|
19 |
+
$lightbox = $right_click = '';
|
20 |
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
21 |
$lightbox = 'data-amp-auto-lightbox-disable ';
|
22 |
+
}
|
23 |
+
if( true == ampforwp_get_setting('ampforwp-right-click-disable') ){
|
24 |
+
$right_click = 'oncontextmenu="return false"';
|
25 |
+
}?>
|
26 |
+
<body <?php echo sanitize_text_field($right_click); ?> <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('single-post design_1_wrapper');?>>
|
27 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
28 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
29 |
<?php do_action( 'below_the_header_design_1', $this ); ?>
|
templates/design-manager/design-2/single.php
CHANGED
@@ -17,11 +17,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
</style>
|
18 |
</head>
|
19 |
<?php
|
20 |
-
$lightbox = '';
|
21 |
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
22 |
$lightbox = 'data-amp-auto-lightbox-disable ';
|
23 |
-
}
|
24 |
-
|
|
|
|
|
|
|
25 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
26 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
27 |
|
17 |
</style>
|
18 |
</head>
|
19 |
<?php
|
20 |
+
$lightbox = $right_click = '';
|
21 |
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
22 |
$lightbox = 'data-amp-auto-lightbox-disable ';
|
23 |
+
}
|
24 |
+
if( true == ampforwp_get_setting('ampforwp-right-click-disable') ){
|
25 |
+
$right_click = 'oncontextmenu="return false"';
|
26 |
+
}?>
|
27 |
+
<body <?php echo sanitize_text_field($right_click); ?> <?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('single-post design_2_wrapper');?> >
|
28 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
29 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
30 |
|
templates/design-manager/design-3/single.php
CHANGED
@@ -17,11 +17,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
</style>
|
18 |
</head>
|
19 |
<?php
|
20 |
-
$lightbox = '';
|
21 |
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
22 |
$lightbox = 'data-amp-auto-lightbox-disable ';
|
23 |
-
}
|
24 |
-
|
|
|
|
|
|
|
25 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
26 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
27 |
|
17 |
</style>
|
18 |
</head>
|
19 |
<?php
|
20 |
+
$lightbox = $right_click = '';
|
21 |
if( false == ampforwp_get_setting('ampforwp-amp-img-lightbox') ){
|
22 |
$lightbox = 'data-amp-auto-lightbox-disable ';
|
23 |
+
}
|
24 |
+
if( true == ampforwp_get_setting('ampforwp-right-click-disable') ){
|
25 |
+
$right_click = 'oncontextmenu="return false"';
|
26 |
+
}?>
|
27 |
+
<body <?php echo sanitize_text_field($right_click); ?><?php echo esc_attr($lightbox); ?><?php ampforwp_body_class('design_3_wrapper');?> >
|
28 |
<?php do_action('ampforwp_body_beginning', $this); ?>
|
29 |
<?php $this->load_parts( array( 'header-bar' ) ); ?>
|
30 |
|
templates/template-mode/template-mode.php
CHANGED
@@ -679,7 +679,7 @@ Class AMPforWP_theme_mode{
|
|
679 |
add_action('after_setup_theme', 'ampforwp_template_mode_is_activate', 999);
|
680 |
function ampforwp_template_mode_is_activate(){
|
681 |
$url_path = trim(parse_url(add_query_arg(array()), PHP_URL_PATH),'/' );
|
682 |
-
if(function_exists('td_wp_title') && function_exists('ampforwp_is_amp_inURL') && ampforwp_is_amp_inURL($url_path)){
|
683 |
add_theme_support( 'title-tag' );
|
684 |
}
|
685 |
if(get_theme_support('amp-template-mode') && !is_customize_preview()){
|
679 |
add_action('after_setup_theme', 'ampforwp_template_mode_is_activate', 999);
|
680 |
function ampforwp_template_mode_is_activate(){
|
681 |
$url_path = trim(parse_url(add_query_arg(array()), PHP_URL_PATH),'/' );
|
682 |
+
if((function_exists('td_wp_title') || class_exists('Bunyad_Theme_SmartMag') ) && function_exists('ampforwp_is_amp_inURL') && ampforwp_is_amp_inURL($url_path)){
|
683 |
add_theme_support( 'title-tag' );
|
684 |
}
|
685 |
if(get_theme_support('amp-template-mode') && !is_customize_preview()){
|