Version Description
(23th February 2019) = * Added: Static page template in AMP #2614 + #2900 * Fixed: Font size and other values are properly sanitizing #2898 * Fixed: Failed to parse script tag contents #2884 * Fixed: PHP Notices after the v0.9.97.32 #2879 * Fixed: oembed wordpress post renders as a full post in AMP #2003 * Fixed: Gallery/Slider of AMP pagebuilder not working * Fixed: class are repeating number of times when image (icon) added in .svg format #2893 * Fixed: Debug warnings with WPML #2899 * Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
Full changelog available in changelog.txt
Download this release
Release Info
Developer | ampforwp |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.97.37 |
Comparing to | |
See all releases |
Code changes from version 0.9.97.36 to 0.9.97.37
- README.md +14 -2
- accelerated-moblie-pages.php +2 -2
- changelog.txt +11 -0
- components/theme-loader.php +2 -2
- includes/admin-script.js +7 -5
- includes/options/admin-config.php +2 -2
- includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.php +6 -2
- includes/redirect.php +4 -0
- includes/thirdparty-compatibility.php +2 -2
- includes/vendor/amp/includes/sanitizers/class-amp-img-sanitizer.php +35 -33
- includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php +5 -1
- includes/vendor/vendor-changelog.txt +2 -1
- pagebuilder/amp-page-builder.php +3 -2
- pagebuilder/inc/viewShowFrontData.php +7 -0
- readme.txt +11 -12
- templates/design-manager/swift/style.php +40 -40
- templates/features.php +4 -2
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.0.3
|
7 |
-
Stable tag: 0.9.97.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -28,7 +28,6 @@ We try our best to provide support on WordPress.org forums. However, One-on-one
|
|
28 |
<strong>Bug Reports</strong><br>
|
29 |
Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages). Please note GitHub is _not_ a support forum, and issues that aren't properly qualified as bugs will be closed.
|
30 |
|
31 |
-
|
32 |
= Features: =
|
33 |
|
34 |
* NEW - Gutenberg Support
|
@@ -181,9 +180,22 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
181 |
10. Homepage of Design One
|
182 |
11. Pingdom Speed Report for AMP
|
183 |
|
|
|
|
|
184 |
|
185 |
== Changelog ==
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
= 0.9.97.36 (19th February 2019) =
|
188 |
* Added: Mobile and tablets Detects separately for 'Mobile Redirection' option #2436
|
189 |
* Added: Scrolling bar for swift theme in chrome browser #2593
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.0.3
|
7 |
+
Stable tag: 0.9.97.37
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
28 |
<strong>Bug Reports</strong><br>
|
29 |
Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages). Please note GitHub is _not_ a support forum, and issues that aren't properly qualified as bugs will be closed.
|
30 |
|
|
|
31 |
= Features: =
|
32 |
|
33 |
* NEW - Gutenberg Support
|
180 |
10. Homepage of Design One
|
181 |
11. Pingdom Speed Report for AMP
|
182 |
|
183 |
+
Device testing done through [BrowserStack](https://www.browserstack.com)
|
184 |
+
![BrowserStack](https://user-images.githubusercontent.com/16618009/53022655-a24ea780-3481-11e9-9a48-a2ca5bcd96d6.png)
|
185 |
|
186 |
== Changelog ==
|
187 |
|
188 |
+
= 0.9.97.37 (23th February 2019) =
|
189 |
+
* Added: Static page template in AMP #2614 + #2900
|
190 |
+
* Fixed: Font size and other values are properly sanitizing #2898
|
191 |
+
* Fixed: Failed to parse script tag contents #2884
|
192 |
+
* Fixed: PHP Notices after the v0.9.97.32 #2879
|
193 |
+
* Fixed: oembed wordpress post renders as a full post in AMP #2003
|
194 |
+
* Fixed: Gallery/Slider of AMP pagebuilder not working
|
195 |
+
* Fixed: class are repeating number of times when image (icon) added in .svg format #2893
|
196 |
+
* Fixed: Debug warnings with WPML #2899
|
197 |
+
* Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
|
198 |
+
|
199 |
= 0.9.97.36 (19th February 2019) =
|
200 |
* Added: Mobile and tablets Detects separately for 'Mobile Redirection' option #2436
|
201 |
* Added: Scrolling bar for swift theme in chrome browser #2593
|
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: 0.9.97.
|
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','0.9.97.
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
26 |
$ampforwp_slug = '';
|
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: 0.9.97.37
|
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','0.9.97.37');
|
24 |
// any changes to AMP_QUERY_VAR should be refelected here
|
25 |
function ampforwp_generate_endpoint(){
|
26 |
$ampforwp_slug = '';
|
changelog.txt
CHANGED
@@ -1,5 +1,16 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 0.9.97.36 (19th February 2019) =
|
4 |
* Added: Mobile and tablets Detects separately for 'Mobile Redirection' option #2436
|
5 |
* Added: Scrolling bar for swift theme in chrome browser #2593
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 0.9.97.37 (23th February 2019) =
|
4 |
+
* Added: Static page template in AMP #2614 + #2900
|
5 |
+
* Fixed: Font size and other values are properly sanitizing #2898
|
6 |
+
* Fixed: Failed to parse script tag contents #2884
|
7 |
+
* Fixed: PHP Notices after the v0.9.97.32 #2879
|
8 |
+
* Fixed: oembed wordpress post renders as a full post in AMP #2003
|
9 |
+
* Fixed: Gallery/Slider of AMP pagebuilder not working
|
10 |
+
* Fixed: class are repeating number of times when image (icon) added in .svg format #2893
|
11 |
+
* Fixed: Debug warnings with WPML #2899
|
12 |
+
* Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
|
13 |
+
|
14 |
= 0.9.97.36 (19th February 2019) =
|
15 |
* Added: Mobile and tablets Detects separately for 'Mobile Redirection' option #2436
|
16 |
* Added: Scrolling bar for swift theme in chrome browser #2593
|
components/theme-loader.php
CHANGED
@@ -183,7 +183,7 @@ elseif ( ! defined('AMPFORWP_CUSTOM_THEME') ) {
|
|
183 |
if ( ! empty( $object->post_type ) ) {
|
184 |
$template = get_page_template_slug( $object );
|
185 |
if ( $template && 0 === validate_file( $template ) ) {
|
186 |
-
$templates[] =
|
187 |
}
|
188 |
|
189 |
$name_decoded = urldecode( $object->post_name );
|
@@ -218,7 +218,7 @@ elseif ( ! defined('AMPFORWP_CUSTOM_THEME') ) {
|
|
218 |
|
219 |
$templates = array();
|
220 |
if ( $template && 0 === validate_file( $template ) )
|
221 |
-
$templates[] =
|
222 |
if ( $pagename ) {
|
223 |
$pagename_decoded = urldecode( $pagename );
|
224 |
if ( $pagename_decoded !== $pagename ) {
|
183 |
if ( ! empty( $object->post_type ) ) {
|
184 |
$template = get_page_template_slug( $object );
|
185 |
if ( $template && 0 === validate_file( $template ) ) {
|
186 |
+
$templates[] = AMPFORWP_CUSTOM_THEME.'/'.$template;
|
187 |
}
|
188 |
|
189 |
$name_decoded = urldecode( $object->post_name );
|
218 |
|
219 |
$templates = array();
|
220 |
if ( $template && 0 === validate_file( $template ) )
|
221 |
+
$templates[] = AMPFORWP_CUSTOM_THEME.'/'.$template;
|
222 |
if ( $pagename ) {
|
223 |
$pagename_decoded = urldecode( $pagename );
|
224 |
if ( $pagename_decoded !== $pagename ) {
|
includes/admin-script.js
CHANGED
@@ -596,11 +596,13 @@ AmpForWpYoastAnalysis = function() {
|
|
596 |
* @param data The data to modify
|
597 |
*/
|
598 |
AmpForWpYoastAnalysis.prototype.myContentModification = function(data) {
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
|
|
|
|
604 |
}
|
605 |
return data;
|
606 |
};
|
596 |
* @param data The data to modify
|
597 |
*/
|
598 |
AmpForWpYoastAnalysis.prototype.myContentModification = function(data) {
|
599 |
+
if($('#amp-page-builder-ready').length){
|
600 |
+
var pbdata = $('#amp-page-builder-ready').val();
|
601 |
+
var takeover = redux_data['ampforwp-amp-takeover'];
|
602 |
+
var pb2 = $('input[name="ampforwp_page_builder_enable"]').val();
|
603 |
+
if ( takeover == 1 && 'yes' == pb2 ) {
|
604 |
+
data = pbdata;
|
605 |
+
}
|
606 |
}
|
607 |
return data;
|
608 |
};
|
includes/options/admin-config.php
CHANGED
@@ -2192,8 +2192,8 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
2192 |
"triggers": {
|
2193 |
"trackPageview": {
|
2194 |
"on": "visible",
|
2195 |
-
"request": "pageview"
|
2196 |
-
}
|
2197 |
/**
|
2198 |
* Enter your Advanced Analytics code here
|
2199 |
*/
|
2192 |
"triggers": {
|
2193 |
"trackPageview": {
|
2194 |
"on": "visible",
|
2195 |
+
"request": "pageview"
|
2196 |
+
}
|
2197 |
/**
|
2198 |
* Enter your Advanced Analytics code here
|
2199 |
*/
|
includes/options/extensions/checkbox_hierarchy/checkbox_hierarchy/field_checkbox_hierarchy.php
CHANGED
@@ -158,18 +158,22 @@ if ( !class_exists ( 'ReduxFramework_checkbox_hierarchy' ) ) {
|
|
158 |
echo " selected='selected'";
|
159 |
echo ">$pad$category->name</option>";*/
|
160 |
|
|
|
|
|
|
|
|
|
161 |
|
162 |
echo '<li><label for="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $category->term_id . ']', array(
|
163 |
'[' => '_',
|
164 |
']' => ''
|
165 |
) ) . '_' . array_search ( $category->term_id, array_keys ( $this->field[ 'options' ] ) ) . '">';
|
166 |
if($this->field[ 'name' ]){
|
167 |
-
echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . $this->field[ 'name' ] . '[' . $category->term_id . ']' . $this->field[ 'name_suffix' ] . '" value="' . $
|
168 |
}
|
169 |
echo '<input type="checkbox" class="checkbox ' . $this->field[ 'class' ] . '" id="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $category->term_id . ']', array(
|
170 |
'[' => '_',
|
171 |
']' => ''
|
172 |
-
) ) . '_' . array_search ( $category->term_id, array_keys ( $this->field[ 'options' ] ) ) . '" value="1" ' . checked ( $
|
173 |
echo ' <span>' .$pad. $category->name . '</span></label></li>';
|
174 |
|
175 |
|
158 |
echo " selected='selected'";
|
159 |
echo ">$pad$category->name</option>";*/
|
160 |
|
161 |
+
$selectedvalue = '';
|
162 |
+
if(isset($this->value[ $category->term_id ])){
|
163 |
+
$selectedvalue = $this->value[ $category->term_id ];
|
164 |
+
}
|
165 |
|
166 |
echo '<li><label for="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $category->term_id . ']', array(
|
167 |
'[' => '_',
|
168 |
']' => ''
|
169 |
) ) . '_' . array_search ( $category->term_id, array_keys ( $this->field[ 'options' ] ) ) . '">';
|
170 |
if($this->field[ 'name' ]){
|
171 |
+
echo '<input type="hidden" class="checkbox-check" data-val="1" name="' . $this->field[ 'name' ] . '[' . $category->term_id . ']' . $this->field[ 'name_suffix' ] . '" value="' . $selectedvalue . '" ' . '/>';
|
172 |
}
|
173 |
echo '<input type="checkbox" class="checkbox ' . $this->field[ 'class' ] . '" id="' . strtr ( $this->parent->args[ 'opt_name' ] . '[' . $this->field[ 'id' ] . '][' . $category->term_id . ']', array(
|
174 |
'[' => '_',
|
175 |
']' => ''
|
176 |
+
) ) . '_' . array_search ( $category->term_id, array_keys ( $this->field[ 'options' ] ) ) . '" value="1" ' . checked ( $selectedvalue, '1', false ) . '/>';
|
177 |
echo ' <span>' .$pad. $category->name . '</span></label></li>';
|
178 |
|
179 |
|
includes/redirect.php
CHANGED
@@ -167,6 +167,10 @@ function ampforwp_page_template_redirect() {
|
|
167 |
}else if($isMobile && !$isTablet){ // Only for mobile
|
168 |
$redirectToAMP = true;
|
169 |
}
|
|
|
|
|
|
|
|
|
170 |
|
171 |
// Return if Dev mode is enabled
|
172 |
if ( isset($redux_builder_amp['ampforwp-development-mode']) && $redux_builder_amp['ampforwp-development-mode'] ) {
|
167 |
}else if($isMobile && !$isTablet){ // Only for mobile
|
168 |
$redirectToAMP = true;
|
169 |
}
|
170 |
+
// No mobile redirection on oembeds #2003
|
171 |
+
if ( function_exists('is_embed') && is_embed() ){
|
172 |
+
return;
|
173 |
+
}
|
174 |
|
175 |
// Return if Dev mode is enabled
|
176 |
if ( isset($redux_builder_amp['ampforwp-development-mode']) && $redux_builder_amp['ampforwp-development-mode'] ) {
|
includes/thirdparty-compatibility.php
CHANGED
@@ -315,7 +315,7 @@ if(!function_exists('ampforwp_amp_nonamp_convert')){
|
|
315 |
if ( ! empty( $object->post_type ) ) {
|
316 |
$template = get_page_template_slug( $object );
|
317 |
if ( $template && 0 === validate_file( $template ) ) {
|
318 |
-
$templates[] = $template;
|
319 |
}
|
320 |
|
321 |
$name_decoded = urldecode( $object->post_name );
|
@@ -350,7 +350,7 @@ if(!function_exists('ampforwp_amp_nonamp_convert')){
|
|
350 |
|
351 |
$templates = array();
|
352 |
if ( $template && 0 === validate_file( $template ) )
|
353 |
-
$templates[] = $template;
|
354 |
if ( $pagename ) {
|
355 |
$pagename_decoded = urldecode( $pagename );
|
356 |
if ( $pagename_decoded !== $pagename ) {
|
315 |
if ( ! empty( $object->post_type ) ) {
|
316 |
$template = get_page_template_slug( $object );
|
317 |
if ( $template && 0 === validate_file( $template ) ) {
|
318 |
+
$templates[] = $filePath.'/'.$template;
|
319 |
}
|
320 |
|
321 |
$name_decoded = urldecode( $object->post_name );
|
350 |
|
351 |
$templates = array();
|
352 |
if ( $template && 0 === validate_file( $template ) )
|
353 |
+
$templates[] = $filePath.'/'.$template;
|
354 |
if ( $pagename ) {
|
355 |
$pagename_decoded = urldecode( $pagename );
|
356 |
if ( $pagename_decoded !== $pagename ) {
|
includes/vendor/amp/includes/sanitizers/class-amp-img-sanitizer.php
CHANGED
@@ -71,46 +71,48 @@ class AMP_Img_Sanitizer extends AMP_Base_Sanitizer {
|
|
71 |
*/
|
72 |
private function determine_dimensions( $need_dimensions ) {
|
73 |
$dimensions_by_url = AMP_Image_Dimension_Extractor::extract( array_keys( $need_dimensions ) );
|
74 |
-
|
75 |
foreach ( $dimensions_by_url as $url => $dimensions ) {
|
76 |
foreach ( $need_dimensions[ $url ] as $node ) {
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
$width = ( floatval( $node->getAttribute( 'height' ) ) * $dimensions['width'] ) / $dimensions['height'];
|
91 |
-
}
|
92 |
-
$node->setAttribute( 'width', $width );
|
93 |
-
if ( ! isset( $dimensions['width'] ) ) {
|
94 |
-
$class .= ' amp-wp-unknown-width';
|
95 |
-
}
|
96 |
}
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
$node->setAttribute( 'height', $height );
|
103 |
-
if ( ! isset( $dimensions['height'] ) ) {
|
104 |
-
$class .= ' amp-wp-unknown-height';
|
105 |
-
}
|
106 |
}
|
107 |
-
$node->setAttribute( 'width', $width );
|
108 |
$node->setAttribute( 'height', $height );
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
$node->setAttribute( 'height', $dimensions['height'] );
|
113 |
}
|
|
|
114 |
}
|
115 |
}
|
116 |
}
|
71 |
*/
|
72 |
private function determine_dimensions( $need_dimensions ) {
|
73 |
$dimensions_by_url = AMP_Image_Dimension_Extractor::extract( array_keys( $need_dimensions ) );
|
74 |
+
$class = "";
|
75 |
foreach ( $dimensions_by_url as $url => $dimensions ) {
|
76 |
foreach ( $need_dimensions[ $url ] as $node ) {
|
77 |
+
if ( ! $node instanceof DOMElement ) {
|
78 |
+
continue;
|
79 |
+
}
|
80 |
+
$class = $node->getAttribute( 'class' );
|
81 |
+
if ( ! $class ) {
|
82 |
+
$class = '';
|
83 |
+
}
|
84 |
+
if ( ! $dimensions ) {
|
85 |
+
$class .= ' amp-wp-unknown-size';
|
86 |
+
}
|
87 |
+
$width = isset( $this->args['content_max_width'] ) ? $this->args['content_max_width'] : self::FALLBACK_WIDTH;
|
88 |
+
$height = self::FALLBACK_HEIGHT;
|
89 |
+
if ( isset( $dimensions['width'] ) ) {
|
90 |
+
$width = $dimensions['width'];
|
91 |
+
}
|
92 |
+
if ( isset( $dimensions['height'] ) ) {
|
93 |
+
$height = $dimensions['height'];
|
94 |
+
}
|
95 |
+
if ( ! is_numeric( $node->getAttribute( 'width' ) ) ) {
|
96 |
+
// Let width have the right aspect ratio based on the height attribute.
|
97 |
+
if ( is_numeric( $node->getAttribute( 'height' ) ) && isset( $dimensions['height'] ) && isset( $dimensions['width'] ) ) {
|
98 |
+
$width = ( floatval( $node->getAttribute( 'height' ) ) * $dimensions['width'] ) / $dimensions['height'];
|
99 |
}
|
100 |
+
$node->setAttribute( 'width', $width );
|
101 |
+
if ( ! isset( $dimensions['width'] ) ) {
|
102 |
+
$class .= ' amp-wp-unknown-width';
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
104 |
+
}
|
105 |
+
if ( ! is_numeric( $node->getAttribute( 'height' ) ) ) {
|
106 |
+
// Let height have the right aspect ratio based on the width attribute.
|
107 |
+
if ( is_numeric( $node->getAttribute( 'width' ) ) && isset( $dimensions['width'] ) && isset( $dimensions['height'] ) ) {
|
108 |
+
$height = ( floatval( $node->getAttribute( 'width' ) ) * $dimensions['height'] ) / $dimensions['width'];
|
|
|
|
|
|
|
|
|
109 |
}
|
|
|
110 |
$node->setAttribute( 'height', $height );
|
111 |
+
if ( ! isset( $dimensions['height'] ) ) {
|
112 |
+
$class .= ' amp-wp-unknown-height';
|
113 |
+
}
|
|
|
114 |
}
|
115 |
+
$node->setAttribute( 'class', trim( $class ) );
|
116 |
}
|
117 |
}
|
118 |
}
|
includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php
CHANGED
@@ -203,10 +203,14 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
|
|
203 |
public function get_scripts() {
|
204 |
$scriptArray = array_fill_keys( $this->script_components, true );
|
205 |
foreach ( $scriptArray as $ext_key=>$ext_value ) {
|
|
|
|
|
|
|
|
|
206 |
$scriptArray[$ext_key] = sprintf(
|
207 |
'https://cdn.ampproject.org/v0/%s-%s.js',
|
208 |
$ext_key,
|
209 |
-
|
210 |
);
|
211 |
}
|
212 |
return $scriptArray;
|
203 |
public function get_scripts() {
|
204 |
$scriptArray = array_fill_keys( $this->script_components, true );
|
205 |
foreach ( $scriptArray as $ext_key=>$ext_value ) {
|
206 |
+
$version = 'latest';
|
207 |
+
if ( 'amp-carousel' == $ext_key ) {
|
208 |
+
$version = '0.1';
|
209 |
+
}
|
210 |
$scriptArray[$ext_key] = sprintf(
|
211 |
'https://cdn.ampproject.org/v0/%s-%s.js',
|
212 |
$ext_key,
|
213 |
+
$version
|
214 |
);
|
215 |
}
|
216 |
return $scriptArray;
|
includes/vendor/vendor-changelog.txt
CHANGED
@@ -60,4 +60,5 @@ Reason: To extend the functionality of sidebars and Pagebuilder
|
|
60 |
33. Class AMP_Blacklist_Sanitizer updated #2835
|
61 |
34. class-amp-style-sanitizer.php updated #2745
|
62 |
35. Class AMP_Blacklist_Sanitizer updated for inernal links #2391
|
63 |
-
36. Mobile detect library added from https://github.com/serbanghita/Mobile-Detect
|
|
60 |
33. Class AMP_Blacklist_Sanitizer updated #2835
|
61 |
34. class-amp-style-sanitizer.php updated #2745
|
62 |
35. Class AMP_Blacklist_Sanitizer updated for inernal links #2391
|
63 |
+
36. Mobile detect library added from https://github.com/serbanghita/Mobile-Detect
|
64 |
+
37. Class AMP_Img_Sanitizer Updated #2893
|
pagebuilder/amp-page-builder.php
CHANGED
@@ -130,7 +130,9 @@ function ampforwp_call_page_builder(){
|
|
130 |
unset($backendRowSetting['front_css']);
|
131 |
unset($backendRowSetting['front_common_css']);
|
132 |
wp_nonce_field( basename( __FILE__) , 'amp_content_editor_nonce' );
|
133 |
-
|
|
|
|
|
134 |
<div id="ampForWpPageBuilder_container">
|
135 |
<div id="start_amp_pb_post" class="start_amp_pb" data-postId="<?php echo esc_attr(get_the_ID()) ?>" v-if="startPagebuilder==0" @click="amppb_startFunction($event)"><?php echo esc_html__('Start the AMP Page Builder','accelerated-mobile-pages'); ?></div>
|
136 |
<div class="enable_ampforwp_page_builder" v-if="startPagebuilder==1">
|
@@ -140,7 +142,6 @@ function ampforwp_call_page_builder(){
|
|
140 |
<div id="amp-page-builder" v-if="startPagebuilder==1">
|
141 |
<?php wp_nonce_field( "amppb_nonce_action", "amppb_nonce" ) ?>
|
142 |
<input type="hidden" name="amp-page-builder" id="amp-page-builder-data" class="amp-data" v-model="JSON.stringify(mainContent)" value='<?php echo $previousData; ?>'>
|
143 |
-
<textarea class="hide" id="amp-page-builder-ready"> <?php echo stripcslashes( amppb_post_content('') ); ?></textarea>
|
144 |
<?php /* This is where we gonna add & manage rows */ ?>
|
145 |
<div id="sorted_rows" class="amppb-rows drop" >
|
146 |
<drop class="drop" :class="{'row-dropping':rowOverDrop}" @drop="handleDrop" @dragover="rowOverDrop = true"
|
130 |
unset($backendRowSetting['front_css']);
|
131 |
unset($backendRowSetting['front_common_css']);
|
132 |
wp_nonce_field( basename( __FILE__) , 'amp_content_editor_nonce' );
|
133 |
+
|
134 |
+
if(class_exists('WPSEO_Frontend')) { ?>
|
135 |
+
<textarea class="hide" id="amp-page-builder-ready"><?php echo stripcslashes( amppb_post_content('') ); ?></textarea><?php } ?>
|
136 |
<div id="ampForWpPageBuilder_container">
|
137 |
<div id="start_amp_pb_post" class="start_amp_pb" data-postId="<?php echo esc_attr(get_the_ID()) ?>" v-if="startPagebuilder==0" @click="amppb_startFunction($event)"><?php echo esc_html__('Start the AMP Page Builder','accelerated-mobile-pages'); ?></div>
|
138 |
<div class="enable_ampforwp_page_builder" v-if="startPagebuilder==1">
|
142 |
<div id="amp-page-builder" v-if="startPagebuilder==1">
|
143 |
<?php wp_nonce_field( "amppb_nonce_action", "amppb_nonce" ) ?>
|
144 |
<input type="hidden" name="amp-page-builder" id="amp-page-builder-data" class="amp-data" v-model="JSON.stringify(mainContent)" value='<?php echo $previousData; ?>'>
|
|
|
145 |
<?php /* This is where we gonna add & manage rows */ ?>
|
146 |
<div id="sorted_rows" class="amppb-rows drop" >
|
147 |
<drop class="drop" :class="{'row-dropping':rowOverDrop}" @drop="handleDrop" @dragover="rowOverDrop = true"
|
pagebuilder/inc/viewShowFrontData.php
CHANGED
@@ -881,6 +881,13 @@ function rowData($container,$col,$moduleTemplate){
|
|
881 |
$replace = $contentArray[$field['name']];
|
882 |
}
|
883 |
if($replace!=""){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
884 |
|
885 |
if(!is_array($replace)){
|
886 |
|
881 |
$replace = $contentArray[$field['name']];
|
882 |
}
|
883 |
if($replace!=""){
|
884 |
+
if(is_array($replace)){
|
885 |
+
if(count($replace)>0){
|
886 |
+
$replace = $replace[0];
|
887 |
+
}else{
|
888 |
+
$replace ='';
|
889 |
+
}
|
890 |
+
}
|
891 |
|
892 |
if(!is_array($replace)){
|
893 |
|
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.0.3
|
7 |
-
Stable tag: 0.9.97.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -186,16 +186,15 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
186 |
|
187 |
== Changelog ==
|
188 |
|
189 |
-
= 0.9.97.
|
190 |
-
* Added:
|
191 |
-
*
|
192 |
-
*
|
193 |
-
* Fixed:
|
194 |
-
* Fixed:
|
195 |
-
* Fixed:
|
196 |
-
* Fixed:
|
197 |
-
* Fixed:
|
198 |
-
* Fixed:
|
199 |
-
* Fixed: Yoast analysis is giving false readings for the SEO When AMPforWP Pagebuilder is enabled #2435
|
200 |
|
201 |
Full changelog available in changelog.txt
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.0.3
|
7 |
+
Stable tag: 0.9.97.37
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
186 |
|
187 |
== Changelog ==
|
188 |
|
189 |
+
= 0.9.97.37 (23th February 2019) =
|
190 |
+
* Added: Static page template in AMP #2614 + #2900
|
191 |
+
* Fixed: Font size and other values are properly sanitizing #2898
|
192 |
+
* Fixed: Failed to parse script tag contents #2884
|
193 |
+
* Fixed: PHP Notices after the v0.9.97.32 #2879
|
194 |
+
* Fixed: oembed wordpress post renders as a full post in AMP #2003
|
195 |
+
* Fixed: Gallery/Slider of AMP pagebuilder not working
|
196 |
+
* Fixed: class are repeating number of times when image (icon) added in .svg format #2893
|
197 |
+
* Fixed: Debug warnings with WPML #2899
|
198 |
+
* Fixed: Issue with yoast content reading while amp pagebuilder image module selected #2910
|
|
|
199 |
|
200 |
Full changelog available in changelog.txt
|
templates/design-manager/swift/style.php
CHANGED
@@ -57,35 +57,35 @@ else{ ?>.cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px} <?p
|
|
57 |
<?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
|
58 |
@font-face {font-family: 'icomoon';font-display: auto;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf');}
|
59 |
header .cntr{
|
60 |
-
<?php if(
|
61 |
-
max-width:<?php echo
|
62 |
<?php }?>
|
63 |
}
|
64 |
<?php if($redux_builder_amp['amp-sticky-header'] == '1'){?>
|
65 |
.h_m{position:fixed;z-index:999;top:0px;width: 100vw;display:inline-block;
|
66 |
<?php if($redux_builder_amp['swift-background-scheme']['rgba']){?>background: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-background-scheme'] ['rgba']) ?>;<?php }?>
|
67 |
-
<?php if(
|
68 |
<?php if($redux_builder_amp['swift-border-color-control']['rgba']){?>border-color:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-border-color-control'] ['rgba']) ?>;<?php } ?>
|
69 |
<?php if($redux_builder_amp['swift-boxshadow-checkbox-control']){?>box-shadow:0px 0px 2px 2px #ccc;<?php }?>
|
70 |
-
<?php if($redux_builder_amp['swift-padding-control']){?>padding: <?php echo $redux_builder_amp['swift-padding-control']['padding-top'] .' '
|
71 |
-
<?php if($redux_builder_amp['swift-margin-control']){?>margin: <?php echo
|
72 |
}
|
73 |
-
.content-wrapper{<?php if($redux_builder_amp['swift-height-control']){?>margin-top:<?php echo $redux_builder_amp['swift-height-control']?>;<?php } ?>}
|
74 |
<?php } else{ ?>
|
75 |
.h_m{
|
76 |
position: static;
|
77 |
<?php if($redux_builder_amp['swift-background-scheme']['rgba']){?>background: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-background-scheme'] ['rgba']) ?>;<?php }?>
|
78 |
-
<?php if($redux_builder_amp['swift-border-line-control']){?>border-bottom: <?php echo $redux_builder_amp['swift-border-line-control'] ?>px solid;<?php } ?>
|
79 |
<?php if($redux_builder_amp['swift-border-color-control']['rgba']){?>border-color:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-border-color-control'] ['rgba']) ?>;<?php } ?>
|
80 |
<?php if($redux_builder_amp['swift-boxshadow-checkbox-control']){?>box-shadow:0px 0px 2px 2px #ccc;<?php }?>
|
81 |
-
<?php if($redux_builder_amp['swift-padding-control']){?>padding: <?php echo $redux_builder_amp['swift-padding-control']['padding-top'] .' '
|
82 |
-
<?php if($redux_builder_amp['swift-margin-control']){?>margin: <?php echo
|
83 |
}
|
84 |
.content-wrapper{
|
85 |
margin-top:0px;
|
86 |
}
|
87 |
<?php } // Sickt CSS Ends ?>
|
88 |
-
.h_m_w{width:100%;clear:both;display: inline-flex;<?php if(
|
89 |
.h-ic a:after, .h-ic a:before{font-family: 'icomoon';font-size: 23px;<?php if(isset($redux_builder_amp['swift-element-color-control'] ['rgba']) && $redux_builder_amp['swift-element-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-color-control']['rgba'])?>;<?php } ?>}
|
90 |
<?php if ( true == ampforwp_get_setting('ampforwp-callnow-button') ) { ?>
|
91 |
.h-call a:after{content: "\e0cd";}
|
@@ -120,9 +120,9 @@ if($redux_builder_amp['header-type'] == '2'){?>
|
|
120 |
.h-2{order: 1;justify-content: flex-end;display: flex;}
|
121 |
.h-nav{order: -1;align-self: center;}
|
122 |
.h-sing{font-size: 18px;font-weight: 600;align-self: center;}
|
123 |
-
.h-sing a{display: inline-block;padding:9px 15px;<?php if(
|
124 |
<?php if($redux_builder_amp['border-type'] == '2'){?>.h-sing a{border-radius:100px;}.h-sing a:before{border-radius:100px;}<?php } ?>
|
125 |
-
<?php if($redux_builder_amp['border-type'] == '3'){?><?php if($redux_builder_amp['border-radius'] ){ ?>.h-sing a{border-radius:<?php echo
|
126 |
<?php } ?>
|
127 |
<?php //header-type-3
|
128 |
|
@@ -159,7 +159,7 @@ color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-over
|
|
159 |
<?php //menu type-1
|
160 |
|
161 |
if($redux_builder_amp['menu-type'] == '1'){?>
|
162 |
-
.m-ctr{<?php if($redux_builder_amp['swift-header-overlay']['rgba']){?>background: <?php echo $redux_builder_amp['swift-header-overlay'] ['rgba'] ?>;<?php } ?>}
|
163 |
.tg, .fsc{display: none;}
|
164 |
.fsc{width: 100%;height: -webkit-fill-available;position: absolute;cursor: pointer;top:0;left:0;}
|
165 |
<?php if($redux_builder_amp['header-position-type'] == '1'){?>
|
@@ -168,7 +168,7 @@ if($redux_builder_amp['menu-type'] == '1'){?>
|
|
168 |
.m-ctr{margin-left: -100%;float: left;}
|
169 |
<?php } ?>
|
170 |
<?php if($redux_builder_amp['header-position-type'] == '2'){?>
|
171 |
-
.tg:checked + .hamb-mnu > .m-ctr {margin-left: calc(100% - <?php echo
|
172 |
.m-ctr{margin-left: 100%;float: right;}
|
173 |
<?php } ?>
|
174 |
.tg:checked + .hamb-mnu > .fsc{display: block;background: rgba(0,0,0,.9);height:100%;}
|
@@ -177,7 +177,7 @@ if($redux_builder_amp['menu-type'] == '1'){?>
|
|
177 |
.c-btn:after{content: "\e5cd";font-family: "icomoon";font-size: 20px;<?php if(isset($redux_builder_amp['swift-element-overlay-color-control'] ['rgba']) && $redux_builder_amp['swift-element-overlay-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;<?php } ?>line-height: 0;display: block;text-indent: 1px;}
|
178 |
.c-btn{float: right;padding: 20px 10px;}
|
179 |
.m-ctr{transition: margin 0.3s ease-in-out;}
|
180 |
-
.m-ctr{<?php if(
|
181 |
.m-menu{display: inline-block;width: 100%;padding: 2px 20px 10px 20px;}
|
182 |
.m-scrl{overflow-y: auto;display: inline-block;width: 100%;overflow: scroll;max-height: 94vh;}
|
183 |
.m-menu .amp-menu .toggle:after{content: "\e313";font-family: 'icomoon';background-size: 16px;display: inline-block;top: 1px;padding: 5px;font-size:25px;transform: rotate(270deg);cursor: pointer;border-radius: 35px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;}
|
@@ -207,11 +207,11 @@ if($redux_builder_amp['menu-type'] == '1'){?>
|
|
207 |
|
208 |
if($redux_builder_amp['primary-menu']){?>
|
209 |
.p-m-fl{width:100%;border-bottom: 1px solid rgba(0, 0, 0, 0.05);<?php if($redux_builder_amp['primary-menu-background-scheme']['rgba']){?>background:<?php echo $redux_builder_amp['primary-menu-background-scheme']['rgba']; ?><?php } ?>}
|
210 |
-
.p-menu{width:100%;text-align:center;margin: 0px auto;<?php if($redux_builder_amp['primary-menu-padding-control']){?>padding: <?php echo ' 0px ' .' '
|
211 |
.hamb-mnu ::-webkit-scrollbar {display: none;}
|
212 |
.p-menu ul li{display: inline-block;margin-right: 21px;font-size: 12px;line-height: 20px;letter-spacing: 1px;font-weight: 400;}
|
213 |
.p-menu ul li a{<?php if($redux_builder_amp['primary-menu-text-scheme']['rgba']){?>color:<?php echo ampforwp_sanitize_color($redux_builder_amp['primary-menu-text-scheme']['rgba'])?>;<?php } ?>
|
214 |
-
padding: <?php echo $redux_builder_amp['primary-menu-padding-control']['padding-top'] .' 0px '
|
215 |
.p-menu input{display:none}
|
216 |
.p-menu .toggle {display:none }
|
217 |
<?php // Dropdown CSS
|
@@ -219,7 +219,7 @@ padding: <?php echo $redux_builder_amp['primary-menu-padding-control']['padding-
|
|
219 |
.p-menu ul li:hover>ul{display:block;z-index:9;padding: 7px 0px 7px 7px;
|
220 |
box-shadow: 1px 1px 15px 1px rgba(0, 0, 0, 0.30);background: #fff;border-radius: 4px;}
|
221 |
.p-menu li a{transition: all 0.3s ease-in-out 0s;}
|
222 |
-
.p-menu .amp-menu li ul{background: <?php echo $redux_builder_amp['primary-menu-background-scheme']['rgba']; ?>;left: 0;min-width: 200px;opacity: 1;position: absolute;top: 100%;transform: translateY(15px);transition: all 0.3s ease-in-out 0s;visibility: hidden;text-align:left;}
|
223 |
.p-menu .amp-menu li ul li ul{left: 100%;top: 0;}
|
224 |
.p-menu li:hover > ul{opacity: 1;transform: translateY(0px);visibility: visible;transition: all 0.2s ease-in-out 0s;}
|
225 |
.p-menu li ul li{display: block;position: relative;}
|
@@ -461,32 +461,32 @@ if($redux_builder_amp['swift-social-position'] == 'below-content'){?>
|
|
461 |
.sp-artl h1, h2, h3, h4, h5, h6{margin-bottom:5px;}
|
462 |
<?php // H1 - H6 Font Sizes
|
463 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h1']){ ?>
|
464 |
-
.cntn-wrp h1{font-size:<?php echo $redux_builder_amp['swift_h1_sz']?>;}
|
465 |
<?php } else { ?>
|
466 |
.cntn-wrp h1 {font-size: 32px;}
|
467 |
<?php } //H1 ends
|
468 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h2']){ ?>
|
469 |
-
.cntn-wrp h2{font-size:<?php echo $redux_builder_amp['swift_h2_sz']?>;}
|
470 |
<?php } else { ?>
|
471 |
.cntn-wrp h2 {font-size: 27px;}
|
472 |
<?php } // H2 Ends
|
473 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h3']){ ?>
|
474 |
-
.cntn-wrp h3{font-size:<?php echo $redux_builder_amp['swift_h3_sz']?>;}
|
475 |
<?php } else { ?>
|
476 |
.cntn-wrp h3 {font-size: 24px;}
|
477 |
<?php } // H3 Ends
|
478 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h4']){ ?>
|
479 |
-
.cntn-wrp h4{font-size:<?php echo $redux_builder_amp['swift_h4_sz']?>;}
|
480 |
<?php } else { ?>
|
481 |
.cntn-wrp h4 {font-size: 20px;}
|
482 |
<?php } // H4 Ends
|
483 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h5']){ ?>
|
484 |
-
.cntn-wrp h5{font-size:<?php echo $redux_builder_amp['swift_h5_sz']?>;}
|
485 |
<?php } else { ?>
|
486 |
.cntn-wrp h5 {font-size: 17px;}
|
487 |
<?php } // H5 Ends
|
488 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h6']){ ?>
|
489 |
-
.cntn-wrp h6{font-size:<?php echo $redux_builder_amp['swift_h6_sz']?>;}
|
490 |
<?php } else { ?>
|
491 |
.cntn-wrp h6 {font-size: 15px;}
|
492 |
<?php } // H6 Ends
|
@@ -1122,28 +1122,28 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
|
|
1122 |
<?php if ( is_active_sidebar( 'swift-footer-widget-area' ) ) : ?>
|
1123 |
.f-w-f1{
|
1124 |
padding:<?php
|
1125 |
-
if(
|
1126 |
-
echo ' ' . $redux_builder_amp['ftr1-gapping']['padding-top'];
|
1127 |
-
echo ' ' . $redux_builder_amp['ftr1-gapping']['padding-right'];
|
1128 |
-
echo ' ' . $redux_builder_amp['ftr1-gapping']['padding-bottom'];
|
1129 |
-
echo ' ' . $redux_builder_amp['ftr1-gapping']['padding-left'];
|
1130 |
}
|
1131 |
?>;
|
1132 |
-
width:100%; border-top: 1px solid <?php echo $redux_builder_amp['swift-footer-brdrclr']['rgba']?>;}
|
1133 |
<?php endif; ?>
|
1134 |
.f-w{display: inline-flex;width: 100%;flex-wrap:wrap;margin:15px -15px 0px;}
|
1135 |
-
.f-w-f2{text-align: center;border-top: 1px solid <?php echo $redux_builder_amp['swift-footer-brdrclr']['rgba']?>;
|
1136 |
padding:<?php
|
1137 |
-
if(
|
1138 |
-
echo ' ' . $redux_builder_amp['ftr2-gapping']['padding-top'];
|
1139 |
-
echo ' ' . $redux_builder_amp['ftr2-gapping']['padding-right'];
|
1140 |
-
echo ' ' . $redux_builder_amp['ftr2-gapping']['padding-bottom'];
|
1141 |
-
echo ' ' . $redux_builder_amp['ftr2-gapping']['padding-left'];
|
1142 |
}
|
1143 |
?>;
|
1144 |
}
|
1145 |
.w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 30px;line-height:1.5;font-size:14px;}
|
1146 |
-
.w-bl h4{font-size: <?php echo
|
1147 |
.w-bl ul li{list-style-type: none;margin-bottom: 15px;}
|
1148 |
.w-bl ul li:last-child{margin-bottom:0;}
|
1149 |
.w-bl ul li a{text-decoration: none;}
|
@@ -1210,7 +1210,7 @@ if( isset($redux_builder_amp['footer-customize-options']) && true == $redux_bui
|
|
1210 |
<?php if( $redux_builder_amp['swift-footer-bg']['rgba'] ) {?>
|
1211 |
background:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-bg']['rgba'])?>;
|
1212 |
<?php } ?>
|
1213 |
-
font-size: <?php echo
|
1214 |
line-height: 1.5;
|
1215 |
<?php if( $redux_builder_amp['swift-footer-txt-clr']['rgba'] ) {?>
|
1216 |
color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-txt-clr']['rgba']) ?>;
|
@@ -1244,7 +1244,7 @@ if( isset($redux_builder_amp['footer-customize-options']) && true == $redux_bui
|
|
1244 |
}
|
1245 |
<?php if($redux_builder_amp['footer2-position-type'] == '2'){?>
|
1246 |
.f-w-f2{
|
1247 |
-
font-size:<?php echo
|
1248 |
}
|
1249 |
.f-menu{
|
1250 |
display:inline-block;
|
@@ -1524,7 +1524,7 @@ a.lb-x{
|
|
1524 |
<?php } ?>
|
1525 |
<?php if($redux_builder_amp['header-position-type'] == '2'){?>
|
1526 |
.tg:checked + .hamb-mnu > .m-ctr {
|
1527 |
-
margin-right: calc(100% - <?php echo
|
1528 |
}
|
1529 |
.m-ctr{
|
1530 |
margin-right: 100%;
|
57 |
<?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
|
58 |
@font-face {font-family: 'icomoon';font-display: auto;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf');}
|
59 |
header .cntr{
|
60 |
+
<?php if( ampforwp_get_setting('swift-width-control') ){?>
|
61 |
+
max-width:<?php echo esc_html(ampforwp_get_setting('swift-width-control'));?>;
|
62 |
<?php }?>
|
63 |
}
|
64 |
<?php if($redux_builder_amp['amp-sticky-header'] == '1'){?>
|
65 |
.h_m{position:fixed;z-index:999;top:0px;width: 100vw;display:inline-block;
|
66 |
<?php if($redux_builder_amp['swift-background-scheme']['rgba']){?>background: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-background-scheme'] ['rgba']) ?>;<?php }?>
|
67 |
+
<?php if(ampforwp_get_setting('swift-border-line-control')){?>border-bottom: <?php echo esc_html(ampforwp_get_setting('swift-border-line-control')) ?>px solid;<?php } ?>
|
68 |
<?php if($redux_builder_amp['swift-border-color-control']['rgba']){?>border-color:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-border-color-control'] ['rgba']) ?>;<?php } ?>
|
69 |
<?php if($redux_builder_amp['swift-boxshadow-checkbox-control']){?>box-shadow:0px 0px 2px 2px #ccc;<?php }?>
|
70 |
+
<?php if($redux_builder_amp['swift-padding-control']){?>padding: <?php echo esc_html($redux_builder_amp['swift-padding-control']['padding-top']) .' '.esc_html($redux_builder_amp['swift-padding-control']['padding-right']) .' '.esc_html($redux_builder_amp['swift-padding-control']['padding-bottom']) .' '.esc_html($redux_builder_amp['swift-padding-control']['padding-left']) ; ?>;<?php } ?>
|
71 |
+
<?php if($redux_builder_amp['swift-margin-control']){?>margin: <?php echo esc_html($redux_builder_amp['swift-margin-control']['margin-top']) .' '.esc_html($redux_builder_amp['swift-margin-control']['margin-right']) .' '.esc_html($redux_builder_amp['swift-margin-control']['margin-bottom']) .' '.esc_html($redux_builder_amp['swift-margin-control']['margin-left']) ; ?>;<?php } ?>
|
72 |
}
|
73 |
+
.content-wrapper{<?php if($redux_builder_amp['swift-height-control']){?>margin-top:<?php echo esc_html($redux_builder_amp['swift-height-control'])?>;<?php } ?>}
|
74 |
<?php } else{ ?>
|
75 |
.h_m{
|
76 |
position: static;
|
77 |
<?php if($redux_builder_amp['swift-background-scheme']['rgba']){?>background: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-background-scheme'] ['rgba']) ?>;<?php }?>
|
78 |
+
<?php if($redux_builder_amp['swift-border-line-control']){?>border-bottom: <?php echo esc_html($redux_builder_amp['swift-border-line-control']) ?>px solid;<?php } ?>
|
79 |
<?php if($redux_builder_amp['swift-border-color-control']['rgba']){?>border-color:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-border-color-control'] ['rgba']) ?>;<?php } ?>
|
80 |
<?php if($redux_builder_amp['swift-boxshadow-checkbox-control']){?>box-shadow:0px 0px 2px 2px #ccc;<?php }?>
|
81 |
+
<?php if($redux_builder_amp['swift-padding-control']){?>padding: <?php echo esc_html($redux_builder_amp['swift-padding-control']['padding-top']) .' '.esc_html($redux_builder_amp['swift-padding-control']['padding-right']) .' '.esc_html($redux_builder_amp['swift-padding-control']['padding-bottom']) .' '.esc_html($redux_builder_amp['swift-padding-control']['padding-left'] ); ?>;<?php } ?>
|
82 |
+
<?php if($redux_builder_amp['swift-margin-control']){?>margin: <?php echo esc_html($redux_builder_amp['swift-margin-control']['margin-top']) .' '.esc_html($redux_builder_amp['swift-margin-control']['margin-right']) .' '.esc_html($redux_builder_amp['swift-margin-control']['margin-bottom']) .' '.esc_html($redux_builder_amp['swift-margin-control']['margin-left']) ; ?>;<?php } ?>
|
83 |
}
|
84 |
.content-wrapper{
|
85 |
margin-top:0px;
|
86 |
}
|
87 |
<?php } // Sickt CSS Ends ?>
|
88 |
+
.h_m_w{width:100%;clear:both;display: inline-flex;<?php if(ampforwp_get_setting('swift-height-control')){?>height:<?php echo esc_html(ampforwp_get_setting('swift-height-control'))?>;<?php } ?>}
|
89 |
.h-ic a:after, .h-ic a:before{font-family: 'icomoon';font-size: 23px;<?php if(isset($redux_builder_amp['swift-element-color-control'] ['rgba']) && $redux_builder_amp['swift-element-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-color-control']['rgba'])?>;<?php } ?>}
|
90 |
<?php if ( true == ampforwp_get_setting('ampforwp-callnow-button') ) { ?>
|
91 |
.h-call a:after{content: "\e0cd";}
|
120 |
.h-2{order: 1;justify-content: flex-end;display: flex;}
|
121 |
.h-nav{order: -1;align-self: center;}
|
122 |
.h-sing{font-size: 18px;font-weight: 600;align-self: center;}
|
123 |
+
.h-sing a{display: inline-block;padding:9px 15px;<?php if(ampforwp_get_setting('signin-button-border-line')){?>border: <?php echo esc_html(ampforwp_get_setting('signin-button-border-line'))?>px solid;<?php } ?><?php if($redux_builder_amp['signin-button-border-color']['rgba']){?>border-color: <?php echo ampforwp_sanitize_color($redux_builder_amp['signin-button-border-color']['rgba'])?>;<?php } ?><?php if($redux_builder_amp['signin-button-text-color']['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['signin-button-text-color']['rgba'])?>;<?php } ?>}
|
124 |
<?php if($redux_builder_amp['border-type'] == '2'){?>.h-sing a{border-radius:100px;}.h-sing a:before{border-radius:100px;}<?php } ?>
|
125 |
+
<?php if($redux_builder_amp['border-type'] == '3'){?><?php if($redux_builder_amp['border-radius'] ){ ?>.h-sing a{border-radius:<?php echo esc_html(ampforwp_get_setting('border-radius'))?>px;}<?php } ?><?php } ?>
|
126 |
<?php } ?>
|
127 |
<?php //header-type-3
|
128 |
|
159 |
<?php //menu type-1
|
160 |
|
161 |
if($redux_builder_amp['menu-type'] == '1'){?>
|
162 |
+
.m-ctr{<?php if($redux_builder_amp['swift-header-overlay']['rgba']){?>background: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-header-overlay'] ['rgba']) ?>;<?php } ?>}
|
163 |
.tg, .fsc{display: none;}
|
164 |
.fsc{width: 100%;height: -webkit-fill-available;position: absolute;cursor: pointer;top:0;left:0;}
|
165 |
<?php if($redux_builder_amp['header-position-type'] == '1'){?>
|
168 |
.m-ctr{margin-left: -100%;float: left;}
|
169 |
<?php } ?>
|
170 |
<?php if($redux_builder_amp['header-position-type'] == '2'){?>
|
171 |
+
.tg:checked + .hamb-mnu > .m-ctr {margin-left: calc(100% - <?php echo esc_html(ampforwp_get_setting('header-overlay-width'))?>);}
|
172 |
.m-ctr{margin-left: 100%;float: right;}
|
173 |
<?php } ?>
|
174 |
.tg:checked + .hamb-mnu > .fsc{display: block;background: rgba(0,0,0,.9);height:100%;}
|
177 |
.c-btn:after{content: "\e5cd";font-family: "icomoon";font-size: 20px;<?php if(isset($redux_builder_amp['swift-element-overlay-color-control'] ['rgba']) && $redux_builder_amp['swift-element-overlay-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;<?php } ?>line-height: 0;display: block;text-indent: 1px;}
|
178 |
.c-btn{float: right;padding: 20px 10px;}
|
179 |
.m-ctr{transition: margin 0.3s ease-in-out;}
|
180 |
+
.m-ctr{<?php if(ampforwp_get_setting('header-overlay-width')){?>width:<?php echo esc_html(ampforwp_get_setting('header-overlay-width'))?>;<?php } ?>height:100%;position: absolute;z-index:99;padding: 2% 0% 100vh 0%;}
|
181 |
.m-menu{display: inline-block;width: 100%;padding: 2px 20px 10px 20px;}
|
182 |
.m-scrl{overflow-y: auto;display: inline-block;width: 100%;overflow: scroll;max-height: 94vh;}
|
183 |
.m-menu .amp-menu .toggle:after{content: "\e313";font-family: 'icomoon';background-size: 16px;display: inline-block;top: 1px;padding: 5px;font-size:25px;transform: rotate(270deg);cursor: pointer;border-radius: 35px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;}
|
207 |
|
208 |
if($redux_builder_amp['primary-menu']){?>
|
209 |
.p-m-fl{width:100%;border-bottom: 1px solid rgba(0, 0, 0, 0.05);<?php if($redux_builder_amp['primary-menu-background-scheme']['rgba']){?>background:<?php echo $redux_builder_amp['primary-menu-background-scheme']['rgba']; ?><?php } ?>}
|
210 |
+
.p-menu{width:100%;text-align:center;margin: 0px auto;<?php if($redux_builder_amp['primary-menu-padding-control']){?>padding: <?php echo ' 0px ' .' '.esc_html($redux_builder_amp['primary-menu-padding-control']['padding-right']) .' 0px '.esc_html($redux_builder_amp['primary-menu-padding-control']['padding-left']) ; ?>;<?php } ?>}
|
211 |
.hamb-mnu ::-webkit-scrollbar {display: none;}
|
212 |
.p-menu ul li{display: inline-block;margin-right: 21px;font-size: 12px;line-height: 20px;letter-spacing: 1px;font-weight: 400;}
|
213 |
.p-menu ul li a{<?php if($redux_builder_amp['primary-menu-text-scheme']['rgba']){?>color:<?php echo ampforwp_sanitize_color($redux_builder_amp['primary-menu-text-scheme']['rgba'])?>;<?php } ?>
|
214 |
+
padding: <?php echo esc_html($redux_builder_amp['primary-menu-padding-control']['padding-top']) .' 0px '.esc_html($redux_builder_amp['primary-menu-padding-control']['padding-bottom']) .' 0px' ; ?>}
|
215 |
.p-menu input{display:none}
|
216 |
.p-menu .toggle {display:none }
|
217 |
<?php // Dropdown CSS
|
219 |
.p-menu ul li:hover>ul{display:block;z-index:9;padding: 7px 0px 7px 7px;
|
220 |
box-shadow: 1px 1px 15px 1px rgba(0, 0, 0, 0.30);background: #fff;border-radius: 4px;}
|
221 |
.p-menu li a{transition: all 0.3s ease-in-out 0s;}
|
222 |
+
.p-menu .amp-menu li ul{background: <?php echo ampforwp_sanitize_color($redux_builder_amp['primary-menu-background-scheme']['rgba']); ?>;left: 0;min-width: 200px;opacity: 1;position: absolute;top: 100%;transform: translateY(15px);transition: all 0.3s ease-in-out 0s;visibility: hidden;text-align:left;}
|
223 |
.p-menu .amp-menu li ul li ul{left: 100%;top: 0;}
|
224 |
.p-menu li:hover > ul{opacity: 1;transform: translateY(0px);visibility: visible;transition: all 0.2s ease-in-out 0s;}
|
225 |
.p-menu li ul li{display: block;position: relative;}
|
461 |
.sp-artl h1, h2, h3, h4, h5, h6{margin-bottom:5px;}
|
462 |
<?php // H1 - H6 Font Sizes
|
463 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h1']){ ?>
|
464 |
+
.cntn-wrp h1{font-size:<?php echo esc_html($redux_builder_amp['swift_h1_sz'])?>;}
|
465 |
<?php } else { ?>
|
466 |
.cntn-wrp h1 {font-size: 32px;}
|
467 |
<?php } //H1 ends
|
468 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h2']){ ?>
|
469 |
+
.cntn-wrp h2{font-size:<?php echo esc_html($redux_builder_amp['swift_h2_sz'])?>;}
|
470 |
<?php } else { ?>
|
471 |
.cntn-wrp h2 {font-size: 27px;}
|
472 |
<?php } // H2 Ends
|
473 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h3']){ ?>
|
474 |
+
.cntn-wrp h3{font-size:<?php echo esc_html($redux_builder_amp['swift_h3_sz'])?>;}
|
475 |
<?php } else { ?>
|
476 |
.cntn-wrp h3 {font-size: 24px;}
|
477 |
<?php } // H3 Ends
|
478 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h4']){ ?>
|
479 |
+
.cntn-wrp h4{font-size:<?php echo esc_html($redux_builder_amp['swift_h4_sz'])?>;}
|
480 |
<?php } else { ?>
|
481 |
.cntn-wrp h4 {font-size: 20px;}
|
482 |
<?php } // H4 Ends
|
483 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h5']){ ?>
|
484 |
+
.cntn-wrp h5{font-size:<?php echo esc_html($redux_builder_amp['swift_h5_sz'])?>;}
|
485 |
<?php } else { ?>
|
486 |
.cntn-wrp h5 {font-size: 17px;}
|
487 |
<?php } // H5 Ends
|
488 |
if($redux_builder_amp['swift_cnt'] && $redux_builder_amp['swift_cnt_h6']){ ?>
|
489 |
+
.cntn-wrp h6{font-size:<?php echo esc_html($redux_builder_amp['swift_h6_sz'])?>;}
|
490 |
<?php } else { ?>
|
491 |
.cntn-wrp h6 {font-size: 15px;}
|
492 |
<?php } // H6 Ends
|
1122 |
<?php if ( is_active_sidebar( 'swift-footer-widget-area' ) ) : ?>
|
1123 |
.f-w-f1{
|
1124 |
padding:<?php
|
1125 |
+
if(ampforwp_get_setting('ftr1-gapping') ){
|
1126 |
+
echo ' ' . esc_html($redux_builder_amp['ftr1-gapping']['padding-top']);
|
1127 |
+
echo ' ' . esc_html($redux_builder_amp['ftr1-gapping']['padding-right']);
|
1128 |
+
echo ' ' . esc_html($redux_builder_amp['ftr1-gapping']['padding-bottom']);
|
1129 |
+
echo ' ' . esc_html($redux_builder_amp['ftr1-gapping']['padding-left']);
|
1130 |
}
|
1131 |
?>;
|
1132 |
+
width:100%; border-top: 1px solid <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-brdrclr']['rgba'])?>;}
|
1133 |
<?php endif; ?>
|
1134 |
.f-w{display: inline-flex;width: 100%;flex-wrap:wrap;margin:15px -15px 0px;}
|
1135 |
+
.f-w-f2{text-align: center;border-top: 1px solid <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-brdrclr']['rgba'])?>;
|
1136 |
padding:<?php
|
1137 |
+
if(ampforwp_get_setting('ftr2-gapping')){
|
1138 |
+
echo ' ' . esc_html($redux_builder_amp['ftr2-gapping']['padding-top']);
|
1139 |
+
echo ' ' . esc_html($redux_builder_amp['ftr2-gapping']['padding-right']);
|
1140 |
+
echo ' ' . esc_html($redux_builder_amp['ftr2-gapping']['padding-bottom']);
|
1141 |
+
echo ' ' . esc_html($redux_builder_amp['ftr2-gapping']['padding-left']);
|
1142 |
}
|
1143 |
?>;
|
1144 |
}
|
1145 |
.w-bl{margin-left: 0;display: flex;flex-direction: column;position: relative;flex: 1 0 22%;margin:0 15px 30px;line-height:1.5;font-size:14px;}
|
1146 |
+
.w-bl h4{font-size: <?php echo esc_html(ampforwp_get_setting('swift-head-size')); ?>;font-weight: <?php echo esc_html(ampforwp_get_setting('swift-head-fntwgth')) ?>;margin-bottom: 20px;text-transform: uppercase;letter-spacing: 1px;padding-bottom: 4px;}
|
1147 |
.w-bl ul li{list-style-type: none;margin-bottom: 15px;}
|
1148 |
.w-bl ul li:last-child{margin-bottom:0;}
|
1149 |
.w-bl ul li a{text-decoration: none;}
|
1210 |
<?php if( $redux_builder_amp['swift-footer-bg']['rgba'] ) {?>
|
1211 |
background:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-bg']['rgba'])?>;
|
1212 |
<?php } ?>
|
1213 |
+
font-size: <?php echo esc_html(ampforwp_get_setting('swift-footer1-cntnsize'))?>;
|
1214 |
line-height: 1.5;
|
1215 |
<?php if( $redux_builder_amp['swift-footer-txt-clr']['rgba'] ) {?>
|
1216 |
color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-txt-clr']['rgba']) ?>;
|
1244 |
}
|
1245 |
<?php if($redux_builder_amp['footer2-position-type'] == '2'){?>
|
1246 |
.f-w-f2{
|
1247 |
+
font-size:<?php echo esc_html(ampforwp_get_setting('swift-footer2-fntsize'))?>;
|
1248 |
}
|
1249 |
.f-menu{
|
1250 |
display:inline-block;
|
1524 |
<?php } ?>
|
1525 |
<?php if($redux_builder_amp['header-position-type'] == '2'){?>
|
1526 |
.tg:checked + .hamb-mnu > .m-ctr {
|
1527 |
+
margin-right: calc(100% - <?php echo esc_html(ampforwp_get_setting('header-overlay-width'))?>);
|
1528 |
}
|
1529 |
.m-ctr{
|
1530 |
margin-right: 100%;
|
templates/features.php
CHANGED
@@ -373,7 +373,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
|
|
373 |
if($sitepress_settings[ 'language_negotiation_type' ] == 3){
|
374 |
if( is_singular() ){
|
375 |
$active_langs = $sitepress_settings['active_languages'];
|
376 |
-
$found
|
377 |
$wpml_url =get_permalink( get_queried_object_id() );
|
378 |
$untrail_wpml_url = untrailingslashit($wpml_url);
|
379 |
$explode_url = explode('/', $untrail_wpml_url);
|
@@ -5520,6 +5520,8 @@ function ampforwp_add_advance_ga_fields($ga_fields){
|
|
5520 |
$ampforwp_adv_ga_fields = str_replace('{title}', $title, $ampforwp_adv_ga_fields);
|
5521 |
$ampforwp_adv_ga_fields = str_replace('{author_name}', $author_name, $ampforwp_adv_ga_fields);
|
5522 |
$ampforwp_adv_ga_fields = str_replace('{author_id}', $author_id, $ampforwp_adv_ga_fields);
|
|
|
|
|
5523 |
return $ampforwp_adv_ga_fields;
|
5524 |
}
|
5525 |
return $ga_fields;
|
@@ -6460,7 +6462,7 @@ function ampforwp_url_controller( $url, $nonamp = '' ) {
|
|
6460 |
// WPML COMPATIBILITY FOR LOOP
|
6461 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
6462 |
if( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' )){
|
6463 |
-
global $sitepress_settings;
|
6464 |
if($sitepress_settings[ 'language_negotiation_type' ] == 3){
|
6465 |
$current_archive_url = untrailingslashit($url);
|
6466 |
$explode_path = explode("/",$current_archive_url);
|
373 |
if($sitepress_settings[ 'language_negotiation_type' ] == 3){
|
374 |
if( is_singular() ){
|
375 |
$active_langs = $sitepress_settings['active_languages'];
|
376 |
+
$found = '';
|
377 |
$wpml_url =get_permalink( get_queried_object_id() );
|
378 |
$untrail_wpml_url = untrailingslashit($wpml_url);
|
379 |
$explode_url = explode('/', $untrail_wpml_url);
|
5520 |
$ampforwp_adv_ga_fields = str_replace('{title}', $title, $ampforwp_adv_ga_fields);
|
5521 |
$ampforwp_adv_ga_fields = str_replace('{author_name}', $author_name, $ampforwp_adv_ga_fields);
|
5522 |
$ampforwp_adv_ga_fields = str_replace('{author_id}', $author_id, $ampforwp_adv_ga_fields);
|
5523 |
+
$ampforwp_adv_ga_fields = preg_replace('!//.*!', '', $ampforwp_adv_ga_fields);
|
5524 |
+
$ampforwp_adv_ga_fields = preg_replace('!/\*.*?\*/!s', '', $ampforwp_adv_ga_fields);
|
5525 |
return $ampforwp_adv_ga_fields;
|
5526 |
}
|
5527 |
return $ga_fields;
|
6462 |
// WPML COMPATIBILITY FOR LOOP
|
6463 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
6464 |
if( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' )){
|
6465 |
+
global $sitepress_settings,$wp;
|
6466 |
if($sitepress_settings[ 'language_negotiation_type' ] == 3){
|
6467 |
$current_archive_url = untrailingslashit($url);
|
6468 |
$explode_path = explode("/",$current_archive_url);
|