Version Description
(3th December 2019) = * Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914 * Improvement: Need to create Testimonial slider in AMP Page Builder #2960 * Improvement: Need to create an optional option for the side menu when people click on the text the links should be dropped. links sub links #3428 * Improvement: Need to make compatibility with this plugin Stop Generating Image Sizes #3851 * Improvement: Improve Matemo analytics integration #3757 * Fixed: Breadcrumb breaks when '/' is present in category name #3769 * Fixed: Back to top button CSS loading twice in Design 1,2,3. #3835 * Fixed: Removing trbidi attribute #3687 * Fixed: Upgrade to AdsforWP button not working properly. #3681 * Fixed: Tooltip alignment is missing in Advertisement #3625 * Fixed: Media queries are removing automatically in media queries merging process #3797 * Fixed: Excerpt on homepage is not working properly. #3866 * Fixed: Author links are redirecting to AMP even when the Archives is turned off. #3875 * Fixed: Issue related to image height and width #3857 * Fixed: Gutenberg Gallery Images are not displayed correctly when any option is selected in WordPress Content Gallery. #3868 * Fixed: Google Tag manager not firing properly #3826 * Fixed: After Update AMP option panel design is changing #3877
Release Info
Developer | mohammed_kaludi |
Plugin | AMP for WP – Accelerated Mobile Pages |
Version | 0.9.98.21 |
Comparing to | |
See all releases |
Code changes from version 0.9.98.20 to 0.9.98.21
- README.md +22 -3
- accelerated-moblie-pages.php +2 -2
- changelog.txt +18 -0
- classes/class-ampforwp-fields.php +9 -9
- classes/class-ampforwp-walker-nav-menu.php +5 -1
- components/author-box/author-box.php +2 -2
- components/breadcrumb/breadcrumb.php +6 -2
- components/components-core.php +1 -1
- components/google-font/google-font.php +46 -0
- images/testmon-3.png +0 -0
- includes/admin-script.js +94 -4
- includes/admin-style.css +2 -2
- includes/features/advertisement/ads-options.php +15 -1
- includes/features/analytics/analytics-functions.php +28 -5
- includes/features/analytics/analytics-options.php +0 -12
- includes/features/performance/performance-functions.php +3 -0
- includes/module-upgrade.js +45 -25
- includes/options/admin-config.php +19 -28
- includes/options/redux-core/assets/css/redux-admin.css +1 -4
- includes/vendor/amp/includes/amp-post-template-actions.php +3 -6
- includes/vendor/amp/includes/class-amp-post-template.php +6 -1
- includes/vendor/amp/includes/sanitizers/class-amp-gallery-block-sanitizer-5-3.php +459 -0
- includes/vendor/amp/includes/utils/class-amp-dom-utils.php +16 -0
- includes/vendor/amp/includes/utils/class-amp-image-dimension-extractor.php +11 -2
- includes/vendor/aq_resizer.php +8 -1
- pagebuilder/inc/viewShowFrontData.php +11 -3
- pagebuilder/modules/testimonial-mod-module.php +326 -24
- readme.txt +22 -17
- templates/design-manager/design-1/elements/bread-crumbs.php +6 -1
- templates/design-manager/design-1/style.php +48 -41
- templates/design-manager/design-2/elements/bread-crumbs.php +6 -1
- templates/design-manager/design-2/style.php +37 -32
- templates/design-manager/design-3/elements/bread-crumbs.php +6 -1
- templates/design-manager/design-3/elements/title.php +5 -1
- templates/design-manager/design-3/style.php +58 -54
- templates/design-manager/swift/style.php +19 -8
- templates/features.php +35 -4
@@ -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.3
|
7 |
-
Stable tag: 0.9.98.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -30,9 +30,9 @@ Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkalu
|
|
30 |
* NEW - Gutenberg Support
|
31 |
* NEW - Divi and Elementor Support [More Info](https://ampforwp.com/amp-pagebuilder-compatibility/)
|
32 |
* NEW - Improved CSS Optimization (Tree Shaking)
|
|
|
33 |
* NEW - Addthis Sharing Support
|
34 |
-
* NEW - AMP
|
35 |
-
* NEW - Revolution Slider plugin Support
|
36 |
* NEW - Photo Gallery by 10Web Support
|
37 |
* NEW - MEWE social network Support
|
38 |
* NEW - GDPR Compliance
|
@@ -191,6 +191,25 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 0.9.98.20 (27th November 2019) =
|
195 |
* Fixed: Menu closer icon is getting overlapped by the header part of firefox web browser #3744
|
196 |
* Fixed: Instagram TV videos are not rendering into AMP #3812
|
4 |
Donate link: https://www.paypal.me/Kaludi/25
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 0.9.98.21
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
30 |
* NEW - Gutenberg Support
|
31 |
* NEW - Divi and Elementor Support [More Info](https://ampforwp.com/amp-pagebuilder-compatibility/)
|
32 |
* NEW - Improved CSS Optimization (Tree Shaking)
|
33 |
+
* NEW - Google Fonts Support For All Designs
|
34 |
* NEW - Addthis Sharing Support
|
35 |
+
* NEW - AMP Infinite Scroll Support
|
|
|
36 |
* NEW - Photo Gallery by 10Web Support
|
37 |
* NEW - MEWE social network Support
|
38 |
* NEW - GDPR Compliance
|
191 |
|
192 |
== Changelog ==
|
193 |
|
194 |
+
= 0.9.98.21 (3th December 2019) =
|
195 |
+
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
196 |
+
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
197 |
+
* Improvement: Need to create an optional option for the side menu when people click on the text the links should be dropped. links sub links #3428
|
198 |
+
* Improvement: Need to make compatibility with this plugin Stop Generating Image Sizes #3851
|
199 |
+
* Improvement: Improve Matemo analytics integration #3757
|
200 |
+
* Fixed: Breadcrumb breaks when '/' is present in category name #3769
|
201 |
+
* Fixed: Back to top button CSS loading twice in Design 1,2,3. #3835
|
202 |
+
* Fixed: Removing trbidi attribute #3687
|
203 |
+
* Fixed: Upgrade to AdsforWP button not working properly. #3681
|
204 |
+
* Fixed: Tooltip alignment is missing in Advertisement #3625
|
205 |
+
* Fixed: Media queries are removing automatically in media queries merging process #3797
|
206 |
+
* Fixed: Excerpt on homepage is not working properly. #3866
|
207 |
+
* Fixed: Author links are redirecting to AMP even when the Archives is turned off. #3875
|
208 |
+
* Fixed: Issue related to image height and width #3857
|
209 |
+
* Fixed: Gutenberg Gallery Images are not displayed correctly when any option is selected in WordPress Content Gallery. #3868
|
210 |
+
* Fixed: Google Tag manager not firing properly #3826
|
211 |
+
* Fixed: After Update AMP option panel design is changing #3877
|
212 |
+
|
213 |
= 0.9.98.20 (27th November 2019) =
|
214 |
* Fixed: Menu closer icon is getting overlapped by the header part of firefox web browser #3744
|
215 |
* Fixed: Instagram TV videos are not rendering into AMP #3812
|
@@ -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.98.
|
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.98.
|
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: 0.9.98.21
|
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.98.21');
|
24 |
define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
|
25 |
if(!defined('AMPFROWP_HOST_NAME')){
|
26 |
$urlinfo = get_bloginfo('url');
|
@@ -1,5 +1,23 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
= 0.9.98.20 (27th November 2019) =
|
5 |
* Fixed: Menu closer icon is getting overlapped by the header part of firefox web browser #3744
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 0.9.98.21 (3th December 2019) =
|
4 |
+
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
5 |
+
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
6 |
+
* Improvement: Need to create an optional option for the side menu when people click on the text the links should be dropped. links sub links #3428
|
7 |
+
* Improvement: Need to make compatibility with this plugin Stop Generating Image Sizes #3851
|
8 |
+
* Improvement: Improve Matemo analytics integration #3757
|
9 |
+
* Fixed: Breadcrumb breaks when '/' is present in category name #3769
|
10 |
+
* Fixed: Back to top button CSS loading twice in Design 1,2,3. #3835
|
11 |
+
* Fixed: Removing trbidi attribute #3687
|
12 |
+
* Fixed: Upgrade to AdsforWP button not working properly. #3681
|
13 |
+
* Fixed: Tooltip alignment is missing in Advertisement #3625
|
14 |
+
* Fixed: Media queries are removing automatically in media queries merging process #3797
|
15 |
+
* Fixed: Excerpt on homepage is not working properly. #3866
|
16 |
+
* Fixed: Author links are redirecting to AMP even when the Archives is turned off. #3875
|
17 |
+
* Fixed: Issue related to image height and width #3857
|
18 |
+
* Fixed: Gutenberg Gallery Images are not displayed correctly when any option is selected in WordPress Content Gallery. #3868
|
19 |
+
* Fixed: Google Tag manager not firing properly #3826
|
20 |
+
* Fixed: After Update AMP option panel design is changing #3877
|
21 |
|
22 |
= 0.9.98.20 (27th November 2019) =
|
23 |
* Fixed: Menu closer icon is getting overlapped by the header part of firefox web browser #3744
|
@@ -289,7 +289,7 @@ class AMPforWP_Fields
|
|
289 |
}
|
290 |
|
291 |
$output .= '</div>';
|
292 |
-
echo $output;
|
293 |
}
|
294 |
public function ampforwp_field_checkbox($fields){
|
295 |
$required = $hide = $checked = '';
|
@@ -304,10 +304,10 @@ class AMPforWP_Fields
|
|
304 |
$lbl_cls = '';
|
305 |
if(isset($fields['label-class'])){
|
306 |
$lbl_cls = 'class="'.esc_attr($fields['label-class']).'"';
|
307 |
-
}
|
308 |
|
309 |
-
$output = '<div class="ux-field-container amp-ux-checkbox-container '.esc_attr($hide).' '.esc_attr($required).'
|
310 |
-
echo $output;
|
311 |
}
|
312 |
public function ampforwp_field_switch($fields){
|
313 |
|
@@ -353,7 +353,7 @@ class AMPforWP_Fields
|
|
353 |
$output .= '<p class="amp-ux-switch-text">'.esc_html($this->desc).'</p>';
|
354 |
}
|
355 |
$output .= '</div>';
|
356 |
-
echo $output;
|
357 |
}
|
358 |
|
359 |
public function ampforwp_field_media(){
|
@@ -395,7 +395,7 @@ class AMPforWP_Fields
|
|
395 |
<span class="amp-ux-img-re-txt">(Recommended Size: 120 x 90)</span>
|
396 |
</div>';
|
397 |
$output .= '</div></div>';
|
398 |
-
echo $output;
|
399 |
}
|
400 |
|
401 |
public function ampforwp_field_color(){
|
@@ -407,7 +407,7 @@ class AMPforWP_Fields
|
|
407 |
$this->selected = $this->default ? 'value='.esc_attr($this->default) : "";
|
408 |
$output .= '<input type="text" id="'.esc_attr($this->id).'" class="'.esc_attr($this->class).'" '.esc_attr($this->selected).'>';
|
409 |
$output .= '</div>';
|
410 |
-
echo $output;
|
411 |
}
|
412 |
public function ampforwp_field_text($fields){
|
413 |
$required = '';
|
@@ -421,12 +421,12 @@ class AMPforWP_Fields
|
|
421 |
$output .= '<h2 class="'.esc_attr($this->element_class).'">'.esc_html($this->title).'</h2>';
|
422 |
}
|
423 |
$output .= '<input type="text" id="'.esc_attr($this->id).'" class="'.esc_attr($this->class).'" '.esc_attr($this->data_text).' value="'.esc_attr($this->default).'"></div>';
|
424 |
-
echo $output;
|
425 |
}
|
426 |
|
427 |
public function loading(){
|
428 |
$output = '<span class="hide amp-ux-check"></span><div class="hide amp-ux-loading"></div><br>';
|
429 |
-
echo $output;
|
430 |
}
|
431 |
public function ampforwp_field_notification($fields){
|
432 |
$required = $hide = $hrf_id = '';
|
289 |
}
|
290 |
|
291 |
$output .= '</div>';
|
292 |
+
echo $output; /* $output XSS escaped */
|
293 |
}
|
294 |
public function ampforwp_field_checkbox($fields){
|
295 |
$required = $hide = $checked = '';
|
304 |
$lbl_cls = '';
|
305 |
if(isset($fields['label-class'])){
|
306 |
$lbl_cls = 'class="'.esc_attr($fields['label-class']).'"';
|
307 |
+
} /* $lbl_cls XSS escaped */
|
308 |
|
309 |
+
$output = '<div class="ux-field-container amp-ux-checkbox-container '.esc_attr($hide).' '.esc_attr($this->parent_class).' " '.esc_attr($required).'><label '.$lbl_cls.'><input type="checkbox" class="'.esc_attr($this->class).'" id="'.esc_attr($this->id).'" ' . esc_attr($checked).'>'.esc_html__($this->title).'</label></div>'; /* $lbl_cls XSS escaped */
|
310 |
+
echo $output; /* $output XSS escaped */
|
311 |
}
|
312 |
public function ampforwp_field_switch($fields){
|
313 |
|
353 |
$output .= '<p class="amp-ux-switch-text">'.esc_html($this->desc).'</p>';
|
354 |
}
|
355 |
$output .= '</div>';
|
356 |
+
echo $output; /* $output XSS escaped */
|
357 |
}
|
358 |
|
359 |
public function ampforwp_field_media(){
|
395 |
<span class="amp-ux-img-re-txt">(Recommended Size: 120 x 90)</span>
|
396 |
</div>';
|
397 |
$output .= '</div></div>';
|
398 |
+
echo $output; /* $output XSS escaped */
|
399 |
}
|
400 |
|
401 |
public function ampforwp_field_color(){
|
407 |
$this->selected = $this->default ? 'value='.esc_attr($this->default) : "";
|
408 |
$output .= '<input type="text" id="'.esc_attr($this->id).'" class="'.esc_attr($this->class).'" '.esc_attr($this->selected).'>';
|
409 |
$output .= '</div>';
|
410 |
+
echo $output; /* $output XSS escaped */
|
411 |
}
|
412 |
public function ampforwp_field_text($fields){
|
413 |
$required = '';
|
421 |
$output .= '<h2 class="'.esc_attr($this->element_class).'">'.esc_html($this->title).'</h2>';
|
422 |
}
|
423 |
$output .= '<input type="text" id="'.esc_attr($this->id).'" class="'.esc_attr($this->class).'" '.esc_attr($this->data_text).' value="'.esc_attr($this->default).'"></div>';
|
424 |
+
echo $output; /* $output XSS escaped */
|
425 |
}
|
426 |
|
427 |
public function loading(){
|
428 |
$output = '<span class="hide amp-ux-check"></span><div class="hide amp-ux-loading"></div><br>';
|
429 |
+
echo $output; /* $output XSS escaped */
|
430 |
}
|
431 |
public function ampforwp_field_notification($fields){
|
432 |
$required = $hide = $hrf_id = '';
|
@@ -35,7 +35,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
35 |
$classes[] = 'menu-item-' . $item->ID;
|
36 |
|
37 |
$class_names = join( ' ', apply_filters( 'ampforwp_nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
38 |
-
$
|
|
|
|
|
|
|
|
|
39 |
|
40 |
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args, $depth );
|
41 |
$id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : '';
|
35 |
$classes[] = 'menu-item-' . $item->ID;
|
36 |
|
37 |
$class_names = join( ' ', apply_filters( 'ampforwp_nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
38 |
+
$lmenu = "";
|
39 |
+
if($item->url=="" || $item->url=="#"){
|
40 |
+
$lmenu = "link-menu";
|
41 |
+
}
|
42 |
+
$class_names = ' class="' . esc_attr( $class_names ) . ' '.esc_attr($lmenu).'"';
|
43 |
|
44 |
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args, $depth );
|
45 |
$id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : '';
|
@@ -87,8 +87,8 @@ if ( isset($args['show_time']) ) {
|
|
87 |
if ( true == ampforwp_get_setting('ampforwp-author-page-url') ){
|
88 |
if ( function_exists('coauthors_posts_links') ) {
|
89 |
if( $author_pub_name ){
|
90 |
-
|
91 |
-
|
92 |
echo ampforwp_yoast_twitter_handle();
|
93 |
}
|
94 |
}
|
87 |
if ( true == ampforwp_get_setting('ampforwp-author-page-url') ){
|
88 |
if ( function_exists('coauthors_posts_links') ) {
|
89 |
if( $author_pub_name ){
|
90 |
+
$author_link = (true == ampforwp_get_setting('ampforwp-archive-support'))? esc_url(ampforwp_url_controller($author_link)) : esc_url($author_link);
|
91 |
+
echo '<span class="author-name">' .esc_html($author_prefix) . ' <a href="'. esc_url($author_link).'" title="'. esc_html($author_name).'"> ' .esc_html( $author_name ).'</a></span>';
|
92 |
echo ampforwp_yoast_twitter_handle();
|
93 |
}
|
94 |
}
|
@@ -127,8 +127,12 @@ function amp_breadcrumb_output(){
|
|
127 |
$get_cat_parents = rtrim(get_category_parents($primary_cateogory, false, '/'),'/');
|
128 |
}
|
129 |
}
|
130 |
-
|
131 |
-
|
|
|
|
|
|
|
|
|
132 |
|
133 |
// Loop through parent categories and store in variable $cat_display
|
134 |
$cat_display = '';
|
127 |
$get_cat_parents = rtrim(get_category_parents($primary_cateogory, false, '/'),'/');
|
128 |
}
|
129 |
}
|
130 |
+
if (strpos($get_cat_parents, '/') !== false) {
|
131 |
+
$cat_parents = explode(',',$get_cat_parents);
|
132 |
+
}else{
|
133 |
+
// Get parent any categories and create array
|
134 |
+
$cat_parents = explode('/',$get_cat_parents);
|
135 |
+
}
|
136 |
|
137 |
// Loop through parent categories and store in variable $cat_display
|
138 |
$cat_display = '';
|
@@ -9,7 +9,7 @@ $ampforwpTemplate = '';
|
|
9 |
$loadComponent = array();
|
10 |
$scriptComponent = array();
|
11 |
$search_found = false;
|
12 |
-
$supportComponent = array('AMP-search','AMP-menu','AMP-alter-menu','AMP-logo','AMP-social-icons','AMP-sidebar','AMP-featured-image','AMP-author-box','AMP-loop','AMP-categories-tags','AMP-comments','AMP-post-navigation','AMP-related-posts','AMP-post-pagination','AMP-call-now', 'AMP-breadcrumb','AMP-gdpr');
|
13 |
|
14 |
add_filter( 'amp_post_template_data', 'ampforwp_framework_add_and_form_scripts',20);
|
15 |
function ampforwp_framework_add_and_form_scripts($data) {
|
9 |
$loadComponent = array();
|
10 |
$scriptComponent = array();
|
11 |
$search_found = false;
|
12 |
+
$supportComponent = array('AMP-search','AMP-menu','AMP-alter-menu','AMP-logo','AMP-social-icons','AMP-sidebar','AMP-featured-image','AMP-author-box','AMP-loop','AMP-categories-tags','AMP-comments','AMP-post-navigation','AMP-related-posts','AMP-post-pagination','AMP-call-now', 'AMP-breadcrumb','AMP-gdpr', 'AMP-google-font', 'AMP-google-font');
|
13 |
|
14 |
add_filter( 'amp_post_template_data', 'ampforwp_framework_add_and_form_scripts',20);
|
15 |
function ampforwp_framework_add_and_form_scripts($data) {
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_action( 'amp_post_template_css', 'ampforwp_theme_support_fonts' );
|
3 |
+
function ampforwp_theme_support_fonts(){
|
4 |
+
global $redux_builder_amp;
|
5 |
+
$amp_font_selector = ampforwp_get_setting('amp_font_selector');
|
6 |
+
if(1==ampforwp_get_setting('ampforwp-google-font-switch') && ( $amp_font_selector==1 || empty($amp_font_selector) ) ) {?>
|
7 |
+
<?php
|
8 |
+
if( !ampforwp_levelup_compatibility('levelup_theme_and_elementor') ){ ?>
|
9 |
+
@font-face {font-family: 'Poppins';font-style: normal;font-weight: 300;font-display: auto;src: local('Poppins Light'), local('Poppins-Light'), url('<?php echo ampforwp_font_url(plugin_dir_url(__FILE__)) ?>fonts/Poppins-Light.ttf');}
|
10 |
+
@font-face {font-family: 'Poppins';font-style: normal;font-weight: 400;font-display: auto;src: local('Poppins Regular'), local('Poppins-Regular'), url('<?php echo ampforwp_font_url(plugin_dir_url(__FILE__)) ?>fonts/Poppins-Regular.ttf');}
|
11 |
+
@font-face {font-family: 'Poppins';font-style: normal;font-weight: 500;font-display: auto;src: local('Poppins Medium'), local('Poppins-Medium'), url('<?php echo ampforwp_font_url(plugin_dir_url(__FILE__)) ?>fonts/Poppins-Medium.ttf');}
|
12 |
+
@font-face {font-family: 'Poppins';font-style: normal;font-weight: 600;font-display: auto;src: local('Poppins SemiBold'), local('Poppins-SemiBold'), url('<?php echo ampforwp_font_url(plugin_dir_url(__FILE__)) ?>fonts/Poppins-SemiBold.ttf'); }
|
13 |
+
@font-face {font-family: 'Poppins';font-style: normal;font-weight: 700;font-display: auto;src: local('Poppins Bold'), local('Poppins-Bold'), url('<?php echo ampforwp_font_url(plugin_dir_url(__FILE__)) ?>fonts/Poppins-Bold.ttf'); }
|
14 |
+
<?php } // levelup condition ends ?>
|
15 |
+
<?php } ?>
|
16 |
+
|
17 |
+
body{<?php
|
18 |
+
$fontFamily = "font-family: 'Arial, Helvetica, sans-serif';";
|
19 |
+
if( 1==ampforwp_get_setting('ampforwp-google-font-switch')){
|
20 |
+
$fontFamily = "font-family: 'Poppins', sans-serif;";
|
21 |
+
if( $amp_font_selector != 1 && !empty( $amp_font_selector )){
|
22 |
+
$fontFamily = "font-family: '". $amp_font_selector ."';";
|
23 |
+
}
|
24 |
+
}
|
25 |
+
echo sanitize_text_field($fontFamily);
|
26 |
+
|
27 |
+
?>
|
28 |
+
font-size: 16px; line-height:1.25; }
|
29 |
+
<?php if(is_single() ) { ?>
|
30 |
+
.cntn-wrp{
|
31 |
+
<?php
|
32 |
+
$amp_font_selector_content_single = ampforwp_get_setting('amp_font_selector_content_single');
|
33 |
+
$fontFamily = "font-family: 'Arial, Helvetica, sans-serif'";
|
34 |
+
if(1==ampforwp_get_setting('ampforwp-google-font-switch')){
|
35 |
+
$fontFamily = "font-family: 'Poppins', sans-serif;";
|
36 |
+
if( $amp_font_selector_content_single != 1 && !empty($amp_font_selector_content_single)){
|
37 |
+
$fontFamily = "font-family: '".$amp_font_selector_content_single."';";
|
38 |
+
}
|
39 |
+
}
|
40 |
+
echo sanitize_text_field($fontFamily);
|
41 |
+
?>
|
42 |
+
}
|
43 |
+
<?php
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
Binary file
|
@@ -349,7 +349,10 @@ jQuery(function($) {
|
|
349 |
$('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
|
350 |
$('#amp_font_selector_content_single-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
|
351 |
}
|
352 |
-
|
|
|
|
|
|
|
353 |
$('#amp_font_selector-select, #amp_font_selector_content_single-select').on('change', function() {
|
354 |
var select = $('option:selected', this).attr('data-font-number');
|
355 |
var fontVariants = data.items[select].variants ;
|
@@ -382,13 +385,61 @@ jQuery(function($) {
|
|
382 |
|
383 |
});
|
384 |
}
|
385 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
if($('#amp_font_selector-select').length>0){
|
387 |
// Adding Default Font Family
|
388 |
$('#s2id_amp_font_selector-select a').removeClass('select2-default');
|
389 |
|
390 |
if(redux_data.amp_font_selector==''){
|
391 |
-
redux_data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
}
|
393 |
$('#s2id_amp_font_selector-select .select2-chosen').html(redux_data.amp_font_selector);
|
394 |
|
@@ -398,7 +449,7 @@ jQuery(function($) {
|
|
398 |
// Build select data
|
399 |
let fontData = redux_data.google_current_font_data;
|
400 |
// fontData = JSON.parse(fontData);
|
401 |
-
console.log(fontData);
|
402 |
if (! fontData.variants) {
|
403 |
//$('.select2-search-choice').remove();
|
404 |
//$('#amp_font_type-select').html('<option></option>');
|
@@ -436,6 +487,45 @@ jQuery(function($) {
|
|
436 |
if(redux_data.amp_font_selector_content_single==''){
|
437 |
redux_data.amp_font_selector_content_single = 'Poppins'
|
438 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
$('#s2id_amp_font_selector_content_single-select .select2-chosen').html(redux_data.amp_font_selector_content_single);
|
440 |
|
441 |
$('#amp_font_selector_content_single-select option[value="'+redux_data.amp_font_selector_content_single+'"]').attr("selected", "selected");
|
349 |
$('#amp_font_selector-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
|
350 |
$('#amp_font_selector_content_single-select').append($('<option value="'+ fontDetail +'" data-font-number="'+ i +'"> '+ fontDetail +' </option>'));
|
351 |
}
|
352 |
+
$('#amp_font_selector-select').append($('<option value="sans-serif" data-font-number="'+ i +'"> sans-serif </option>'));
|
353 |
+
$('#amp_font_selector_content_single-select').append($('<option value="sans-serif" data-font-number="'+ i +'"> sans-serif </option>'));
|
354 |
+
$('#amp_font_selector-select').append($('<option value="Segoe UI" data-font-number="'+ i +'"> Segoe UI </option>'));
|
355 |
+
$('#amp_font_selector_content_single-select').append($('<option value="Segoe UI" data-font-number="'+ i +'"> Segoe UI </option>'));
|
356 |
$('#amp_font_selector-select, #amp_font_selector_content_single-select').on('change', function() {
|
357 |
var select = $('option:selected', this).attr('data-font-number');
|
358 |
var fontVariants = data.items[select].variants ;
|
385 |
|
386 |
});
|
387 |
}
|
388 |
+
$('#redux_builder_amp-amp-design-selector select').on('change',function(){
|
389 |
+
amp_font_selector_select_change('design_change', $(this).val());
|
390 |
+
if( $(this).val() == 1 || $(this).val() == 2 || $(this).val() == 3){
|
391 |
+
$('.amp-theme-global-subsection').find('.secondary-font-selector th div').text('Secondary Font Selector');
|
392 |
+
$('.amp-theme-global-subsection').find('.secondary-font-family-selector th div').text('Secondary Font Family Selector');
|
393 |
+
$('.amp-theme-global-subsection').find('.secondary-font-family-weights th div').text('Secondary Font Family Weight Selector');
|
394 |
+
}else{
|
395 |
+
$('.amp-theme-global-subsection').find('.secondary-font-selector th div').text('Content Font Selector');
|
396 |
+
$('.amp-theme-global-subsection').find('.secondary-font-family-selector th div').text('Content Font Family Selector');
|
397 |
+
$('.amp-theme-global-subsection').find('.secondary-font-family-weights th div').text('Content Font Family Weight Selector');
|
398 |
+
}
|
399 |
+
});
|
400 |
+
function amp_font_selector_select_change(callType='', currentdesign=4){
|
401 |
if($('#amp_font_selector-select').length>0){
|
402 |
// Adding Default Font Family
|
403 |
$('#s2id_amp_font_selector-select a').removeClass('select2-default');
|
404 |
|
405 |
if(redux_data.amp_font_selector==''){
|
406 |
+
switch(redux_data['amp-design-selector']){
|
407 |
+
case '1':
|
408 |
+
redux_data.amp_font_selector = 'Merriweather'
|
409 |
+
break;
|
410 |
+
case '2':
|
411 |
+
redux_data.amp_font_selector = 'sans-serif'
|
412 |
+
break;
|
413 |
+
case '3':
|
414 |
+
redux_data.amp_font_selector = 'Roboto Slab'
|
415 |
+
break;
|
416 |
+
case '4':
|
417 |
+
redux_data.amp_font_selector = 'Poppins'
|
418 |
+
break;
|
419 |
+
default:
|
420 |
+
redux_data.amp_font_selector = 'Poppins'
|
421 |
+
break;
|
422 |
+
}
|
423 |
+
|
424 |
+
}
|
425 |
+
if(callType=='design_change'){
|
426 |
+
switch(currentdesign){
|
427 |
+
case '1':
|
428 |
+
redux_data.amp_font_selector = 'Merriweather'
|
429 |
+
break;
|
430 |
+
case '2':
|
431 |
+
redux_data.amp_font_selector = 'sans-serif'
|
432 |
+
break;
|
433 |
+
case '3':
|
434 |
+
redux_data.amp_font_selector = 'Roboto Slab'
|
435 |
+
break;
|
436 |
+
case '4':
|
437 |
+
redux_data.amp_font_selector = 'Poppins'
|
438 |
+
break;
|
439 |
+
default:
|
440 |
+
redux_data.amp_font_selector = 'Poppins'
|
441 |
+
break;
|
442 |
+
}
|
443 |
}
|
444 |
$('#s2id_amp_font_selector-select .select2-chosen').html(redux_data.amp_font_selector);
|
445 |
|
449 |
// Build select data
|
450 |
let fontData = redux_data.google_current_font_data;
|
451 |
// fontData = JSON.parse(fontData);
|
452 |
+
// console.log(fontData);
|
453 |
if (! fontData.variants) {
|
454 |
//$('.select2-search-choice').remove();
|
455 |
//$('#amp_font_type-select').html('<option></option>');
|
487 |
if(redux_data.amp_font_selector_content_single==''){
|
488 |
redux_data.amp_font_selector_content_single = 'Poppins'
|
489 |
}
|
490 |
+
if(redux_data.amp_font_selector_content_single==''){
|
491 |
+
switch(redux_data['amp-design-selector']){
|
492 |
+
case '1':
|
493 |
+
redux_data.amp_font_selector_content_single = 'Merriweather'
|
494 |
+
break;
|
495 |
+
case '2':
|
496 |
+
redux_data.amp_font_selector_content_single = 'sans-serif'
|
497 |
+
break;
|
498 |
+
case '3':
|
499 |
+
redux_data.amp_font_selector_content_single = 'Roboto Slab'
|
500 |
+
break;
|
501 |
+
case '4':
|
502 |
+
redux_data.amp_font_selector_content_single = 'Poppins'
|
503 |
+
break;
|
504 |
+
default:
|
505 |
+
redux_data.amp_font_selector_content_single = 'Poppins'
|
506 |
+
break;
|
507 |
+
}
|
508 |
+
|
509 |
+
}
|
510 |
+
if(callType=='design_change'){
|
511 |
+
switch(currentdesign){
|
512 |
+
case '1':
|
513 |
+
redux_data.amp_font_selector_content_single = 'Segoe UI'
|
514 |
+
break;
|
515 |
+
case '2':
|
516 |
+
redux_data.amp_font_selector_content_single = 'sans-serif'
|
517 |
+
break;
|
518 |
+
case '3':
|
519 |
+
redux_data.amp_font_selector_content_single = 'PT Serif'
|
520 |
+
break;
|
521 |
+
case '4':
|
522 |
+
redux_data.amp_font_selector_content_single = 'Poppins'
|
523 |
+
break;
|
524 |
+
default:
|
525 |
+
redux_data.amp_font_selector_content_single = 'Poppins'
|
526 |
+
break;
|
527 |
+
}
|
528 |
+
}
|
529 |
$('#s2id_amp_font_selector_content_single-select .select2-chosen').html(redux_data.amp_font_selector_content_single);
|
530 |
|
531 |
$('#amp_font_selector_content_single-select option[value="'+redux_data.amp_font_selector_content_single+'"]').attr("selected", "selected");
|
@@ -866,7 +866,7 @@ visibility: hidden;
|
|
866 |
font-size: 15px;
|
867 |
}
|
868 |
.redux-main .child_opt .afw-tooltip{
|
869 |
-
margin-top: -
|
870 |
}
|
871 |
.redux-main .child_opt .redux_field_th{ background: #f9f9f9;padding:23px 10px 23px 20px;
|
872 |
margin-right: -16px;}
|
@@ -1167,7 +1167,7 @@ div#section-ampforwp-ads-section, table#section-table-ampforwp-ads-section{
|
|
1167 |
}
|
1168 |
}
|
1169 |
.redux-main .redux-field-container{
|
1170 |
-
padding: 18px
|
1171 |
}
|
1172 |
.adsactive {
|
1173 |
max-width: 100%!important;
|
866 |
font-size: 15px;
|
867 |
}
|
868 |
.redux-main .child_opt .afw-tooltip{
|
869 |
+
margin-top: -3px;
|
870 |
}
|
871 |
.redux-main .child_opt .redux_field_th{ background: #f9f9f9;padding:23px 10px 23px 20px;
|
872 |
margin-right: -16px;}
|
1167 |
}
|
1168 |
}
|
1169 |
.redux-main .redux-field-container{
|
1170 |
+
padding: 18px 25px 18px 0;
|
1171 |
}
|
1172 |
.adsactive {
|
1173 |
max-width: 100%!important;
|
@@ -1023,11 +1023,25 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
1023 |
'layout_type' => 'accordion',
|
1024 |
'accordion-open'=> 1,
|
1025 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1026 |
$fields[] = array(
|
1027 |
'id' => 'ampforwp-ads-module',
|
1028 |
'class'=> is_plugin_active('ads-for-wp/ads-for-wp.php')? "adsactive": '',
|
1029 |
'type' => 'raw',
|
1030 |
-
'content' => '<div class="ampforwp-ads-data-update">
|
1031 |
'.(!is_plugin_active('ads-for-wp/ads-for-wp.php')? esc_html__('A Revolutionary new Ad plugin from our team which is dedicated to make the #1 Ad solution in the world.','accelerated-mobile-pages'): esc_html__('Thank you for upgrading the Ads for WP','accelerated-mobile-pages')).'
|
1032 |
<div class="row">
|
1033 |
|
1023 |
'layout_type' => 'accordion',
|
1024 |
'accordion-open'=> 1,
|
1025 |
);
|
1026 |
+
$is_afwp = "not-exist";
|
1027 |
+
$afwp_active_url = '';
|
1028 |
+
$afwp_default = 0;
|
1029 |
+
if(file_exists(AMPFORWP_MAIN_PLUGIN_DIR."ads-for-wp/ads-for-wp.php")){
|
1030 |
+
if(!is_plugin_active('ads-for-wp/ads-for-wp.php')){
|
1031 |
+
$is_afwp = "inactive";
|
1032 |
+
$plugin_file = "ads-for-wp/ads-for-wp.php";
|
1033 |
+
$afwp_active_url = ampforwp_wp_plugin_action_link( $plugin_file, 'activate' );
|
1034 |
+
}else{
|
1035 |
+
$is_afwp = "active";
|
1036 |
+
$afwp_active_url = $ampforwp_admin_url.'admin.php?page=adsforwp&tab=general&reference=ampforwp';
|
1037 |
+
$afwp_default = 2;
|
1038 |
+
}
|
1039 |
+
}
|
1040 |
$fields[] = array(
|
1041 |
'id' => 'ampforwp-ads-module',
|
1042 |
'class'=> is_plugin_active('ads-for-wp/ads-for-wp.php')? "adsactive": '',
|
1043 |
'type' => 'raw',
|
1044 |
+
'content' => '<div class="ampforwp-ads-data-update"><input type="hidden" value="'.esc_url($afwp_active_url).'" class="ampforwp-activation-url" id="'.esc_attr($is_afwp).'">
|
1045 |
'.(!is_plugin_active('ads-for-wp/ads-for-wp.php')? esc_html__('A Revolutionary new Ad plugin from our team which is dedicated to make the #1 Ad solution in the world.','accelerated-mobile-pages'): esc_html__('Thank you for upgrading the Ads for WP','accelerated-mobile-pages')).'
|
1046 |
<div class="row">
|
1047 |
|
@@ -93,8 +93,31 @@ function ampforwp_analytics() {
|
|
93 |
}
|
94 |
|
95 |
// 10.3 Analytics Support added for Piwik
|
96 |
-
if( true == ampforwp_get_setting('ampforwp-Piwik-switch'))
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
<?php }
|
99 |
|
100 |
// 10.4 Analytics Support added for quantcast
|
@@ -299,7 +322,7 @@ add_action( 'amp_post_template_head' , 'ampforwp_analytics_clientid_api' );
|
|
299 |
if( ! function_exists( ' ampforwp_analytics_clientid_api ' ) ) {
|
300 |
function ampforwp_analytics_clientid_api() {
|
301 |
global $redux_builder_amp;
|
302 |
-
if ( true == ampforwp_get_setting('
|
303 |
<meta name="amp-google-client-id-api" content="googleanalytics">
|
304 |
<?php }
|
305 |
}
|
@@ -309,7 +332,7 @@ if( ! function_exists( ' ampforwp_analytics_clientid_api ' ) ) {
|
|
309 |
add_filter('amp_post_template_data','ampforwp_register_analytics_script', 20);
|
310 |
function ampforwp_register_analytics_script( $data ){
|
311 |
global $redux_builder_amp;
|
312 |
-
if( true == ampforwp_get_setting('ampforwp-ga-switch') || true == ampforwp_get_setting('ampforwp-Segment-switch') || true == ampforwp_get_setting('ampforwp-Quantcast-switch') || true == ampforwp_get_setting('ampforwp-comScore-switch') || true == ampforwp_get_setting('ampforwp-Yandex-switch') || true == ampforwp_get_setting('ampforwp-Chartbeat-switch') || true == ampforwp_get_setting('ampforwp-Alexa-switch') || true == ampforwp_get_setting('ampforwp-afs-analytics-switch') || true == ampforwp_get_setting('amp-use-gtm-option') || true == ampforwp_get_setting('amp-clicky-switch')) {
|
313 |
|
314 |
if ( empty( $data['amp_component_scripts']['amp-analytics'] ) ) {
|
315 |
$data['amp_component_scripts']['amp-analytics'] = 'https://cdn.ampproject.org/v0/amp-analytics-0.1.js';
|
@@ -394,7 +417,7 @@ function ampforwp_add_advance_gtm_fields( $ampforwp_adv_gtm_fields ) {
|
|
394 |
$ampforwp_adv_gtm_fields = preg_replace('/\n\s*\n/', '', $ampforwp_adv_gtm_fields);
|
395 |
$ampforwp_adv_gtm_fields = preg_replace('/\/\/(.*?)\s(.*)/m', '$2', $ampforwp_adv_gtm_fields);
|
396 |
?>
|
397 |
-
<amp-analytics
|
398 |
<?php
|
399 |
}
|
400 |
return $ampforwp_adv_gtm_fields;
|
93 |
}
|
94 |
|
95 |
// 10.3 Analytics Support added for Piwik
|
96 |
+
if( true == ampforwp_get_setting('ampforwp-Piwik-switch')){
|
97 |
+
$idsite = urlencode(ampforwp_get_setting('pa-feild'));
|
98 |
+
$title = urlencode(get_the_title());
|
99 |
+
$url = get_the_permalink();
|
100 |
+
$url = urlencode(ampforwp_remove_protocol(ampforwp_url_controller($url)));
|
101 |
+
$rand = rand(1111,9999);
|
102 |
+
$pview = urlencode(ampforwp_remove_protocol(site_url()));
|
103 |
+
$piwik_analytics = '{"triggers":{"trackPageview": {"on":"visible","request":"pageview}},"requests":{"base": "https://piwik.example.org/piwik.php?idsite='.$idsite.'&rec=1&action_name='.$title.'&url='.$url.'&rand='.$rand.'&apiv=1"}}';
|
104 |
+
?>
|
105 |
+
<amp-analytics id="piwikanalytics" <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> type="piwikanalytics">
|
106 |
+
<script type="application/json">
|
107 |
+
{
|
108 |
+
"triggers": {
|
109 |
+
"trackPageview": {
|
110 |
+
"on": "visible",
|
111 |
+
"request": "pageview"
|
112 |
+
}
|
113 |
+
},
|
114 |
+
"requests": {
|
115 |
+
"base": "https://piwik.example.org/piwik.php?idsite=<?php echo urlencode(esc_attr($idsite));?>&rec=1&action_name=<?php echo esc_attr($title);?>&url=<?php echo esc_url($url);?>&rand=<?php echo intval($rand);?>&apiv=1",
|
116 |
+
"pageview": "<?php echo esc_url($pview);?>"
|
117 |
+
}
|
118 |
+
}
|
119 |
+
</script>
|
120 |
+
</amp-analytics>
|
121 |
<?php }
|
122 |
|
123 |
// 10.4 Analytics Support added for quantcast
|
322 |
if( ! function_exists( ' ampforwp_analytics_clientid_api ' ) ) {
|
323 |
function ampforwp_analytics_clientid_api() {
|
324 |
global $redux_builder_amp;
|
325 |
+
if ( true == ampforwp_get_setting('ampforwp-ga-switch') || true == ampforwp_get_setting('amp-use-gtm-option')){ ?>
|
326 |
<meta name="amp-google-client-id-api" content="googleanalytics">
|
327 |
<?php }
|
328 |
}
|
332 |
add_filter('amp_post_template_data','ampforwp_register_analytics_script', 20);
|
333 |
function ampforwp_register_analytics_script( $data ){
|
334 |
global $redux_builder_amp;
|
335 |
+
if( true == ampforwp_get_setting('ampforwp-ga-switch') || true == ampforwp_get_setting('ampforwp-Segment-switch') || true == ampforwp_get_setting('ampforwp-Quantcast-switch') || true == ampforwp_get_setting('ampforwp-comScore-switch') || true == ampforwp_get_setting('ampforwp-Yandex-switch') || true == ampforwp_get_setting('ampforwp-Chartbeat-switch') || true == ampforwp_get_setting('ampforwp-Alexa-switch') || true == ampforwp_get_setting('ampforwp-afs-analytics-switch') || true == ampforwp_get_setting('amp-use-gtm-option') || true == ampforwp_get_setting('amp-clicky-switch') || true == ampforwp_get_setting('ampforwp-Piwik-switch')) {
|
336 |
|
337 |
if ( empty( $data['amp_component_scripts']['amp-analytics'] ) ) {
|
338 |
$data['amp_component_scripts']['amp-analytics'] = 'https://cdn.ampproject.org/v0/amp-analytics-0.1.js';
|
417 |
$ampforwp_adv_gtm_fields = preg_replace('/\n\s*\n/', '', $ampforwp_adv_gtm_fields);
|
418 |
$ampforwp_adv_gtm_fields = preg_replace('/\/\/(.*?)\s(.*)/m', '$2', $ampforwp_adv_gtm_fields);
|
419 |
?>
|
420 |
+
<amp-analytics data-credentials="include" config="https://www.googletagmanager.com/amp.json?id=<?php echo esc_attr(ampforwp_get_setting('amp-gtm-id')); ?>&gtm.url=SOURCE_URL"><script type="application/json"><?php echo $ampforwp_adv_gtm_fields ?></script></amp-analytics>
|
421 |
<?php
|
422 |
}
|
423 |
return $ampforwp_adv_gtm_fields;
|
@@ -159,18 +159,6 @@ function ampforwp_analytics_options($opt_name){
|
|
159 |
array('amp-use-gtm-option', '=' , '1')
|
160 |
),
|
161 |
),
|
162 |
-
array(
|
163 |
-
'class' => 'child_opt',
|
164 |
-
'id' =>'amp-gtm-analytics-type',
|
165 |
-
'type' => 'text',
|
166 |
-
'title' => esc_html__('Analytics Type','accelerated-mobile-pages'),
|
167 |
-
'default' => '',
|
168 |
-
'desc' => esc_html__('Eg: googleanalytics','accelerated-mobile-pages'),
|
169 |
-
// 'validate' => 'not_empty',
|
170 |
-
'required' => array(
|
171 |
-
array('amp-use-gtm-option', '=' , '1')
|
172 |
-
),
|
173 |
-
),
|
174 |
array(
|
175 |
'class'=>'child_opt',
|
176 |
'id' =>'amp-gtm-analytics-code',
|
159 |
array('amp-use-gtm-option', '=' , '1')
|
160 |
),
|
161 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
array(
|
163 |
'class'=>'child_opt',
|
164 |
'id' =>'amp-gtm-analytics-code',
|
@@ -6,6 +6,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
6 |
add_filter('ampforwp_the_content_last_filter','ampforwp_minify_html_output');
|
7 |
function ampforwp_minify_html_output($content_buffer){
|
8 |
$content_buffer = str_replace('srcset=""', '', $content_buffer);
|
|
|
|
|
|
|
9 |
global $redux_builder_amp;
|
10 |
if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
|
11 |
return $content_buffer;
|
6 |
add_filter('ampforwp_the_content_last_filter','ampforwp_minify_html_output');
|
7 |
function ampforwp_minify_html_output($content_buffer){
|
8 |
$content_buffer = str_replace('srcset=""', '', $content_buffer);
|
9 |
+
//Removed trbidi attribute #3687
|
10 |
+
$content_buffer = str_replace('trbidi="on"', '', $content_buffer);
|
11 |
+
$content_buffer = str_replace("trbidi='on'", '', $content_buffer);
|
12 |
global $redux_builder_amp;
|
13 |
if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
|
14 |
return $content_buffer;
|
@@ -8,12 +8,16 @@ jQuery(document).ready(function($){
|
|
8 |
self.addClass('updating-message');
|
9 |
var currentId = self.attr('id');
|
10 |
var activate = '';
|
|
|
|
|
11 |
if(currentId=='ampforwp-pwa-activation-call'){
|
12 |
activate = '&activate=pwa';
|
13 |
}else if(currentId=='ampforwp-structure-data-activation-call'){
|
14 |
activate = '&activate=structure_data';
|
15 |
}else if(currentId=='ampforwp-adsforwp-activation-call'){
|
16 |
activate = '&activate=adsforwp';
|
|
|
|
|
17 |
}
|
18 |
self.text( wp.updates.l10n.installing );
|
19 |
$.ajax({
|
@@ -23,32 +27,48 @@ jQuery(document).ready(function($){
|
|
23 |
dataType: 'json',
|
24 |
success: function (response){
|
25 |
if(response.status==200){
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}else{
|
37 |
alert(response.message)
|
38 |
}
|
39 |
|
40 |
}
|
41 |
-
})//ajaxComplete(
|
42 |
|
43 |
}
|
44 |
});
|
45 |
|
46 |
-
var
|
47 |
-
|
48 |
return;
|
49 |
}
|
50 |
self.text( 'Activating...' );
|
51 |
-
|
52 |
{
|
53 |
async: true,
|
54 |
type: 'GET',
|
@@ -61,21 +81,21 @@ jQuery(document).ready(function($){
|
|
61 |
msgplug = 'PWA';
|
62 |
|
63 |
|
64 |
-
|
65 |
-
|
66 |
}else if(self.attr('id')=='ampforwp-structure-data-activation-call'){
|
67 |
msgplug = 'Structure Data';
|
68 |
self.text( 'Importing data...' );
|
69 |
//Import Data
|
70 |
jQuery.ajax({
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
}else if(self.attr('id')=='ampforwp-adsforwp-activation-call'){
|
80 |
msgplug = 'Ads for WP';
|
81 |
self.text( 'Importing data...' );
|
@@ -86,7 +106,7 @@ jQuery(document).ready(function($){
|
|
86 |
data: 'action=ampforwp_import_modules_ads&verify_nonce='+nonce,
|
87 |
success: function () {
|
88 |
self.html('<a href="'+response.redirect_url+'" style="text-decoration: none;">Go to Ads Settings</a>')
|
89 |
-
|
90 |
}
|
91 |
});
|
92 |
}
|
8 |
self.addClass('updating-message');
|
9 |
var currentId = self.attr('id');
|
10 |
var activate = '';
|
11 |
+
var adsforwp_is_active = "";
|
12 |
+
var adsforwp_act_url = "";
|
13 |
if(currentId=='ampforwp-pwa-activation-call'){
|
14 |
activate = '&activate=pwa';
|
15 |
}else if(currentId=='ampforwp-structure-data-activation-call'){
|
16 |
activate = '&activate=structure_data';
|
17 |
}else if(currentId=='ampforwp-adsforwp-activation-call'){
|
18 |
activate = '&activate=adsforwp';
|
19 |
+
adsforwp_is_active = $(".ampforwp-activation-url").attr('id');
|
20 |
+
adsforwp_act_url = $(".ampforwp-activation-url").val();
|
21 |
}
|
22 |
self.text( wp.updates.l10n.installing );
|
23 |
$.ajax({
|
27 |
dataType: 'json',
|
28 |
success: function (response){
|
29 |
if(response.status==200){
|
30 |
+
//To installation
|
31 |
+
if(currentId=='ampforwp-adsforwp-activation-call'){
|
32 |
+
if(adsforwp_is_active=='not-exist'){
|
33 |
+
wp.updates.installPlugin(
|
34 |
+
{
|
35 |
+
slug: response.slug,
|
36 |
+
success: function(pluginresponse){
|
37 |
+
//wp.updates.installPluginSuccess(pluginresponse);
|
38 |
+
wpActivateModulesUpgrage(pluginresponse.activateUrl, self, response, nonce)
|
39 |
+
}
|
40 |
+
}
|
41 |
+
);
|
42 |
+
}else{
|
43 |
+
wpActivateModulesUpgrage(adsforwp_act_url, self, response, nonce)
|
44 |
+
}
|
45 |
+
}else{
|
46 |
+
wp.updates.installPlugin(
|
47 |
+
{
|
48 |
+
slug: response.slug,
|
49 |
+
success: function(pluginresponse){
|
50 |
+
//wp.updates.installPluginSuccess(pluginresponse);
|
51 |
+
wpActivateModulesUpgrage(pluginresponse.activateUrl, self, response, nonce)
|
52 |
+
}
|
53 |
+
}
|
54 |
+
);
|
55 |
+
}
|
56 |
}else{
|
57 |
alert(response.message)
|
58 |
}
|
59 |
|
60 |
}
|
61 |
+
})//ajaxComplete(wpActivateModulesUpgrage(response.path, self, response));
|
62 |
|
63 |
}
|
64 |
});
|
65 |
|
66 |
+
var wpActivateModulesUpgrage = function(url, self, response, nonce){
|
67 |
+
if (typeof url === 'undefined' || !url) {
|
68 |
return;
|
69 |
}
|
70 |
self.text( 'Activating...' );
|
71 |
+
jQuery.ajax(
|
72 |
{
|
73 |
async: true,
|
74 |
type: 'GET',
|
81 |
msgplug = 'PWA';
|
82 |
|
83 |
|
84 |
+
self.html('<a href="'+response.redirect_url+'" style="text-decoration: none;color: #555;">Installed! - Let\'s Go to '+msgplug+' Settings</a>')
|
85 |
+
self.removeClass('ampforwp-activation-call-module-upgrade');
|
86 |
}else if(self.attr('id')=='ampforwp-structure-data-activation-call'){
|
87 |
msgplug = 'Structure Data';
|
88 |
self.text( 'Importing data...' );
|
89 |
//Import Data
|
90 |
jQuery.ajax({
|
91 |
+
url: ajaxurl,
|
92 |
+
type: 'post',
|
93 |
+
data: 'action=ampforwp_import_modules_scema&verify_nonce='+nonce,
|
94 |
+
success: function () {
|
95 |
+
self.html('<a href="'+response.redirect_url+'" style="text-decoration: none;color: #555;">Installed! - Let\'s Go to '+msgplug+' Settings</a>')
|
96 |
+
self.removeClass('ampforwp-activation-call-module-upgrade');
|
97 |
+
}
|
98 |
+
});
|
99 |
}else if(self.attr('id')=='ampforwp-adsforwp-activation-call'){
|
100 |
msgplug = 'Ads for WP';
|
101 |
self.text( 'Importing data...' );
|
106 |
data: 'action=ampforwp_import_modules_ads&verify_nonce='+nonce,
|
107 |
success: function () {
|
108 |
self.html('<a href="'+response.redirect_url+'" style="text-decoration: none;">Go to Ads Settings</a>')
|
109 |
+
self.removeClass('ampforwp-activation-call-module-upgrade');
|
110 |
}
|
111 |
});
|
112 |
}
|
@@ -559,7 +559,7 @@ $ampforwp_extension_list_html = '';
|
|
559 |
$ampforwp_nameOfUser = "";
|
560 |
$ampforwp_is_productActivated = false;
|
561 |
function ampforwp_sort_extension_array($a, $b){
|
562 |
-
if ($a['is_activated'] == $b['is_activated']) {
|
563 |
return strcmp(strtolower($a['name']), strtolower($b['name']));
|
564 |
}
|
565 |
return ($a['is_activated'] < $b['is_activated']) ? -1 : 1;
|
@@ -1558,6 +1558,11 @@ Redux::setArgs( "redux_builder_amp", $args );
|
|
1558 |
'options' => ampforwp_get_generated_custom_taxonomies(),
|
1559 |
);
|
1560 |
}
|
|
|
|
|
|
|
|
|
|
|
1561 |
$show_for_admin = '';
|
1562 |
if(!current_user_can('administrator') ){
|
1563 |
$show_for_admin = 'hide';
|
@@ -3471,9 +3476,7 @@ Redux::setSection( $opt_name, array(
|
|
3471 |
'type' => 'section',
|
3472 |
'title' => esc_html__('Typography', 'accelerated-mobile-pages'),
|
3473 |
'indent' => true,
|
3474 |
-
|
3475 |
-
array('amp-design-selector', '=' , '4')
|
3476 |
-
),
|
3477 |
'layout_type' => 'accordion',
|
3478 |
'accordion-open'=> 1,
|
3479 |
));
|
@@ -3514,7 +3517,6 @@ Redux::setSection( $opt_name, array(
|
|
3514 |
'title' => esc_html__('Google Fonts', 'accelerated-mobile-pages'),
|
3515 |
'tooltip-subtitle' => esc_html__('Enable/Disable Google Font','accelerated-mobile-pages'),
|
3516 |
'default' => $enabledGoogleFonts,
|
3517 |
-
'required' => array(array('amp-design-selector', '=' , '4'))
|
3518 |
),
|
3519 |
array(
|
3520 |
'id' =>'google_font_api_key',
|
@@ -3523,8 +3525,7 @@ Redux::setSection( $opt_name, array(
|
|
3523 |
'tooltip-subtitle' => esc_html__('You can get the Link ','accelerated-mobile-pages').'<a target="_blank" href="https://developers.google.com/fonts/docs/developer_api?refresh=1&pli=1#APIKey">'.esc_html__('form here','accelerated-mobile-pages').'</a>',
|
3524 |
'default' =>'',
|
3525 |
'required' => array(
|
3526 |
-
array('ampforwp-google-font-switch', '=', '1')
|
3527 |
-
array('amp-design-selector', '=' , '4')
|
3528 |
)
|
3529 |
),
|
3530 |
array(
|
@@ -3538,8 +3539,7 @@ Redux::setSection( $opt_name, array(
|
|
3538 |
),
|
3539 |
'default' => '',
|
3540 |
'required' => array(
|
3541 |
-
array('ampforwp-google-font-switch', '=', '1')
|
3542 |
-
array('amp-design-selector', '=' , '4')
|
3543 |
)
|
3544 |
|
3545 |
),
|
@@ -3555,8 +3555,7 @@ Redux::setSection( $opt_name, array(
|
|
3555 |
),
|
3556 |
'default' => '',
|
3557 |
'required' => array(
|
3558 |
-
array('ampforwp-google-font-switch', '=', '1')
|
3559 |
-
array('amp-design-selector', '=' , '4')
|
3560 |
)
|
3561 |
|
3562 |
),
|
@@ -3567,29 +3566,24 @@ Redux::setSection( $opt_name, array(
|
|
3567 |
'title' =>esc_html__('Google Font Current Font','accelerated-mobile-pages'),
|
3568 |
'default' =>'',
|
3569 |
'required' => array(
|
3570 |
-
array('
|
3571 |
-
array('ampforwp-google-font-switch', '=', '1'),
|
3572 |
)
|
3573 |
),
|
3574 |
array(
|
3575 |
'id' => 'content-font-family-enable',
|
3576 |
'type' => 'switch',
|
3577 |
-
'class' => 'ampforwp-google-font-class',
|
3578 |
-
'title' => esc_html__('
|
3579 |
-
'required' => array(
|
3580 |
-
// array('amp-design-selector', '=' , '4')
|
3581 |
-
),
|
3582 |
'default' => '0' ,
|
3583 |
'required' => array(
|
3584 |
-
array('ampforwp-google-font-switch', '=', '1')
|
3585 |
-
array('amp-design-selector', '=' , '4')
|
3586 |
)
|
3587 |
),
|
3588 |
array(
|
3589 |
'id' => 'amp_font_selector_content_single',
|
3590 |
'type' => 'select',
|
3591 |
-
'class' => 'ampforwp-google-font-class ampwp-font-families',
|
3592 |
-
'title' => esc_html__( '
|
3593 |
'tooltip-subtitle' => esc_html__( 'Select your design from dropdown or ', 'accelerated-mobile-pages' ),
|
3594 |
'options' => array(
|
3595 |
'1' => 'None',
|
@@ -3597,17 +3591,16 @@ Redux::setSection( $opt_name, array(
|
|
3597 |
'default' => '',
|
3598 |
'required' => array(
|
3599 |
array('ampforwp-google-font-switch', '=', '1'),
|
3600 |
-
array('
|
3601 |
-
array('content-font-family-enable', '=' , '1'),
|
3602 |
)
|
3603 |
|
3604 |
),
|
3605 |
array(
|
3606 |
'id' => 'amp_font_type_content_single',
|
3607 |
'type' => 'select',
|
3608 |
-
'class' => 'ampforwp-google-font-class ampwp-font-family-weights',
|
3609 |
'multi' => true,
|
3610 |
-
'title' => esc_html__( '
|
3611 |
'tooltip-subtitle' => esc_html__( 'Select your design from dropdown', 'accelerated-mobile-pages' ),
|
3612 |
'options' => array(
|
3613 |
'1' => 'none',
|
@@ -3615,7 +3608,6 @@ Redux::setSection( $opt_name, array(
|
|
3615 |
'default' => '',
|
3616 |
'required' => array(
|
3617 |
array('ampforwp-google-font-switch', '=', '1'),
|
3618 |
-
array('amp-design-selector', '=' , '4'),
|
3619 |
array('content-font-family-enable', '=' , '1')
|
3620 |
)
|
3621 |
|
@@ -3627,7 +3619,6 @@ Redux::setSection( $opt_name, array(
|
|
3627 |
'title' =>esc_html__('Google Font Current Font','accelerated-mobile-pages'),
|
3628 |
'default' =>'',
|
3629 |
'required' => array(
|
3630 |
-
array('amp-design-selector', '=' , '4'),
|
3631 |
array('ampforwp-google-font-switch', '=', '1'),
|
3632 |
)
|
3633 |
)
|
559 |
$ampforwp_nameOfUser = "";
|
560 |
$ampforwp_is_productActivated = false;
|
561 |
function ampforwp_sort_extension_array($a, $b){
|
562 |
+
if ($a['is_activated'] == $b['is_activated'] && isset($a['label']) && isset($b['label'])) {
|
563 |
return strcmp(strtolower($a['name']), strtolower($b['name']));
|
564 |
}
|
565 |
return ($a['is_activated'] < $b['is_activated']) ? -1 : 1;
|
1558 |
'options' => ampforwp_get_generated_custom_taxonomies(),
|
1559 |
);
|
1560 |
}
|
1561 |
+
$design_types = ampforwp_get_setting('amp-design-selector');
|
1562 |
+
$secondary_text = 'Content';
|
1563 |
+
if($design_types == 1 || $design_types == 2 || $design_types == 3){
|
1564 |
+
$secondary_text = 'Secondary';
|
1565 |
+
}
|
1566 |
$show_for_admin = '';
|
1567 |
if(!current_user_can('administrator') ){
|
1568 |
$show_for_admin = 'hide';
|
3476 |
'type' => 'section',
|
3477 |
'title' => esc_html__('Typography', 'accelerated-mobile-pages'),
|
3478 |
'indent' => true,
|
3479 |
+
|
|
|
|
|
3480 |
'layout_type' => 'accordion',
|
3481 |
'accordion-open'=> 1,
|
3482 |
));
|
3517 |
'title' => esc_html__('Google Fonts', 'accelerated-mobile-pages'),
|
3518 |
'tooltip-subtitle' => esc_html__('Enable/Disable Google Font','accelerated-mobile-pages'),
|
3519 |
'default' => $enabledGoogleFonts,
|
|
|
3520 |
),
|
3521 |
array(
|
3522 |
'id' =>'google_font_api_key',
|
3525 |
'tooltip-subtitle' => esc_html__('You can get the Link ','accelerated-mobile-pages').'<a target="_blank" href="https://developers.google.com/fonts/docs/developer_api?refresh=1&pli=1#APIKey">'.esc_html__('form here','accelerated-mobile-pages').'</a>',
|
3526 |
'default' =>'',
|
3527 |
'required' => array(
|
3528 |
+
array('ampforwp-google-font-switch', '=', '1')
|
|
|
3529 |
)
|
3530 |
),
|
3531 |
array(
|
3539 |
),
|
3540 |
'default' => '',
|
3541 |
'required' => array(
|
3542 |
+
array('ampforwp-google-font-switch', '=', '1')
|
|
|
3543 |
)
|
3544 |
|
3545 |
),
|
3555 |
),
|
3556 |
'default' => '',
|
3557 |
'required' => array(
|
3558 |
+
array('ampforwp-google-font-switch', '=', '1')
|
|
|
3559 |
)
|
3560 |
|
3561 |
),
|
3566 |
'title' =>esc_html__('Google Font Current Font','accelerated-mobile-pages'),
|
3567 |
'default' =>'',
|
3568 |
'required' => array(
|
3569 |
+
array('ampforwp-google-font-switch', '=', '1')
|
|
|
3570 |
)
|
3571 |
),
|
3572 |
array(
|
3573 |
'id' => 'content-font-family-enable',
|
3574 |
'type' => 'switch',
|
3575 |
+
'class' => 'ampforwp-google-font-class secondary-font-selector',
|
3576 |
+
'title' => sprintf('%s', esc_html__( $secondary_text . 'Font Selector', 'accelerated-mobile-pages' ) ),
|
|
|
|
|
|
|
3577 |
'default' => '0' ,
|
3578 |
'required' => array(
|
3579 |
+
array('ampforwp-google-font-switch', '=', '1')
|
|
|
3580 |
)
|
3581 |
),
|
3582 |
array(
|
3583 |
'id' => 'amp_font_selector_content_single',
|
3584 |
'type' => 'select',
|
3585 |
+
'class' => 'ampforwp-google-font-class ampwp-font-families secondary-font-family-selector',
|
3586 |
+
'title' => sprintf('%s', esc_html__( $secondary_text.' Font Family Selector', 'accelerated-mobile-pages') ),
|
3587 |
'tooltip-subtitle' => esc_html__( 'Select your design from dropdown or ', 'accelerated-mobile-pages' ),
|
3588 |
'options' => array(
|
3589 |
'1' => 'None',
|
3591 |
'default' => '',
|
3592 |
'required' => array(
|
3593 |
array('ampforwp-google-font-switch', '=', '1'),
|
3594 |
+
array('content-font-family-enable', '=' , '1')
|
|
|
3595 |
)
|
3596 |
|
3597 |
),
|
3598 |
array(
|
3599 |
'id' => 'amp_font_type_content_single',
|
3600 |
'type' => 'select',
|
3601 |
+
'class' => 'ampforwp-google-font-class ampwp-font-family-weights secondary-font-family-weights',
|
3602 |
'multi' => true,
|
3603 |
+
'title' => sprintf('%s', esc_html__( $secondary_text. ' Font Family Weight Selector', 'accelerated-mobile-pages' ) ),
|
3604 |
'tooltip-subtitle' => esc_html__( 'Select your design from dropdown', 'accelerated-mobile-pages' ),
|
3605 |
'options' => array(
|
3606 |
'1' => 'none',
|
3608 |
'default' => '',
|
3609 |
'required' => array(
|
3610 |
array('ampforwp-google-font-switch', '=', '1'),
|
|
|
3611 |
array('content-font-family-enable', '=' , '1')
|
3612 |
)
|
3613 |
|
3619 |
'title' =>esc_html__('Google Font Current Font','accelerated-mobile-pages'),
|
3620 |
'default' =>'',
|
3621 |
'required' => array(
|
|
|
3622 |
array('ampforwp-google-font-switch', '=', '1'),
|
3623 |
)
|
3624 |
)
|
@@ -60,15 +60,12 @@
|
|
60 |
display: block;
|
61 |
font-size: 16px;
|
62 |
color: #333;}
|
63 |
-
.child_opt .redux_field_th span:first-child{
|
64 |
-
right: 60px;
|
65 |
-
}
|
66 |
.redux_field_th span:first-child{ z-index: 100; font-weight: normal;
|
67 |
position: absolute;
|
68 |
display: block;
|
69 |
color: #777;
|
70 |
font-size: 12px;
|
71 |
-
right:
|
72 |
margin-top: 5px;}
|
73 |
.farb-popup-wrapper{position:relative;display:block}.farb-popup{position:absolute;left:40px;top:40px;background-color:white;border:1px solid #222;padding:5px;z-index:100}#ui-datepicker-div{display:none}.mp6 .icon-themes{display:none}.mp6 .redux-container #info_bar{padding:6px 10px 6px 6px}.mp6 .redux-container #info_bar a{margin-top:2px}.redux-timer{text-align:center;font-size:10px;color:#888}.wrap{margin-top:0}@media screen and (max-width: 600px){.redux-sidebar .extraIconSubsections{display:none !important}.redux-sidebar .redux-group-menu li a,.redux-sidebar .redux-group-menu li a:hover,.redux-sidebar .redux-group-menu li.active a,.redux-sidebar .redux-group-menu li.active a:hover,.redux-sidebar .redux-group-menu li.activeChild a,.redux-sidebar .redux-group-menu li.activeChild a:hover{width:auto}.redux-sidebar .redux-group-tab-link-a{position:relative}
|
74 |
|
60 |
display: block;
|
61 |
font-size: 16px;
|
62 |
color: #333;}
|
|
|
|
|
|
|
63 |
.redux_field_th span:first-child{ z-index: 100; font-weight: normal;
|
64 |
position: absolute;
|
65 |
display: block;
|
66 |
color: #777;
|
67 |
font-size: 12px;
|
68 |
+
right: 2%;
|
69 |
margin-top: 5px;}
|
70 |
.farb-popup-wrapper{position:relative;display:block}.farb-popup{position:absolute;left:40px;top:40px;background-color:white;border:1px solid #222;padding:5px;z-index:100}#ui-datepicker-div{display:none}.mp6 .icon-themes{display:none}.mp6 .redux-container #info_bar{padding:6px 10px 6px 6px}.mp6 .redux-container #info_bar a{margin-top:2px}.redux-timer{text-align:center;font-size:10px;color:#888}.wrap{margin-top:0}@media screen and (max-width: 600px){.redux-sidebar .extraIconSubsections{display:none !important}.redux-sidebar .redux-group-menu li a,.redux-sidebar .redux-group-menu li a:hover,.redux-sidebar .redux-group-menu li.active a,.redux-sidebar .redux-group-menu li.active a:hover,.redux-sidebar .redux-group-menu li.activeChild a,.redux-sidebar .redux-group-menu li.activeChild a:hover{width:auto}.redux-sidebar .redux-group-tab-link-a{position:relative}
|
71 |
|
@@ -94,8 +94,8 @@ function amp_post_template_add_analytics_data( $amp_template ) {
|
|
94 |
}
|
95 |
|
96 |
foreach ( $analytics_entries as $id => $analytics_entry ) {
|
97 |
-
if ( ! isset(
|
98 |
-
_doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'Analytics entry for %s is missing one of the following keys:
|
99 |
continue;
|
100 |
}
|
101 |
|
@@ -103,10 +103,7 @@ function amp_post_template_add_analytics_data( $amp_template ) {
|
|
103 |
'type' => 'application/json',
|
104 |
), wp_json_encode( $analytics_entry['config_data'] ) );
|
105 |
|
106 |
-
$amp_analytics_attr =
|
107 |
-
'id' => $id,
|
108 |
-
'type' => $analytics_entry['type'],
|
109 |
-
), $analytics_entry['attributes'] );
|
110 |
|
111 |
echo AMP_HTML_Utils::build_tag( 'amp-analytics', $amp_analytics_attr, $script_element );
|
112 |
}
|
94 |
}
|
95 |
|
96 |
foreach ( $analytics_entries as $id => $analytics_entry ) {
|
97 |
+
if ( ! isset( $analytics_entry['attributes'], $analytics_entry['config_data'] ) ) {
|
98 |
+
_doing_it_wrong( __FUNCTION__, sprintf( esc_html__( 'Analytics entry for %s is missing one of the following keys: `attributes`, or `config_data` (array keys: %s)', 'accelerated-mobile-pages' ), esc_html( $id ), esc_html( implode( ', ', array_keys( $analytics_entry ) ) ) ), '0.3.2' );
|
99 |
continue;
|
100 |
}
|
101 |
|
103 |
'type' => 'application/json',
|
104 |
), wp_json_encode( $analytics_entry['config_data'] ) );
|
105 |
|
106 |
+
$amp_analytics_attr = $analytics_entry['attributes'];
|
|
|
|
|
|
|
107 |
|
108 |
echo AMP_HTML_Utils::build_tag( 'amp-analytics', $amp_analytics_attr, $script_element );
|
109 |
}
|
@@ -21,7 +21,12 @@ require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-playbuzz-sani
|
|
21 |
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-rule-spec.php' );
|
22 |
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-allowed-tags-generated.php' );
|
23 |
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php' );
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-block-sanitizer.php' );
|
26 |
|
27 |
require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-twitter-embed.php' );
|
21 |
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-rule-spec.php' );
|
22 |
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-allowed-tags-generated.php' );
|
23 |
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php' );
|
24 |
+
global $wp_version;
|
25 |
+
if ( version_compare( $wp_version, '5.3', '>=' ) ) {
|
26 |
+
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-gallery-block-sanitizer-5-3.php' );
|
27 |
+
}else{
|
28 |
+
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-gallery-block-sanitizer.php' );
|
29 |
+
}
|
30 |
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-block-sanitizer.php' );
|
31 |
|
32 |
require_once( AMP__VENDOR__DIR__ . '/includes/embeds/class-amp-twitter-embed.php' );
|
@@ -0,0 +1,459 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace AMPforWP\AMPVendor;
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
require_once( AMP__VENDOR__DIR__ . '/includes/sanitizers/class-amp-base-sanitizer.php' );
|
7 |
+
/**
|
8 |
+
* Class AMP_Gallery_Block_Sanitizer.
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
/**
|
12 |
+
* Class AMP_Gallery_Block_Sanitizer
|
13 |
+
*
|
14 |
+
* Modifies gallery block to match the block's AMP-specific configuration.
|
15 |
+
*/
|
16 |
+
class AMP_Gallery_Block_Sanitizer extends AMP_Base_Sanitizer {
|
17 |
+
/**
|
18 |
+
* Value used for width of amp-carousel.
|
19 |
+
*
|
20 |
+
* @since 1.0
|
21 |
+
*
|
22 |
+
* @const int
|
23 |
+
*/
|
24 |
+
const FALLBACK_WIDTH = 600;
|
25 |
+
/**
|
26 |
+
* Value used for height of amp-carousel.
|
27 |
+
*
|
28 |
+
* @since 1.0
|
29 |
+
*
|
30 |
+
* @const int
|
31 |
+
*/
|
32 |
+
const FALLBACK_HEIGHT = 480;
|
33 |
+
/**
|
34 |
+
* Tag.
|
35 |
+
*
|
36 |
+
* @var string Ul tag to identify wrapper around gallery block.
|
37 |
+
* @since 1.0
|
38 |
+
*/
|
39 |
+
public static $tag = 'ul';
|
40 |
+
/**
|
41 |
+
* Array of flags used to control sanitization.
|
42 |
+
*
|
43 |
+
* @var array {
|
44 |
+
* @type int $content_max_width Max width of content.
|
45 |
+
* @type bool $carousel_required Whether carousels are required. This is used when amp theme support is not present, for back-compat.
|
46 |
+
* }
|
47 |
+
*/
|
48 |
+
protected $args;
|
49 |
+
/**
|
50 |
+
* Default args.
|
51 |
+
*
|
52 |
+
* @var array
|
53 |
+
*/
|
54 |
+
protected $DEFAULT_ARGS = array(
|
55 |
+
'carousel_required' => true,
|
56 |
+
);
|
57 |
+
/**
|
58 |
+
* Expected class of the wrapper around the gallery block.
|
59 |
+
*
|
60 |
+
* @since 1.0
|
61 |
+
*
|
62 |
+
* @var string
|
63 |
+
*/
|
64 |
+
public static $class = 'wp-block-gallery';
|
65 |
+
/**
|
66 |
+
* Sanitize the gallery block contained by <ul> element where necessary.
|
67 |
+
*
|
68 |
+
* @since 0.2
|
69 |
+
*/
|
70 |
+
public function sanitize() {
|
71 |
+
$xpath = new \DOMXPath( $this->dom );
|
72 |
+
$class_query = 'contains( concat( " ", normalize-space( @class ), " " ), " wp-block-gallery " )';
|
73 |
+
$expr = sprintf(
|
74 |
+
'//ul[ %s ]',
|
75 |
+
implode(
|
76 |
+
' or ',
|
77 |
+
[
|
78 |
+
sprintf( '( parent::figure[ %s ] )', $class_query ),
|
79 |
+
$class_query,
|
80 |
+
]
|
81 |
+
)
|
82 |
+
);
|
83 |
+
$query = $xpath->query( $expr );
|
84 |
+
foreach ( $query as $node ) {
|
85 |
+
/**
|
86 |
+
* Element
|
87 |
+
*
|
88 |
+
* @var DOMElement $node
|
89 |
+
*/
|
90 |
+
// In WordPress 5.3, the Gallery block's <ul> is wrapped in a <figure class="wp-block-gallery">, so look for that node also.
|
91 |
+
$gallery_node = isset( $node->parentNode ) && AMP_DOM_Utils::has_class( $node->parentNode, self::$class ) ? $node->parentNode : $node;
|
92 |
+
$attributes = AMP_DOM_Utils::get_node_attributes_as_assoc_array( $gallery_node );
|
93 |
+
$is_amp_lightbox = isset( $attributes['data-amp-lightbox'] ) && true === filter_var( $attributes['data-amp-lightbox'], FILTER_VALIDATE_BOOLEAN );
|
94 |
+
$is_amp_carousel = (
|
95 |
+
! empty( $this->args['carousel_required'] )
|
96 |
+
||
|
97 |
+
filter_var( $node->getAttribute( 'data-amp-carousel' ), FILTER_VALIDATE_BOOLEAN )
|
98 |
+
||
|
99 |
+
filter_var( $node->parentNode->getAttribute( 'data-amp-carousel' ), FILTER_VALIDATE_BOOLEAN )
|
100 |
+
);
|
101 |
+
// We are only looking for <ul> elements which have amp-carousel / amp-lightbox true.
|
102 |
+
if ( ! $is_amp_carousel && ! $is_amp_lightbox ) {
|
103 |
+
continue;
|
104 |
+
}
|
105 |
+
// If lightbox is set, we should add lightbox feature to the gallery images.
|
106 |
+
if ( $is_amp_lightbox ) {
|
107 |
+
$this->add_lightbox_attributes_to_image_nodes( $node );
|
108 |
+
$this->maybe_add_amp_image_lightbox_node();
|
109 |
+
}
|
110 |
+
// If amp-carousel is not set, nothing else to do here.
|
111 |
+
if ( ! $is_amp_carousel ) {
|
112 |
+
continue;
|
113 |
+
}
|
114 |
+
$images = [];
|
115 |
+
// If it's not AMP lightbox, look for links first.
|
116 |
+
if ( ! $is_amp_lightbox ) {
|
117 |
+
foreach ( $node->getElementsByTagName( 'a' ) as $element ) {
|
118 |
+
$images[] = $element;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
// If not linking to anything then look for <amp-img>.
|
122 |
+
if ( empty( $images ) ) {
|
123 |
+
foreach ( $node->getElementsByTagName( 'amp-img' ) as $element ) {
|
124 |
+
$images[] = $element;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
// Skip if no images found.
|
128 |
+
if ( empty( $images ) ) {
|
129 |
+
continue;
|
130 |
+
}
|
131 |
+
list( $width, $height ) = $this->get_carousel_dimensions( $node );
|
132 |
+
$amp_carousel = AMP_DOM_Utils::create_node(
|
133 |
+
$this->dom,
|
134 |
+
'amp-carousel',
|
135 |
+
[
|
136 |
+
'width' => $width,
|
137 |
+
'height' => $height,
|
138 |
+
'type' => 'slides',
|
139 |
+
'layout' => 'responsive',
|
140 |
+
]
|
141 |
+
);
|
142 |
+
foreach ( $images as $element ) {
|
143 |
+
$possible_caption_text = $this->possibly_get_caption_text( $element );
|
144 |
+
$url = $element->getAttribute('src');
|
145 |
+
$width = $element->getAttribute('width');
|
146 |
+
$height = $element->getAttribute('height');
|
147 |
+
$attachment_id = attachment_url_to_postid($url);
|
148 |
+
if($attachment_id==0){
|
149 |
+
$img_name = explode('/',$url);
|
150 |
+
$img_name = end($img_name);
|
151 |
+
$img_croped = explode('-',$img_name);
|
152 |
+
$img_croped = end($img_croped);
|
153 |
+
$filetype = wp_check_filetype($img_croped);
|
154 |
+
$img_ext = $filetype['ext'];
|
155 |
+
$new_img_url = str_replace("-$img_croped",".$img_ext",$url);
|
156 |
+
$attachment_id = attachment_url_to_postid($new_img_url);
|
157 |
+
}
|
158 |
+
if ( empty( $images ) ) {
|
159 |
+
$images[] = $element;
|
160 |
+
}
|
161 |
+
$urls[] = apply_filters('amp_gallery_image_params', array(
|
162 |
+
'url' => $url,
|
163 |
+
'width' => $width,
|
164 |
+
'height' => $height,
|
165 |
+
'caption' => $possible_caption_text
|
166 |
+
),$attachment_id);
|
167 |
+
}
|
168 |
+
if ( empty( $images ) ) {
|
169 |
+
continue;
|
170 |
+
}
|
171 |
+
$amp_carousel_node = $this->render( array(
|
172 |
+
'images' => $urls,
|
173 |
+
), $gallery_node );
|
174 |
+
$gallery_node->parentNode->replaceChild( $amp_carousel_node, $gallery_node );
|
175 |
+
}
|
176 |
+
$this->did_convert_elements = true;
|
177 |
+
}
|
178 |
+
/**
|
179 |
+
* Gets the caption of an image, if it exists.
|
180 |
+
*
|
181 |
+
* @param DOMElement $element The element for which to search for a caption.
|
182 |
+
* @return string|null The caption for the image, or null.
|
183 |
+
*/
|
184 |
+
public function possibly_get_caption_text( $element ) {
|
185 |
+
$caption_tag = 'figcaption';
|
186 |
+
if ( isset( $element->nextSibling->nodeName ) && $caption_tag === $element->nextSibling->nodeName ) {
|
187 |
+
return $element->nextSibling->textContent;
|
188 |
+
}
|
189 |
+
// If 'Link To' is selected, the image will be wrapped in an <a>, so search for the sibling of the <a>.
|
190 |
+
if ( isset( $element->parentNode->nextSibling->nodeName ) && $caption_tag === $element->parentNode->nextSibling->nodeName ) {
|
191 |
+
return $element->parentNode->nextSibling->textContent;
|
192 |
+
}
|
193 |
+
return null;
|
194 |
+
}
|
195 |
+
/**
|
196 |
+
* Get carousel height by containing images.
|
197 |
+
*
|
198 |
+
* @param DOMElement $element The UL element.
|
199 |
+
* @return int Height.
|
200 |
+
*/
|
201 |
+
protected function get_carousel_height( $element ) {
|
202 |
+
$images = $element->getElementsByTagName( 'amp-img' );
|
203 |
+
$num_images = $images->length;
|
204 |
+
$max_height = 0;
|
205 |
+
$max_width = 0;
|
206 |
+
if ( 0 === $num_images ) {
|
207 |
+
return self::FALLBACK_HEIGHT;
|
208 |
+
}
|
209 |
+
foreach ( $images as $image ) {
|
210 |
+
/**
|
211 |
+
* Image.
|
212 |
+
*
|
213 |
+
* @var DOMElement $image
|
214 |
+
*/
|
215 |
+
$image_height = $image->getAttribute( 'height' );
|
216 |
+
if ( is_numeric( $image_height ) ) {
|
217 |
+
$max_height = max( $max_height, $image_height );
|
218 |
+
}
|
219 |
+
$image_width = $image->getAttribute( 'height' );
|
220 |
+
if ( is_numeric( $image_width ) ) {
|
221 |
+
$max_width = max( $max_width, $image_width );
|
222 |
+
}
|
223 |
+
}
|
224 |
+
if ( ! empty( $this->args['content_max_width'] ) && $max_height > 0 && $max_width > $this->args['content_max_width'] ) {
|
225 |
+
$max_height = ( $max_width * $this->args['content_max_width'] ) / $max_height;
|
226 |
+
}
|
227 |
+
return ! $max_height ? self::FALLBACK_HEIGHT : $max_height;
|
228 |
+
}
|
229 |
+
/**
|
230 |
+
* Set lightbox related attributes to <amp-img> within gallery.
|
231 |
+
*
|
232 |
+
* @param DOMElement $element The UL element.
|
233 |
+
*/
|
234 |
+
protected function add_lightbox_attributes_to_image_nodes( $element ) {
|
235 |
+
$images = $element->getElementsByTagName( 'amp-img' );
|
236 |
+
$num_images = $images->length;
|
237 |
+
if ( 0 === $num_images ) {
|
238 |
+
return;
|
239 |
+
}
|
240 |
+
$attributes = array(
|
241 |
+
'data-amp-lightbox' => '',
|
242 |
+
'on' => 'tap:' . self::AMP_IMAGE_LIGHTBOX_ID,
|
243 |
+
'role' => 'button',
|
244 |
+
'tabindex' => 0,
|
245 |
+
);
|
246 |
+
for ( $j = $num_images - 1; $j >= 0; $j-- ) {
|
247 |
+
$image_node = $images->item( $j );
|
248 |
+
foreach ( $attributes as $att => $value ) {
|
249 |
+
$image_node->setAttribute( $att, $value );
|
250 |
+
}
|
251 |
+
}
|
252 |
+
}
|
253 |
+
public function render( $args, $node ) {
|
254 |
+
global $redux_builder_amp,$carousel_styling;
|
255 |
+
$this->did_convert_elements = true;
|
256 |
+
$args = wp_parse_args( $args, array(
|
257 |
+
'images' => false,
|
258 |
+
) );
|
259 |
+
if ( empty( $args['images'] ) ) {
|
260 |
+
return '';
|
261 |
+
}
|
262 |
+
/*Filter*/
|
263 |
+
$carousel_markup = $amp_image_lightbox = '';
|
264 |
+
$carousel_styling = '';
|
265 |
+
//Default markup
|
266 |
+
$markup = 1;
|
267 |
+
if ( ampforwp_get_setting('ampforwp-gallery-design-type') ) {
|
268 |
+
$markup = ampforwp_get_setting('ampforwp-gallery-design-type');
|
269 |
+
}
|
270 |
+
$amp_images = array();
|
271 |
+
foreach ( $args['images'] as $key => $image ) {
|
272 |
+
$amp_img_arr = array(
|
273 |
+
'src' => $image['url'],
|
274 |
+
'width' => $image['width'],
|
275 |
+
'height' => $image['height'],
|
276 |
+
'caption' => $image['caption'],
|
277 |
+
'layout' => 'fill',
|
278 |
+
'class' => 'amp-carousel-img',
|
279 |
+
);
|
280 |
+
if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
|
281 |
+
$design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
|
282 |
+
'tabindex'=>$key);
|
283 |
+
$amp_img_arr = array_merge($amp_img_arr, $design3_additional_attr);
|
284 |
+
$amp_image_lightbox = true;
|
285 |
+
}
|
286 |
+
$amp_image_node = AMP_DOM_Utils::create_node( $this->dom, 'amp-img', $amp_img_arr );
|
287 |
+
$amp_images[$key] = $amp_image_node;
|
288 |
+
if ( 3 != ampforwp_get_setting('ampforwp-gallery-design-type') ) {
|
289 |
+
$image_div = AMP_DOM_Utils::create_node( $this->dom, 'div', array('class'=>'ampforwp-gallery-item amp-carousel-container') );
|
290 |
+
$image_div->appendChild($amp_image_node);
|
291 |
+
if ( isset($image['caption']) ) {
|
292 |
+
$figure_node = AMP_DOM_Utils::create_node($this->dom, 'figure', array());
|
293 |
+
$fig_caption = AMP_DOM_Utils::create_node($this->dom, 'figcaption', array('on'=>"tap:AMP.setState({expanded: !expanded})",'tabindex'=>0,'role'=>'button'));
|
294 |
+
$fig_caption->nodeValue = $image['caption'];
|
295 |
+
$figure_node->appendChild($image_div);
|
296 |
+
$figure_node->appendChild($fig_caption);
|
297 |
+
$amp_images[$key] = $figure_node;
|
298 |
+
}
|
299 |
+
else
|
300 |
+
$amp_images[$key] = $image_div;
|
301 |
+
}
|
302 |
+
if ( 2 == ampforwp_get_setting('ampforwp-gallery-design-type') ) {
|
303 |
+
//Small Thumbnail Images
|
304 |
+
$thumb_url = ampforwp_aq_resize( $image['url'], 120, 60, true, false ); //resize & crop the image
|
305 |
+
if($thumb_url!=false){
|
306 |
+
$smallimage = $thumb_url[0];
|
307 |
+
$smallwidth = $thumb_url[1];
|
308 |
+
$smallheight = $thumb_url[2];
|
309 |
+
}else{
|
310 |
+
$smallimage = $image['url'];
|
311 |
+
$smallwidth = $image['width'];
|
312 |
+
$smallheight = $image['height'];
|
313 |
+
}
|
314 |
+
$amp_images_small[$key] = AMP_DOM_Utils::create_node(
|
315 |
+
$this->dom,
|
316 |
+
'amp-img',
|
317 |
+
array(
|
318 |
+
'src' => $smallimage,
|
319 |
+
'width' => $smallwidth,
|
320 |
+
'height' => $smallheight,
|
321 |
+
'layout' => 'fill',
|
322 |
+
'class' => 'amp-carousel-img',
|
323 |
+
)
|
324 |
+
);
|
325 |
+
}
|
326 |
+
}// foreach Closed
|
327 |
+
//replacements
|
328 |
+
$r = rand(1,100);
|
329 |
+
if ( 3 != ampforwp_get_setting('ampforwp-gallery-design-type') ){
|
330 |
+
$amp_carousel = AMP_DOM_Utils::create_node($this->dom,
|
331 |
+
'amp-carousel',
|
332 |
+
array(
|
333 |
+
'width' => 600,
|
334 |
+
'height' => 480,
|
335 |
+
'type' => 'slides',
|
336 |
+
'layout' => 'responsive',
|
337 |
+
'class' => 'collapsible-captions',
|
338 |
+
'id' => 'carousel-with-carousel-preview-'.$r
|
339 |
+
)
|
340 |
+
);
|
341 |
+
foreach ($amp_images as $amp_image) {
|
342 |
+
$amp_carousel->appendChild( $amp_image );
|
343 |
+
}
|
344 |
+
}
|
345 |
+
if ( 2 == ampforwp_get_setting('ampforwp-gallery-design-type') ) {
|
346 |
+
$button_nodes = array();
|
347 |
+
$amp_carousel_thumbnail = AMP_DOM_Utils::create_node(
|
348 |
+
$this->dom,
|
349 |
+
'amp-carousel',
|
350 |
+
array(
|
351 |
+
'width' => 'auto',
|
352 |
+
'height' => 48,
|
353 |
+
'type' => 'carousel',
|
354 |
+
'loop' => '',
|
355 |
+
'autoplay' => '',
|
356 |
+
'layout' => 'fixed-height',
|
357 |
+
'class' => 'carousel-preview'
|
358 |
+
)
|
359 |
+
);
|
360 |
+
foreach ($amp_images_small as $key => $value) {
|
361 |
+
$button_node = AMP_DOM_Utils::create_node(
|
362 |
+
$this->dom,
|
363 |
+
'button',
|
364 |
+
array(
|
365 |
+
'on'=>'tap:carousel-with-carousel-preview-'.$r.'.goToSlide(index='.$key.')',
|
366 |
+
'class'=>'amp-carousel-slide amp-scrollable-carousel-slide')
|
367 |
+
);
|
368 |
+
$button_node->appendChild($value);
|
369 |
+
$amp_carousel_thumbnail->appendChild($button_node);
|
370 |
+
}
|
371 |
+
$node->parentNode->insertBefore($amp_carousel_thumbnail,$node->nextSibling);
|
372 |
+
add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_gal_des_2');
|
373 |
+
}
|
374 |
+
elseif ( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') ) {
|
375 |
+
$gal_div = AMP_DOM_Utils::create_node($this->dom, 'div', array('class'=>'gal_w') );
|
376 |
+
$i = 0;
|
377 |
+
foreach ($amp_images as $amp_image) {
|
378 |
+
$figure_node = AMP_DOM_Utils::create_node($this->dom, 'figure', array('class'=>'ampforwp-gallery-item amp-carousel-containerd3'));
|
379 |
+
$figure_node->appendChild($amp_image);
|
380 |
+
$fig_caption = AMP_DOM_Utils::create_node($this->dom, 'figcaption', array());
|
381 |
+
$fig_caption->nodeValue = $args['images'][$i]['caption'];
|
382 |
+
$figure_node->appendChild($fig_caption);
|
383 |
+
$gal_div->appendChild( $figure_node );
|
384 |
+
$i++;
|
385 |
+
}
|
386 |
+
$amp_carousel = $gal_div;
|
387 |
+
add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_gal_des_3');
|
388 |
+
}
|
389 |
+
if ( $amp_image_lightbox ) {
|
390 |
+
add_action('ampforwp_after_post_content', 'AMPforWP\\AMPVendor\\ampforwp_gallery_lightbox');
|
391 |
+
}
|
392 |
+
if($markup == 1){
|
393 |
+
add_action('amp_post_template_css', 'AMPforWP\\AMPVendor\\ampforwp_gal_des_1');
|
394 |
+
}
|
395 |
+
add_filter('amp_post_template_data','ampforwp_carousel_bind_script');
|
396 |
+
add_action('amp_post_template_css', 'ampforwp_additional_style_carousel_caption');
|
397 |
+
return $amp_carousel;
|
398 |
+
}
|
399 |
+
/**
|
400 |
+
* Get carousel height by containing images.
|
401 |
+
*
|
402 |
+
* @param DOMElement $element The UL element.
|
403 |
+
* @return array {
|
404 |
+
* Dimensions.
|
405 |
+
*
|
406 |
+
* @type int $width Width.
|
407 |
+
* @type int $height Height.
|
408 |
+
* }
|
409 |
+
*/
|
410 |
+
protected function get_carousel_dimensions( $element ) {
|
411 |
+
/**
|
412 |
+
* Elements.
|
413 |
+
*
|
414 |
+
* @var DOMElement $image
|
415 |
+
*/
|
416 |
+
$images = $element->getElementsByTagName( 'amp-img' );
|
417 |
+
$num_images = $images->length;
|
418 |
+
$max_aspect_ratio = 0;
|
419 |
+
$carousel_width = 0;
|
420 |
+
$carousel_height = 0;
|
421 |
+
if ( 0 === $num_images ) {
|
422 |
+
return [ self::FALLBACK_WIDTH, self::FALLBACK_HEIGHT ];
|
423 |
+
}
|
424 |
+
foreach ( $images as $image ) {
|
425 |
+
if ( ! is_numeric( $image->getAttribute( 'width' ) ) || ! is_numeric( $image->getAttribute( 'height' ) ) ) {
|
426 |
+
continue;
|
427 |
+
}
|
428 |
+
$width = (float) $image->getAttribute( 'width' );
|
429 |
+
$height = (float) $image->getAttribute( 'height' );
|
430 |
+
$this_aspect_ratio = $width / $height;
|
431 |
+
if ( $this_aspect_ratio > $max_aspect_ratio ) {
|
432 |
+
$max_aspect_ratio = $this_aspect_ratio;
|
433 |
+
$carousel_width = $width;
|
434 |
+
$carousel_height = $height;
|
435 |
+
}
|
436 |
+
}
|
437 |
+
return [ $carousel_width, $carousel_height ];
|
438 |
+
}
|
439 |
+
}
|
440 |
+
function ampforwp_gal_des_1(){
|
441 |
+
echo '.cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}.cls-btn:after{content:"X";display:inline-block;color:#fff;font-size:20px;padding:20px;}';
|
442 |
+
}
|
443 |
+
function ampforwp_gal_des_2(){
|
444 |
+
echo ".carousel-preview button{padding:0;}.carousel-preview amp-img{height:40px;width:60px;position:relative;}.carousel-preview {width: 100%;display: inline-block;text-align: center;margin: 20px 0px;}.cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}.cls-btn:after{content:\"X\";display:inline-block;color:#fff;font-size:20px;padding:20px;}";
|
445 |
+
}
|
446 |
+
function ampforwp_gal_des_3(){
|
447 |
+
echo '.gal_w{display:inline-block;width:100%}.gal_w amp-img{background:#f1f1f1;height:134px;width:150px;position: relative;float:left;margin:10px;}.cls-btn{background:#0d0d0d;border:none;position: absolute;right: 10px;}.cls-btn:after{content:"X";display:inline-block;color:#fff;font-size:20px;padding:20px;}';
|
448 |
+
}
|
449 |
+
function ampforwp_gallery_lightbox(){
|
450 |
+
$amp_image_lightbox = '';
|
451 |
+
$amp_image_lightbox = '<amp-image-lightbox id="gallery-lightbox" layout="nodisplay">
|
452 |
+
<div on="tap:gallery-lightbox.close" role="button"
|
453 |
+
tabindex="0">
|
454 |
+
<button class="cls-btn" on="tap:gallery-lightbox.close"
|
455 |
+
role="button" tabindex="0"></button>
|
456 |
+
</div>
|
457 |
+
</amp-image-lightbox>';
|
458 |
+
echo $amp_image_lightbox;
|
459 |
+
}
|
@@ -616,4 +616,20 @@ class AMP_DOM_Utils {
|
|
616 |
private static function is_self_closing_tag( $tag ) {
|
617 |
return in_array( strtolower( $tag ), self::$self_closing_tags, true );
|
618 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
}
|
616 |
private static function is_self_closing_tag( $tag ) {
|
617 |
return in_array( strtolower( $tag ), self::$self_closing_tags, true );
|
618 |
}
|
619 |
+
/**
|
620 |
+
* Check whether a given element has a specific class.
|
621 |
+
*
|
622 |
+
* @since 1.4.0
|
623 |
+
*
|
624 |
+
* @param DOMElement $element Element to check the classes of.
|
625 |
+
* @param string $class Class to check for.
|
626 |
+
* @return bool Whether the element has the requested class.
|
627 |
+
*/
|
628 |
+
public static function has_class( \DOMElement $element, $class ) {
|
629 |
+
if ( ! $element->hasAttribute( 'class' ) ) {
|
630 |
+
return false;
|
631 |
+
}
|
632 |
+
$classes = $element->getAttribute( 'class' );
|
633 |
+
return in_array( $class, preg_split( '/\s/', $classes ), true );
|
634 |
+
}
|
635 |
}
|
@@ -7,6 +7,7 @@ class AMP_Image_Dimension_Extractor {
|
|
7 |
static $callbacks_registered = false;
|
8 |
const STATUS_FAILED_LAST_ATTEMPT = 'failed';
|
9 |
const STATUS_IMAGE_EXTRACTION_FAILED = 'failed';
|
|
|
10 |
|
11 |
static public function extract( $urls ) {
|
12 |
if ( ! self::$callbacks_registered ) {
|
@@ -230,14 +231,22 @@ class AMP_Image_Dimension_Extractor {
|
|
230 |
$attachment_id = '';
|
231 |
$image_data = $images[ $url_data['url'] ];
|
232 |
// Fallback #2931
|
233 |
-
if ( self::STATUS_IMAGE_EXTRACTION_FAILED === $image_data['size'] ) {
|
234 |
$attachment_id = attachment_url_to_postid($url_data['url']);
|
235 |
$image = wp_get_attachment_image_src($attachment_id, 'full');
|
236 |
if ( $image ) {
|
237 |
$image_data['size'] = array($image[1],$image[2]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
}
|
240 |
-
if ( self::STATUS_IMAGE_EXTRACTION_FAILED === $image_data['size'] ) {
|
241 |
$dimensions[ $url_data['url'] ] = false;
|
242 |
set_transient( $url_data['transient_name'], self::STATUS_FAILED_LAST_ATTEMPT, $transient_expiration );
|
243 |
} else {
|
7 |
static $callbacks_registered = false;
|
8 |
const STATUS_FAILED_LAST_ATTEMPT = 'failed';
|
9 |
const STATUS_IMAGE_EXTRACTION_FAILED = 'failed';
|
10 |
+
const STATUS_IMAGE_EXTRACTION_INVALID = 'invalid';
|
11 |
|
12 |
static public function extract( $urls ) {
|
13 |
if ( ! self::$callbacks_registered ) {
|
231 |
$attachment_id = '';
|
232 |
$image_data = $images[ $url_data['url'] ];
|
233 |
// Fallback #2931
|
234 |
+
if ( self::STATUS_IMAGE_EXTRACTION_FAILED === $image_data['size'] || self::STATUS_IMAGE_EXTRACTION_INVALID === $image_data['size']) {
|
235 |
$attachment_id = attachment_url_to_postid($url_data['url']);
|
236 |
$image = wp_get_attachment_image_src($attachment_id, 'full');
|
237 |
if ( $image ) {
|
238 |
$image_data['size'] = array($image[1],$image[2]);
|
239 |
+
}else {
|
240 |
+
$urlArraydata = explode( '-', $url_data['url'] );
|
241 |
+
$urlArrayLastdata = end( $urlArraydata );
|
242 |
+
$parsed_url = explode( 'x', $urlArrayLastdata );
|
243 |
+
if ( is_array( $parsed_url ) ) {
|
244 |
+
$height = explode( '.', $parsed_url[1] );
|
245 |
+
$image_data['size'] = array( $parsed_url[0], $height[0] );
|
246 |
+
}
|
247 |
}
|
248 |
}
|
249 |
+
if ( self::STATUS_IMAGE_EXTRACTION_FAILED === $image_data['size'] || self::STATUS_IMAGE_EXTRACTION_INVALID === $image_data['size']) {
|
250 |
$dimensions[ $url_data['url'] ] = false;
|
251 |
set_transient( $url_data['transient_name'], self::STATUS_FAILED_LAST_ATTEMPT, $transient_expiration );
|
252 |
} else {
|
@@ -319,7 +319,14 @@ if(!function_exists('ampforwp_aq_resize')) {
|
|
319 |
}
|
320 |
elseif( function_exists('fifu_activate') || is_plugin_active('fifu-premium/fifu-premium.php') ){
|
321 |
return fifu_amp_url($url, $width, $height);
|
322 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
else {
|
324 |
$aq_resize = Aq_Resize::getInstance();
|
325 |
return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
|
319 |
}
|
320 |
elseif( function_exists('fifu_activate') || is_plugin_active('fifu-premium/fifu-premium.php') ){
|
321 |
return fifu_amp_url($url, $width, $height);
|
322 |
+
} else if (function_exists('wpp_get_option')){
|
323 |
+
$image = array(
|
324 |
+
0 => $url,
|
325 |
+
1 => $width,
|
326 |
+
2 => $height,
|
327 |
+
);
|
328 |
+
return $image;
|
329 |
+
}
|
330 |
else {
|
331 |
$aq_resize = Aq_Resize::getInstance();
|
332 |
return $aq_resize->process( $url, $width, $height, $crop, $single, $upscale );
|
@@ -526,9 +526,17 @@ function ampforwp_pb_autoCompileLess($css)
|
|
526 |
|
527 |
// add groups of media query at the end of CSS
|
528 |
$css = $css." \n";
|
529 |
-
|
530 |
-
{
|
531 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
532 |
}
|
533 |
//Remove multiple Spaces
|
534 |
//padding:\s*?(\d*px)\s*(\d*px)\s*(\d*px)\s*(\d*px)\s*?;
|
526 |
|
527 |
// add groups of media query at the end of CSS
|
528 |
$css = $css." \n";
|
529 |
+
$medias = array();
|
530 |
+
foreach ($completeCssMinifies as $key => $value) {
|
531 |
+
preg_match_all('!\d+!', $key, $matches);
|
532 |
+
if($matches){
|
533 |
+
$medias[$matches[0][0]] = $value;
|
534 |
+
}
|
535 |
+
}
|
536 |
+
krsort($medias);
|
537 |
+
foreach ($medias as $id => $val)
|
538 |
+
{
|
539 |
+
$css .= "\n" . '@media(max-width:' . $id . 'px){' . $val . '}' . "\n";
|
540 |
}
|
541 |
//Remove multiple Spaces
|
542 |
//padding:\s*?(\d*px)\s*(\d*px)\s*(\d*px)\s*(\d*px)\s*?;
|
@@ -3,17 +3,79 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
3 |
exit;
|
4 |
}
|
5 |
$output = '
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
$css = '
|
9 |
{{if_condition_testimonial_layout_type==1}}
|
10 |
.testimonial-mod{margin:{{margin_css}};padding:{{padding_css}};}
|
11 |
-
{{module-class}} .ln-fx{
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
{{module-class}} .testi-cont p{margin-bottom:5px;}
|
15 |
.testi-cont:after{content:"";width: 0;height: 0;border-style: solid; border-width: 20px 20px 0 20px;border-color: #f4f4f4 transparent transparent transparent;bottom:-20px;position:absolute;}
|
16 |
-
.testi-mod:nth-child(3)
|
17 |
.auth-info{width:100%;display:inline-block;margin-top: 35px;margin-left:15px;}
|
18 |
.auth-img{float:left;margin-right:15px;}
|
19 |
.auth-img amp-img{border-radius:50%;width:50px;height:50px;}
|
@@ -21,9 +83,133 @@ $css = '
|
|
21 |
.auth-cntn h5{font-size: {{txt-size}};color: {{aut_color_picker}};font-weight:500;}
|
22 |
.auth-cntn span{font-size: {{dsg-size}};color: {{dsg_color}};font-weight:normal;}
|
23 |
@media(max-width:768px){
|
24 |
-
.testi-mod{
|
|
|
25 |
}
|
26 |
{{ifend_condition_testimonial_layout_type_1}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
';
|
28 |
global $redux_builder_amp;
|
29 |
if(ampforwp_get_setting('amp-rtl-select-option')){
|
@@ -60,6 +246,11 @@ return array(
|
|
60 |
'label'=>'',
|
61 |
'demo_image'=> AMPFORWP_PLUGIN_DIR_URI.'/images/testmon-1.png'
|
62 |
),
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
),
|
65 |
'content_type'=>'html',
|
@@ -71,7 +262,8 @@ return array(
|
|
71 |
'tab' =>'design',
|
72 |
'default' =>'13px',
|
73 |
'content_type'=>'css',
|
74 |
-
|
|
|
75 |
),
|
76 |
array(
|
77 |
'type' =>'color-picker',
|
@@ -80,6 +272,8 @@ return array(
|
|
80 |
'tab' =>'design',
|
81 |
'default' =>'#333',
|
82 |
'content_type'=>'css',
|
|
|
|
|
83 |
|
84 |
),
|
85 |
array(
|
@@ -89,6 +283,8 @@ return array(
|
|
89 |
'tab' =>'design',
|
90 |
'default' =>'13px',
|
91 |
'content_type'=>'css',
|
|
|
|
|
92 |
|
93 |
),
|
94 |
array(
|
@@ -98,6 +294,8 @@ return array(
|
|
98 |
'tab' =>'design',
|
99 |
'default' =>'#333',
|
100 |
'content_type'=>'css',
|
|
|
|
|
101 |
|
102 |
),
|
103 |
array(
|
@@ -107,6 +305,8 @@ return array(
|
|
107 |
'tab' =>'design',
|
108 |
'default' =>'18px',
|
109 |
'content_type'=>'css',
|
|
|
|
|
110 |
|
111 |
),
|
112 |
array(
|
@@ -116,8 +316,98 @@ return array(
|
|
116 |
'tab' =>'design',
|
117 |
'default' =>'#333',
|
118 |
'content_type'=>'css',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
array(
|
122 |
'type' =>'text',
|
123 |
'name' =>"id",
|
@@ -205,23 +495,35 @@ return array(
|
|
205 |
|
206 |
|
207 |
),
|
208 |
-
'front_template'=>
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
),
|
226 |
);
|
227 |
|
3 |
exit;
|
4 |
}
|
5 |
$output = '
|
6 |
+
{{if_condition_testimonial_layout_type==1}}
|
7 |
+
<div {{if_id}}id="{{id}}"{{ifend_id}} class="ln-fx {{user_class}}">{{repeater_design_1}}</div>
|
8 |
+
{{ifend_condition_testimonial_layout_type_1}}
|
9 |
+
|
10 |
+
{{if_condition_testimonial_layout_type==3}}
|
11 |
+
<amp-carousel {{if_id}}id="{{id}}"{{ifend_id}} class="testi3-slider {{user_class}}" type="slides" width="1200" height="450" layout="responsive" data-next-button-aria-label="Go to next slide"
|
12 |
+
data-previous-button-aria-label="Go to previous slide"">
|
13 |
+
{{repeater_design_3}}
|
14 |
+
</amp-carousel>
|
15 |
+
{{ifend_condition_testimonial_layout_type_3}}
|
16 |
';
|
17 |
+
if ( in_array(ampforwp_get_setting('amp-design-selector'), array(1,2,3)) ) {
|
18 |
+
$designCss = '{{module-class}} amp-carousel.testi3-slider, {{module-class}} .testi-mod-blk blockquote{
|
19 |
+
background:transparent;
|
20 |
+
}
|
21 |
+
{{module-class}} amp-carousel .testi-mod-3{
|
22 |
+
box-sizing:border-box;
|
23 |
+
}
|
24 |
+
{{module-class}} .testi-mod-blk blockquote{
|
25 |
+
padding:0;
|
26 |
+
}
|
27 |
+
.amp-wp-content.the_content {{module-class}} .testi-mod-blk h4{
|
28 |
+
font-size: {{d3-txt-size}};
|
29 |
+
line-height: 1.2;
|
30 |
+
margin-top: 10px;
|
31 |
+
font-weight: 600;
|
32 |
+
color: {{d3-aut_color_picker}};
|
33 |
+
}
|
34 |
+
';
|
35 |
+
}
|
36 |
+
if ( in_array(ampforwp_get_setting('amp-design-selector'), array(4)) ) {
|
37 |
+
$designCss ='{{module-class}} amp-carousel.testi3-slider .amp-carousel-button-prev{
|
38 |
+
border-radius: 100px;
|
39 |
+
}
|
40 |
+
{{module-class}} amp-carousel.testi3-slider .amp-carousel-button-next {
|
41 |
+
border-radius: 100px;
|
42 |
+
}
|
43 |
+
{{module-class}} .testi-mod-blk h4{
|
44 |
+
font-size: {{d3-txt-size}};
|
45 |
+
line-height: 1.2;
|
46 |
+
margin-top: 10px;
|
47 |
+
font-weight: 600;
|
48 |
+
color: {{d3-aut_color_picker}};
|
49 |
+
}
|
50 |
+
|
51 |
+
';
|
52 |
+
}
|
53 |
$css = '
|
54 |
{{if_condition_testimonial_layout_type==1}}
|
55 |
.testimonial-mod{margin:{{margin_css}};padding:{{padding_css}};}
|
56 |
+
{{module-class}} .ln-fx{
|
57 |
+
width:100%;
|
58 |
+
display: flex;
|
59 |
+
flex-wrap: wrap;
|
60 |
+
}
|
61 |
+
{{module-class}} .testi-mod{
|
62 |
+
margin: 0 3% 2% 0px;
|
63 |
+
position: relative;
|
64 |
+
color: #26292c;
|
65 |
+
flex:1 0 30%;
|
66 |
+
}
|
67 |
+
{{module-class}} .testi-cont{
|
68 |
+
width: 100%;
|
69 |
+
padding: 8% 7% 6% 8%;
|
70 |
+
font-size: {{tst-size}};
|
71 |
+
background: #f4f4f4;
|
72 |
+
position: relative;
|
73 |
+
color:{{tst_color}};
|
74 |
+
box-sizing: border-box;
|
75 |
+
}
|
76 |
{{module-class}} .testi-cont p{margin-bottom:5px;}
|
77 |
.testi-cont:after{content:"";width: 0;height: 0;border-style: solid; border-width: 20px 20px 0 20px;border-color: #f4f4f4 transparent transparent transparent;bottom:-20px;position:absolute;}
|
78 |
+
.testi-mod:nth-child(3n+3){margin-right:0;}
|
79 |
.auth-info{width:100%;display:inline-block;margin-top: 35px;margin-left:15px;}
|
80 |
.auth-img{float:left;margin-right:15px;}
|
81 |
.auth-img amp-img{border-radius:50%;width:50px;height:50px;}
|
83 |
.auth-cntn h5{font-size: {{txt-size}};color: {{aut_color_picker}};font-weight:500;}
|
84 |
.auth-cntn span{font-size: {{dsg-size}};color: {{dsg_color}};font-weight:normal;}
|
85 |
@media(max-width:768px){
|
86 |
+
{{module-class}} .testi-mod{flex:1 0 100%;margin-right:0;}
|
87 |
+
|
88 |
}
|
89 |
{{ifend_condition_testimonial_layout_type_1}}
|
90 |
+
|
91 |
+
{{if_condition_testimonial_layout_type==3}}
|
92 |
+
|
93 |
+
'.$designCss .'
|
94 |
+
{{module-class}} amp-carousel .testi-mod-3{
|
95 |
+
width: 650px;
|
96 |
+
height: auto;
|
97 |
+
margin: 0 auto;
|
98 |
+
display: flex;
|
99 |
+
align-items: center;
|
100 |
+
flex-direction: column;
|
101 |
+
justify-content: center;
|
102 |
+
background:{{d3-tst_bg_color}};
|
103 |
+
padding:60px 6% 40px 6%;
|
104 |
+
border-radius: 10px;
|
105 |
+
box-shadow: 0 10px 16px 0 rgba(8, 8, 8, 0.14), 0 1px 9px 0 rgba(0,0,0,0.10);
|
106 |
+
}
|
107 |
+
{{module-class}} .testi-mod-3 amp-img{
|
108 |
+
max-width: 80px;
|
109 |
+
max-height: 80px;
|
110 |
+
min-height: 80px;
|
111 |
+
border-radius: 100px;
|
112 |
+
margin:0 auto;
|
113 |
+
}
|
114 |
+
{{module-class}} .testi-mod-blk blockquote {
|
115 |
+
border:none;
|
116 |
+
quotes: " " "\201D" "" "";
|
117 |
+
margin: 0px 0px 30px 0px;
|
118 |
+
}
|
119 |
+
{{module-class}} .testi-mod-blk blockquote.blqut div p{
|
120 |
+
font-size: {{d3-tst-size}};
|
121 |
+
line-height:1.4;
|
122 |
+
padding:0px;
|
123 |
+
font-weight:normal;
|
124 |
+
}
|
125 |
+
{{module-class}} .testi-mod-blk blockquote.blqut div{
|
126 |
+
padding: 50px 0px 0px 0px;
|
127 |
+
font-weight: 400;
|
128 |
+
color: {{d3-tst_color}};
|
129 |
+
font-family: sans-serif;
|
130 |
+
}
|
131 |
+
{{module-class}} .testi-mod-blk blockquote.blqut div:before {
|
132 |
+
content: open-quote;
|
133 |
+
width:auto;
|
134 |
+
border:none;
|
135 |
+
}
|
136 |
+
{{module-class}} .testi-mod-blk blockquote.blqut div p:before {
|
137 |
+
display:none;
|
138 |
+
}
|
139 |
+
{{module-class}} .testi-mod-blk blockquote.blqut div:after {
|
140 |
+
content: close-quote;
|
141 |
+
font-weight: bold;
|
142 |
+
font-size:80px;
|
143 |
+
color:{{d3-bquote_color}};
|
144 |
+
font-family:Georgia, "Times New Roman", Times, serif;
|
145 |
+
position: absolute;
|
146 |
+
top: 10px;
|
147 |
+
line-height: 0;
|
148 |
+
left: 0;
|
149 |
+
right: 0;
|
150 |
+
margin: 0 auto;
|
151 |
+
}
|
152 |
+
{{module-class}} .testi-mod-blk{
|
153 |
+
text-align:center;
|
154 |
+
position:relative;
|
155 |
+
}
|
156 |
+
|
157 |
+
{{module-class}} .testi-mod-blk span{
|
158 |
+
font-size: {{d3-dsg-size}};
|
159 |
+
color: {{d3-dsg_color}};
|
160 |
+
display: inherit;
|
161 |
+
}
|
162 |
+
{{module-class}} amp-carousel{
|
163 |
+
min-height:600px;
|
164 |
+
}
|
165 |
+
{{module-class}} amp-carousel.testi3-slider .amp-carousel-button-prev, {{module-class}} amp-carousel.testi3-slider .amp-carousel-button-next{
|
166 |
+
border-radius: 100px;
|
167 |
+
}
|
168 |
+
|
169 |
+
|
170 |
+
@media(max-width:991px){
|
171 |
+
|
172 |
+
{{module-class}} amp-carousel.testi3-slider .amp-carousel-button-prev{
|
173 |
+
left: 30px;
|
174 |
+
}
|
175 |
+
{{module-class}} amp-carousel.testi3-slider .amp-carousel-button-next {
|
176 |
+
right: 30px;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
@media(max-width:768px){
|
181 |
+
{{module-class}} .testi-mod-blk blockquote p:after{
|
182 |
+
top:20px;
|
183 |
+
}
|
184 |
+
{{module-class}} amp-carousel{
|
185 |
+
min-height:450px;
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
@media(max-width:650px){
|
190 |
+
{{module-class}} amp-carousel .testi-mod-3{
|
191 |
+
width:100%;
|
192 |
+
padding:40px 30px 20px 30px;
|
193 |
+
}
|
194 |
+
{{module-class}} .testi-mod-blk blockquote.blqut div {
|
195 |
+
font-size: 18px;
|
196 |
+
}
|
197 |
+
{{module-class}} amp-carousel.testi3-slider .amp-carousel-button-prev{
|
198 |
+
left: 10px;
|
199 |
+
}
|
200 |
+
{{module-class}} amp-carousel.testi3-slider .amp-carousel-button-next {
|
201 |
+
right: 10px;
|
202 |
+
}
|
203 |
+
{{module-class}} amp-carousel .testi-mod-3{
|
204 |
+
box-shadow: none;
|
205 |
+
}
|
206 |
+
{{module-class}} .testi-mod-blk blockquote.blqut div p{
|
207 |
+
font-size: 20px;
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
{{ifend_condition_testimonial_layout_type_3}}
|
212 |
+
|
213 |
';
|
214 |
global $redux_builder_amp;
|
215 |
if(ampforwp_get_setting('amp-rtl-select-option')){
|
246 |
'label'=>'',
|
247 |
'demo_image'=> AMPFORWP_PLUGIN_DIR_URI.'/images/testmon-1.png'
|
248 |
),
|
249 |
+
array(
|
250 |
+
'value'=>'3',
|
251 |
+
'label'=>'',
|
252 |
+
'demo_image'=> AMPFORWP_PLUGIN_DIR_URI.'/images/testmon-3.png'
|
253 |
+
),
|
254 |
|
255 |
),
|
256 |
'content_type'=>'html',
|
262 |
'tab' =>'design',
|
263 |
'default' =>'13px',
|
264 |
'content_type'=>'css',
|
265 |
+
'required_type'=>'or',
|
266 |
+
'required' => array('testimonial_layout_type'=> array(1,2))
|
267 |
),
|
268 |
array(
|
269 |
'type' =>'color-picker',
|
272 |
'tab' =>'design',
|
273 |
'default' =>'#333',
|
274 |
'content_type'=>'css',
|
275 |
+
'required_type'=>'or',
|
276 |
+
'required' => array('testimonial_layout_type'=> array(1,2))
|
277 |
|
278 |
),
|
279 |
array(
|
283 |
'tab' =>'design',
|
284 |
'default' =>'13px',
|
285 |
'content_type'=>'css',
|
286 |
+
'required_type'=>'or',
|
287 |
+
'required' => array('testimonial_layout_type'=> array(1,2))
|
288 |
|
289 |
),
|
290 |
array(
|
294 |
'tab' =>'design',
|
295 |
'default' =>'#333',
|
296 |
'content_type'=>'css',
|
297 |
+
'required_type'=>'or',
|
298 |
+
'required' => array('testimonial_layout_type'=> array(1,2))
|
299 |
|
300 |
),
|
301 |
array(
|
305 |
'tab' =>'design',
|
306 |
'default' =>'18px',
|
307 |
'content_type'=>'css',
|
308 |
+
'required_type'=>'or',
|
309 |
+
'required' => array('testimonial_layout_type'=> array(1,2))
|
310 |
|
311 |
),
|
312 |
array(
|
316 |
'tab' =>'design',
|
317 |
'default' =>'#333',
|
318 |
'content_type'=>'css',
|
319 |
+
'required_type'=>'or',
|
320 |
+
'required' => array('testimonial_layout_type'=> array(1,2))
|
321 |
+
|
322 |
+
),
|
323 |
+
// Design 3 Fields
|
324 |
+
array(
|
325 |
+
'type' =>'color-picker',
|
326 |
+
'name' =>"d3-tst_bg_color",
|
327 |
+
'label' =>'Testimonial Background Color',
|
328 |
+
'tab' =>'design',
|
329 |
+
'default' =>'#ECF3FE',
|
330 |
+
'content_type'=>'css',
|
331 |
+
'required_type'=>'or',
|
332 |
+
'required' => array('testimonial_layout_type'=> array(3))
|
333 |
+
|
334 |
+
),
|
335 |
+
array(
|
336 |
+
'type' =>'text',
|
337 |
+
'name' =>"d3-tst-size",
|
338 |
+
'label' =>'Testimonial Font Size',
|
339 |
+
'tab' =>'design',
|
340 |
+
'default' =>'25px',
|
341 |
+
'content_type'=>'css',
|
342 |
+
'required_type'=>'or',
|
343 |
+
'required' => array('testimonial_layout_type'=> array(3))
|
344 |
+
|
345 |
+
),
|
346 |
+
array(
|
347 |
+
'type' =>'color-picker',
|
348 |
+
'name' =>"d3-tst_color",
|
349 |
+
'label' =>'Testimonial Text Color',
|
350 |
+
'tab' =>'design',
|
351 |
+
'default' =>'#888',
|
352 |
+
'content_type'=>'css',
|
353 |
+
'required_type'=>'or',
|
354 |
+
'required' => array('testimonial_layout_type'=> array(3))
|
355 |
+
|
356 |
+
),
|
357 |
+
array(
|
358 |
+
'type' =>'text',
|
359 |
+
'name' =>"d3-txt-size",
|
360 |
+
'label' =>'Author Font Size',
|
361 |
+
'tab' =>'design',
|
362 |
+
'default' =>'13px',
|
363 |
+
'content_type'=>'css',
|
364 |
+
'required_type'=>'or',
|
365 |
+
'required' => array('testimonial_layout_type'=> array(3))
|
366 |
+
),
|
367 |
+
array(
|
368 |
+
'type' =>'color-picker',
|
369 |
+
'name' =>"d3-aut_color_picker",
|
370 |
+
'label' =>'Author Text Color',
|
371 |
+
'tab' =>'design',
|
372 |
+
'default' =>'#777',
|
373 |
+
'content_type'=>'css',
|
374 |
+
'required_type'=>'or',
|
375 |
+
'required' => array('testimonial_layout_type'=> array(3))
|
376 |
+
|
377 |
+
),
|
378 |
+
array(
|
379 |
+
'type' =>'text',
|
380 |
+
'name' =>"d3-dsg-size",
|
381 |
+
'label' =>'Designation Font Size',
|
382 |
+
'tab' =>'design',
|
383 |
+
'default' =>'10px',
|
384 |
+
'content_type'=>'css',
|
385 |
+
'required_type'=>'or',
|
386 |
+
'required' => array('testimonial_layout_type'=> array(3))
|
387 |
|
388 |
),
|
389 |
+
array(
|
390 |
+
'type' =>'color-picker',
|
391 |
+
'name' =>"d3-dsg_color",
|
392 |
+
'label' =>'Designation Text Color',
|
393 |
+
'tab' =>'design',
|
394 |
+
'default' =>'#333',
|
395 |
+
'content_type'=>'css',
|
396 |
+
'required_type'=>'or',
|
397 |
+
'required' => array('testimonial_layout_type'=> array(3))
|
398 |
+
),
|
399 |
+
array(
|
400 |
+
'type' =>'color-picker',
|
401 |
+
'name' =>"d3-bquote_color",
|
402 |
+
'label' =>'Blockquote Icon Color',
|
403 |
+
'tab' =>'design',
|
404 |
+
'default' =>'#9FBEFA',
|
405 |
+
'required_type'=>'or',
|
406 |
+
'content_type'=>'css',
|
407 |
+
'required' => array('testimonial_layout_type'=> array(3))
|
408 |
+
),
|
409 |
+
|
410 |
+
//Common Fields for all Designs
|
411 |
array(
|
412 |
'type' =>'text',
|
413 |
'name' =>"id",
|
495 |
|
496 |
|
497 |
),
|
498 |
+
'front_template'=>array(
|
499 |
+
"design_1" => '
|
500 |
+
<div class="testi-mod">
|
501 |
+
<div class="testi-cont">
|
502 |
+
{{content}}
|
503 |
+
</div>
|
504 |
+
<div class="auth-info">
|
505 |
+
<div class="auth-img">
|
506 |
+
{{if_img_upload}}<amp-img src="{{img_upload}}" width="{{image_width}}" height="{{image_height}}" layout="responsive" alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
|
507 |
+
</div>
|
508 |
+
<div class="auth-cntn">
|
509 |
+
<h5>{{content_title}}</h5>
|
510 |
+
<span>{{auth_desig}}</span>
|
511 |
+
</div>
|
512 |
+
</div>
|
513 |
+
</div>',
|
514 |
+
|
515 |
+
"design_3" => '
|
516 |
+
<div class="testi-mod-3">
|
517 |
+
<div class="testi-mod-blk">
|
518 |
+
<blockquote class="blqut">
|
519 |
+
<div class="testi3-cntn">{{content}}</div>
|
520 |
+
</blockquote>
|
521 |
+
{{if_img_upload}}<amp-img src="{{img_upload}}" width="{{image_width}}" height="{{image_height}}" layout="responsive" alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
|
522 |
+
<h4>{{content_title}}</h4>
|
523 |
+
<span>{{auth_desig}}</span>
|
524 |
+
</div>
|
525 |
+
</div>'
|
526 |
+
),
|
527 |
),
|
528 |
);
|
529 |
|
@@ -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.3
|
7 |
-
Stable tag: 0.9.98.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -30,9 +30,9 @@ Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkalu
|
|
30 |
* NEW - Gutenberg Support
|
31 |
* NEW - Divi and Elementor Support [More Info](https://ampforwp.com/amp-pagebuilder-compatibility/)
|
32 |
* NEW - Improved CSS Optimization (Tree Shaking)
|
|
|
33 |
* NEW - Addthis Sharing Support
|
34 |
-
* NEW - AMP
|
35 |
-
* NEW - Revolution Slider plugin Support
|
36 |
* NEW - Photo Gallery by 10Web Support
|
37 |
* NEW - MEWE social network Support
|
38 |
* NEW - GDPR Compliance
|
@@ -191,6 +191,25 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
191 |
|
192 |
== Changelog ==
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
= 0.9.98.20 (27th November 2019) =
|
195 |
* Fixed: Menu closer icon is getting overlapped by the header part of firefox web browser #3744
|
196 |
* Fixed: Instagram TV videos are not rendering into AMP #3812
|
@@ -228,18 +247,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
|
|
228 |
* Fixed: general fixes and improvements part 2 #3621
|
229 |
* Fixed: Warning: strpos(): Empty needle in /home/statecer/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5788 #3870
|
230 |
|
231 |
-
= 0.9.98.18 (21th November 2019) =
|
232 |
-
* Improvement: Show the number of shares with Sassy Social Share #3588
|
233 |
-
* Fixed: Need to improvment in table code #3664
|
234 |
-
* Fixed: Change internal links to AMP is not working when custom permalink having the extenison.html #3811
|
235 |
-
* Fixed: Width of the recent posts and related posts thumbnail image should be same #3639
|
236 |
-
* Fixed: Page should be full width if the page builder is used #3756
|
237 |
-
* Fixed: Remove broken link on source code like "<link rel="dns-prefetch" href="https://cdn.ampproject.org">." #3697
|
238 |
-
* Fixed: leave a comment added when making pages with pagebuilder #3755
|
239 |
-
* Fixed: Need to adding gaping for col 2 in AMP Pagebuilder #3796
|
240 |
-
* Fixed: CSS issue. #3785
|
241 |
-
* Fixed: Facebook comment is not changing language when we select another language #3710
|
242 |
-
* Fixed: Verify button of Google Font API key is not working after update #3858
|
243 |
-
* Fixed: Cache is not clearing after clicking clear cache button #3863
|
244 |
-
|
245 |
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.3
|
7 |
+
Stable tag: 0.9.98.21
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
30 |
* NEW - Gutenberg Support
|
31 |
* NEW - Divi and Elementor Support [More Info](https://ampforwp.com/amp-pagebuilder-compatibility/)
|
32 |
* NEW - Improved CSS Optimization (Tree Shaking)
|
33 |
+
* NEW - Google Fonts Support For All Designs
|
34 |
* NEW - Addthis Sharing Support
|
35 |
+
* NEW - AMP Infinite Scroll Support
|
|
|
36 |
* NEW - Photo Gallery by 10Web Support
|
37 |
* NEW - MEWE social network Support
|
38 |
* NEW - GDPR Compliance
|
191 |
|
192 |
== Changelog ==
|
193 |
|
194 |
+
= 0.9.98.21 (3th December 2019) =
|
195 |
+
* Improvement: Fonts support in all three designs one, two and three along with the swift Theme #1914
|
196 |
+
* Improvement: Need to create Testimonial slider in AMP Page Builder #2960
|
197 |
+
* Improvement: Need to create an optional option for the side menu when people click on the text the links should be dropped. links sub links #3428
|
198 |
+
* Improvement: Need to make compatibility with this plugin Stop Generating Image Sizes #3851
|
199 |
+
* Improvement: Improve Matemo analytics integration #3757
|
200 |
+
* Fixed: Breadcrumb breaks when '/' is present in category name #3769
|
201 |
+
* Fixed: Back to top button CSS loading twice in Design 1,2,3. #3835
|
202 |
+
* Fixed: Removing trbidi attribute #3687
|
203 |
+
* Fixed: Upgrade to AdsforWP button not working properly. #3681
|
204 |
+
* Fixed: Tooltip alignment is missing in Advertisement #3625
|
205 |
+
* Fixed: Media queries are removing automatically in media queries merging process #3797
|
206 |
+
* Fixed: Excerpt on homepage is not working properly. #3866
|
207 |
+
* Fixed: Author links are redirecting to AMP even when the Archives is turned off. #3875
|
208 |
+
* Fixed: Issue related to image height and width #3857
|
209 |
+
* Fixed: Gutenberg Gallery Images are not displayed correctly when any option is selected in WordPress Content Gallery. #3868
|
210 |
+
* Fixed: Google Tag manager not firing properly #3826
|
211 |
+
* Fixed: After Update AMP option panel design is changing #3877
|
212 |
+
|
213 |
= 0.9.98.20 (27th November 2019) =
|
214 |
* Fixed: Menu closer icon is getting overlapped by the header part of firefox web browser #3744
|
215 |
* Fixed: Instagram TV videos are not rendering into AMP #3812
|
247 |
* Fixed: general fixes and improvements part 2 #3621
|
248 |
* Fixed: Warning: strpos(): Empty needle in /home/statecer/public_html/wp-content/plugins/accelerated-mobile-pages/templates/features.php on line 5788 #3870
|
249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
|
@@ -124,7 +124,12 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
124 |
$get_cat_parents = rtrim(get_category_parents($primary_cateogory, false, '/'),'/');
|
125 |
}
|
126 |
}
|
127 |
-
$
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
// Loop through parent categories and store in variable $cat_display
|
130 |
$cat_display = '';
|
124 |
$get_cat_parents = rtrim(get_category_parents($primary_cateogory, false, '/'),'/');
|
125 |
}
|
126 |
}
|
127 |
+
if (strpos($get_cat_parents, '/') !== false) {
|
128 |
+
$cat_parents = explode(',',$get_cat_parents);
|
129 |
+
}else{
|
130 |
+
// Get parent any categories and create array
|
131 |
+
$cat_parents = explode('/',$get_cat_parents);
|
132 |
+
}
|
133 |
|
134 |
// Loop through parent categories and store in variable $cat_display
|
135 |
$cat_display = '';
|
@@ -67,7 +67,7 @@ if(empty($cross_btn_hvr_clr)){
|
|
67 |
} ?>
|
68 |
#statcounter{width: 1px;height:1px;}
|
69 |
.amp-wp-article amp-addthis{bottom: -38px;margin-left: 6px;}
|
70 |
-
<?php if
|
71 |
@font-face {
|
72 |
font-family: 'Merriweather';
|
73 |
font-display: swap;
|
@@ -96,7 +96,7 @@ if(empty($cross_btn_hvr_clr)){
|
|
96 |
font-weight: 700;
|
97 |
src: local('Merriweather Bold Italic'), local('Merriweather-BoldItalic'), url('<?php echo esc_url(plugin_dir_url(__FILE__)) ?>fonts/Merriweather-BoldItalic.ttf');
|
98 |
}
|
99 |
-
<?php
|
100 |
.clearfix, .cb{clear:both}
|
101 |
.alignright{ float: right; }
|
102 |
.alignleft{ float: left; }
|
@@ -110,14 +110,40 @@ amp-wistia-player {margin:5px 0px;}
|
|
110 |
.amp-wp-content,.amp-wp-title-bar div {<?php if ( $content_max_width > 0 ) : ?> margin: 0 auto;max-width: <?php echo esc_attr(sprintf( '%dpx', $content_max_width )); ?>; <?php endif; if((is_singular() || ampforwp_is_front_page()) && checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){?>
|
111 |
max-width:100%;
|
112 |
<?php } ?> }
|
113 |
-
html{background: <?php echo sanitize_hex_color( $header_background_color ); ?>;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
ol, ul {list-style-position: inside;}
|
115 |
p,ol,ul,figure {margin: 0 0 1em;padding: 0;} a,a:visited {color:<?php echo ampforwp_sanitize_color($redux_builder_amp['amp-opt-color-rgba-link-design1']['color']); ?>;}a:hover,a:active,a:focus {color: <?php echo sanitize_hex_color( $text_color ); ?>;} .wp-caption amp-img{max-width: 100%}
|
116 |
blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background: rgba(127,127,127,.125);border-left: 2px solid <?php echo sanitize_hex_color( $link_color ); ?>;margin: 8px 0 24px 0;padding: 16px;} blockquote p:last-child {margin-bottom: 0;}
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
.amp-wp-header {background-color: <?php echo ampforwp_sanitize_color( $header_bg_clr ); ?>;}
|
119 |
.amp-wp-header .ampforwp-logo-area {color: <?php echo sanitize_hex_color( $header_color ); ?>;font-size: 1em;font-weight: 400;margin: 0 auto;max-width: calc(840px - 32px);padding: .875em 16px;position: relative;} .amp-wp-header .amp-wp-site-icon {background-color: <?php echo sanitize_hex_color( $header_color ); ?>;border: 1px solid <?php echo sanitize_hex_color( $header_color ); ?>;border-radius: 50%;position: absolute;right: 18px;top: 10px;}
|
120 |
-
|
121 |
<?php if( !ampforwp_woocommerce_conditional_check() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
|
122 |
.amp-wp-article {color: <?php echo sanitize_hex_color( $text_color ); ?>;font-weight: 400;margin: 1.5em auto;max-width: 840px;overflow-wrap: break-word;word-wrap: break-word;} .amp-wp-article-header {align-items: center;align-content: stretch;display: flex;flex-wrap: wrap;justify-content: space-between;margin: 1.5em 16px 1.5em;}
|
123 |
.amp-wp-title {color: <?php echo sanitize_hex_color( $text_color ); ?>;display: block;flex: 1 0 100%;font-weight: 900;font-size:1.5em;margin: 0;width: 100%;}.amp-wp-meta {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;display: inline-block;flex: 2 1 50%;font-size: .875em;line-height: 1.7em;margin: 0;padding: 0;}.ampforwp-meta-info{margin-top: 0px;}.amp-wp-article-header .amp-wp-meta:last-of-type {text-align: right;float:right;display:initial}.amp-wp-article-header .amp-wp-meta:first-of-type {text-align: left;}.amp-wp-byline amp-img,.amp-wp-byline .amp-wp-author {display: inline-block;vertical-align: middle;}.amp-wp-byline amp-img {border: 1px solid <?php echo sanitize_hex_color( $link_color ); ?>;border-radius: 50%;position: relative;margin-right: 6px;}.amp-wp-posted-on {text-align: right;}.hide-meta-info{ display: none; }
|
@@ -140,7 +166,8 @@ blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background:
|
|
140 |
|
141 |
<?php if( !ampforwp_woocommerce_conditional_check() ) { ?>
|
142 |
.amp-wp-home .amp-wp-meta{margin:5px 0}
|
143 |
-
.amp-wp-home .amp-wp-content p{display:inline-block;width:100%}.ampforwp-custom-index .amp-wp-title a {text-decoration: none;color: <?php echo sanitize_hex_color( $text_color ); ?>;}
|
|
|
144 |
<?php if(!checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){ ?>
|
145 |
#pagination .next,#pagination .prev{display:inline-block}.ampforwp-custom-index .amp-wp-content{margin-bottom:30px}.pagination-holder{margin:1.5em 16px}#pagination .next{float:right}.amp-wp-home .amp-wp-content p{display:inline}.home-post-image{float:right;margin:0 0 10px 20px}.amp-wp-article-content amp-img{max-width:100%}.amp-wp-meta.amp-wp-tax-category,.amp-wp-meta.amp-wp-tax-tag{margin:0}.amp-wp-meta.amp-wp-tax-tag{display:initial}
|
146 |
<?php } // AMP Woocommerce CSS Ends ?>
|
@@ -197,10 +224,9 @@ amp-social-share[type="facebookmessenger"] {
|
|
197 |
<?php } ?>
|
198 |
<?php if( !ampforwp_woocommerce_conditional_check() ) { ?>
|
199 |
.comment-button-wrapper a{border-style:solid;border-color:#c2c2c2;border-width:1px 1px 2px;border-radius:4px;background-color:transparent;color:#0a89c0;cursor:pointer;display:block;font-size:14px;font-weight:600;text-align:center;line-height:18px;margin:0 auto;max-width:200px;padding:11px 16px;text-decoration:none;width:50%;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.close-nav,.comments_list div,.related_posts ol li,.toggle-navigation ul,.toggle-navigationv2 ul li a{display:inline-block}main .amp-wp-content.comments_list{background:0 0;box-shadow:none;max-width:1030px}.comments_list h3{font-size:14px;font-weight:700;letter-spacing:.4px;margin:25px 0 10px;color:#333}.comments_list{margin:2.5em 16px}.comments_list ul{margin:0;padding:0}.comments_list ul.children{padding-bottom:10px;margin-left:4%;width:96%}
|
200 |
-
|
201 |
-
|
202 |
.comments_list ul li p{margin:0;font-size:14px;clear:both;padding-top:5px; word-break:break-word;}
|
203 |
-
.comments_list ul li{font-
|
|
|
204 |
<?php } // AMP Woocommerce CSS Ends ?>
|
205 |
|
206 |
/** Menu CSS **/
|
@@ -239,7 +265,7 @@ left:191px;
|
|
239 |
.ampforwp_single_excerpt { margin-bottom:15px; }
|
240 |
.ampforwp-ad-above-related-post{padding-top:15px;}
|
241 |
.single-post .amp_author_area amp-img{ margin: 0; float: left; margin-right: 12px; border-radius: 60px; }
|
242 |
-
.single-post .amp_author_area .amp_author_area_wrapper{ display: inline-block; width: 100%; line-height: 1.4; margin-top: 22px; font-size: 13px; color:#333;
|
243 |
figure.aligncenter amp-img {
|
244 |
margin: 0 auto;
|
245 |
}
|
@@ -315,7 +341,7 @@ a.btt:hover {
|
|
315 |
amp-lightbox{ background: rgba(0, 0, 0,0.85); }
|
316 |
<?php if( !ampforwp_woocommerce_conditional_check() ) { ?>
|
317 |
<?php if( true == ampforwp_get_setting('ampforwp-single-select-type-of-related') && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ){ ?>
|
318 |
-
.related_posts span{display: block;}.related_posts ol{list-style-type:none;margin:0;padding:0}.related_posts ol li{width:100%;margin-bottom:12px;padding:0}.related_posts .related_link a{color:#000;font-size:18px}.related_posts ol li amp-img{width:100px;float:left;margin-right:15px}.related_posts ol li p{font-size:
|
319 |
.related_posts ol li{display:inline-block}
|
320 |
<?php } ?>
|
321 |
<?php if( is_singular() || is_home() && true == ampforwp_get_setting('amp-frontpage-select-option') && ampforwp_get_blog_details() == false && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
|
@@ -324,7 +350,7 @@ table { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap
|
|
324 |
table a:link { font-weight: bold; text-decoration: none; }
|
325 |
table a:visited { color: #999999; font-weight: bold; text-decoration: none; }
|
326 |
table a:active, table a:hover { color: #bd5a35; text-decoration: underline; }
|
327 |
-
table {
|
328 |
table th { padding: 21px 25px 22px 25px; border-top: 1px solid #fafafa; border-bottom: 1px solid #e0e0e0; background: #ededed; background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb)); background: -moz-linear-gradient(top, #ededed, #ebebeb); }
|
329 |
table th:first-child { text-align: left; padding-left: 20px; }
|
330 |
table tr:first-child th:first-child { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
@@ -529,34 +555,6 @@ if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampfor
|
|
529 |
.w-bl{flex:1 0 100%;}
|
530 |
<?php endif; ?>
|
531 |
}
|
532 |
-
<?php // Back to Top CSS //
|
533 |
-
if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
|
534 |
-
.btt{
|
535 |
-
position: fixed;
|
536 |
-
<?php if( (is_single() && true == ampforwp_get_setting('enable-single-social-icons') ) || (is_page() && true == ampforwp_get_setting('ampforwp-page-sticky-social') ) ){ ?>
|
537 |
-
bottom: 55px;
|
538 |
-
<?php } else { ?>
|
539 |
-
bottom: 20px;
|
540 |
-
<?php } ?>
|
541 |
-
right: 20px;
|
542 |
-
background: rgba(71, 71, 71, 0.5);
|
543 |
-
color: #fff;
|
544 |
-
border-radius: 100%;
|
545 |
-
width: 50px;
|
546 |
-
height: 50px;
|
547 |
-
}
|
548 |
-
.btt:hover{color:#fff;background:#474747;}
|
549 |
-
.btt:before{
|
550 |
-
content: '\25be';
|
551 |
-
display: block;
|
552 |
-
font-size: 35px;
|
553 |
-
font-weight: 600;
|
554 |
-
color:#fff;
|
555 |
-
transform: rotate(180deg);
|
556 |
-
text-align: center;
|
557 |
-
line-height: 1.5;
|
558 |
-
}
|
559 |
-
<?php } ?>
|
560 |
<?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
|
561 |
html {
|
562 |
scroll-behavior: smooth;
|
@@ -700,4 +698,13 @@ amp-facebook-like{
|
|
700 |
font-size: 13px;
|
701 |
color:#999;
|
702 |
}
|
703 |
-
<?php }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
} ?>
|
68 |
#statcounter{width: 1px;height:1px;}
|
69 |
.amp-wp-article amp-addthis{bottom: -38px;margin-left: 6px;}
|
70 |
+
<?php if(1==ampforwp_get_setting('ampforwp-google-font-switch') && ( ampforwp_get_setting('amp_font_selector') == 1 || empty(ampforwp_get_setting('amp_font_selector') ) ) ) {?>
|
71 |
@font-face {
|
72 |
font-family: 'Merriweather';
|
73 |
font-display: swap;
|
96 |
font-weight: 700;
|
97 |
src: local('Merriweather Bold Italic'), local('Merriweather-BoldItalic'), url('<?php echo esc_url(plugin_dir_url(__FILE__)) ?>fonts/Merriweather-BoldItalic.ttf');
|
98 |
}
|
99 |
+
<?php } // fonts condition ends here ?>
|
100 |
.clearfix, .cb{clear:both}
|
101 |
.alignright{ float: right; }
|
102 |
.alignleft{ float: left; }
|
110 |
.amp-wp-content,.amp-wp-title-bar div {<?php if ( $content_max_width > 0 ) : ?> margin: 0 auto;max-width: <?php echo esc_attr(sprintf( '%dpx', $content_max_width )); ?>; <?php endif; if((is_singular() || ampforwp_is_front_page()) && checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){?>
|
111 |
max-width:100%;
|
112 |
<?php } ?> }
|
113 |
+
html{background: <?php echo sanitize_hex_color( $header_background_color ); ?>;}
|
114 |
+
body, .comments_list ul li{
|
115 |
+
background: <?php echo sanitize_hex_color( $theme_color ); ?>;
|
116 |
+
color: <?php echo sanitize_hex_color( $text_color ); ?>;
|
117 |
+
font-weight: 300;
|
118 |
+
line-height: 1.75em;
|
119 |
+
<?php $fontFamily = "font-family: 'Arial', 'Helvetica', 'sans-serif'"; ?>
|
120 |
+
<?php if( 1 == ampforwp_get_setting('ampforwp-google-font-switch') ) {
|
121 |
+
$fontFamily = "font-family: 'Merriweather', 'Times New Roman', 'Times, Serif';";
|
122 |
+
if(ampforwp_get_setting('amp_font_selector') != 1 && !empty(ampforwp_get_setting('amp_font_selector') )){
|
123 |
+
$fontFamily = "font-family: '".ampforwp_get_setting('amp_font_selector')."';";
|
124 |
+
}
|
125 |
+
}
|
126 |
+
echo sanitize_text_field($fontFamily); ?>
|
127 |
+
}
|
128 |
ol, ul {list-style-position: inside;}
|
129 |
p,ol,ul,figure {margin: 0 0 1em;padding: 0;} a,a:visited {color:<?php echo ampforwp_sanitize_color($redux_builder_amp['amp-opt-color-rgba-link-design1']['color']); ?>;}a:hover,a:active,a:focus {color: <?php echo sanitize_hex_color( $text_color ); ?>;} .wp-caption amp-img{max-width: 100%}
|
130 |
blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background: rgba(127,127,127,.125);border-left: 2px solid <?php echo sanitize_hex_color( $link_color ); ?>;margin: 8px 0 24px 0;padding: 16px;} blockquote p:last-child {margin-bottom: 0;}
|
131 |
+
|
132 |
+
<?php // secondary font family
|
133 |
+
$font_content = '';
|
134 |
+
$font_content = ampforwp_get_setting('amp_font_selector_content_single'); ?>
|
135 |
+
.amp-wp-meta,.amp-wp-header .ampforwp-logo-area,.amp-wp-title,.wp-caption-text,.amp-wp-tax-category,.amp-wp-tax-tag,.amp-wp-comments-link,.amp-wp-footer p,.back-to-top, .comment-button-wrapper a,.related_posts ol, .related_posts span, .single-post .amp_author_area .amp_author_area_wrapper{
|
136 |
+
<?php $fontFamily = "font-family: 'Segoe UI';";
|
137 |
+
if(1==ampforwp_get_setting('ampforwp-google-font-switch') && 1 == ampforwp_get_setting('content-font-family-enable')){
|
138 |
+
if(!empty($font_content) && $font_content != 1 ){
|
139 |
+
$fontFamily = "font-family: '".esc_attr($font_content)."';";
|
140 |
+
}
|
141 |
+
}
|
142 |
+
echo sanitize_text_field($fontFamily); // secondary font family ends here ?>
|
143 |
+
}
|
144 |
+
|
145 |
.amp-wp-header {background-color: <?php echo ampforwp_sanitize_color( $header_bg_clr ); ?>;}
|
146 |
.amp-wp-header .ampforwp-logo-area {color: <?php echo sanitize_hex_color( $header_color ); ?>;font-size: 1em;font-weight: 400;margin: 0 auto;max-width: calc(840px - 32px);padding: .875em 16px;position: relative;} .amp-wp-header .amp-wp-site-icon {background-color: <?php echo sanitize_hex_color( $header_color ); ?>;border: 1px solid <?php echo sanitize_hex_color( $header_color ); ?>;border-radius: 50%;position: absolute;right: 18px;top: 10px;}
|
|
|
147 |
<?php if( !ampforwp_woocommerce_conditional_check() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
|
148 |
.amp-wp-article {color: <?php echo sanitize_hex_color( $text_color ); ?>;font-weight: 400;margin: 1.5em auto;max-width: 840px;overflow-wrap: break-word;word-wrap: break-word;} .amp-wp-article-header {align-items: center;align-content: stretch;display: flex;flex-wrap: wrap;justify-content: space-between;margin: 1.5em 16px 1.5em;}
|
149 |
.amp-wp-title {color: <?php echo sanitize_hex_color( $text_color ); ?>;display: block;flex: 1 0 100%;font-weight: 900;font-size:1.5em;margin: 0;width: 100%;}.amp-wp-meta {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;display: inline-block;flex: 2 1 50%;font-size: .875em;line-height: 1.7em;margin: 0;padding: 0;}.ampforwp-meta-info{margin-top: 0px;}.amp-wp-article-header .amp-wp-meta:last-of-type {text-align: right;float:right;display:initial}.amp-wp-article-header .amp-wp-meta:first-of-type {text-align: left;}.amp-wp-byline amp-img,.amp-wp-byline .amp-wp-author {display: inline-block;vertical-align: middle;}.amp-wp-byline amp-img {border: 1px solid <?php echo sanitize_hex_color( $link_color ); ?>;border-radius: 50%;position: relative;margin-right: 6px;}.amp-wp-posted-on {text-align: right;}.hide-meta-info{ display: none; }
|
166 |
|
167 |
<?php if( !ampforwp_woocommerce_conditional_check() ) { ?>
|
168 |
.amp-wp-home .amp-wp-meta{margin:5px 0}
|
169 |
+
.amp-wp-home .amp-wp-content p{display:inline-block;width:100%}.ampforwp-custom-index .amp-wp-title a {text-decoration: none;color: <?php echo sanitize_hex_color( $text_color ); ?>;}
|
170 |
+
.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}
|
171 |
<?php if(!checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){ ?>
|
172 |
#pagination .next,#pagination .prev{display:inline-block}.ampforwp-custom-index .amp-wp-content{margin-bottom:30px}.pagination-holder{margin:1.5em 16px}#pagination .next{float:right}.amp-wp-home .amp-wp-content p{display:inline}.home-post-image{float:right;margin:0 0 10px 20px}.amp-wp-article-content amp-img{max-width:100%}.amp-wp-meta.amp-wp-tax-category,.amp-wp-meta.amp-wp-tax-tag{margin:0}.amp-wp-meta.amp-wp-tax-tag{display:initial}
|
173 |
<?php } // AMP Woocommerce CSS Ends ?>
|
224 |
<?php } ?>
|
225 |
<?php if( !ampforwp_woocommerce_conditional_check() ) { ?>
|
226 |
.comment-button-wrapper a{border-style:solid;border-color:#c2c2c2;border-width:1px 1px 2px;border-radius:4px;background-color:transparent;color:#0a89c0;cursor:pointer;display:block;font-size:14px;font-weight:600;text-align:center;line-height:18px;margin:0 auto;max-width:200px;padding:11px 16px;text-decoration:none;width:50%;-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.close-nav,.comments_list div,.related_posts ol li,.toggle-navigation ul,.toggle-navigationv2 ul li a{display:inline-block}main .amp-wp-content.comments_list{background:0 0;box-shadow:none;max-width:1030px}.comments_list h3{font-size:14px;font-weight:700;letter-spacing:.4px;margin:25px 0 10px;color:#333}.comments_list{margin:2.5em 16px}.comments_list ul{margin:0;padding:0}.comments_list ul.children{padding-bottom:10px;margin-left:4%;width:96%}
|
|
|
|
|
227 |
.comments_list ul li p{margin:0;font-size:14px;clear:both;padding-top:5px; word-break:break-word;}
|
228 |
+
.comments_list ul li{font-size:11px;list-style-type:none;margin-bottom:12px;background:#fefefe;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 2px 3px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 3px rgba(0,0,0,.05);box-shadow:0 2px 3px rgba(0,0,0,.05);padding:0;max-width:1000px;width:96%}.comments_list ul li .says{margin-right:4px}.comments_list li li,.comments_list li li li{margin:20px 20px 10px}.comments_list ul li .comment-body{padding:10px 0 15px}.comment-author{float:left}.single-post footer.comment-meta{padding-bottom:0; line-height: 1.9;}.comments_list li li{background:#f7f7f7;box-shadow:none;border:1px solid #eee} .page-numbers{ padding: 9px 10px; background: #fff; font-size: 14px; } .comment-author-img{float: left; margin-right: 5px; border-radius: 60px;} .comment-content amp-img{max-width: 300px;}
|
229 |
+
<?php } ?>
|
230 |
<?php } // AMP Woocommerce CSS Ends ?>
|
231 |
|
232 |
/** Menu CSS **/
|
265 |
.ampforwp_single_excerpt { margin-bottom:15px; }
|
266 |
.ampforwp-ad-above-related-post{padding-top:15px;}
|
267 |
.single-post .amp_author_area amp-img{ margin: 0; float: left; margin-right: 12px; border-radius: 60px; }
|
268 |
+
.single-post .amp_author_area .amp_author_area_wrapper{ display: inline-block; width: 100%; line-height: 1.4; margin-top: 22px; font-size: 13px; color:#333;}
|
269 |
figure.aligncenter amp-img {
|
270 |
margin: 0 auto;
|
271 |
}
|
341 |
amp-lightbox{ background: rgba(0, 0, 0,0.85); }
|
342 |
<?php if( !ampforwp_woocommerce_conditional_check() ) { ?>
|
343 |
<?php if( true == ampforwp_get_setting('ampforwp-single-select-type-of-related') && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ){ ?>
|
344 |
+
.related_posts span{display: block;}.related_posts ol{list-style-type:none;margin:0;padding:0}.related_posts ol li{width:100%;margin-bottom:12px;padding:0}.related_posts .related_link a{color:#000;font-size:18px}.related_posts ol li amp-img{width:100px;float:left;margin-right:15px}.related_posts ol li p{font-size:12px;color:#999;line-height:1.2;margin:7px 0 0}.no_related_thumbnail{padding:15px 18px} main .amp-wp-content.relatedpost{background:0 0;box-shadow:none;max-width:1030px}.relatedpost{margin:2em 16px}.related_posts span{font-size:14px;font-weight:700;letter-spacing:.4px;margin:25px 0 10px;color:#333;}
|
345 |
.related_posts ol li{display:inline-block}
|
346 |
<?php } ?>
|
347 |
<?php if( is_singular() || is_home() && true == ampforwp_get_setting('amp-frontpage-select-option') && ampforwp_get_blog_details() == false && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
|
350 |
table a:link { font-weight: bold; text-decoration: none; }
|
351 |
table a:visited { color: #999999; font-weight: bold; text-decoration: none; }
|
352 |
table a:active, table a:hover { color: #bd5a35; text-decoration: underline; }
|
353 |
+
table { color: #666; font-size: 12px; text-shadow: 1px 1px 0px #fff; background: #eee; margin: 0px; width: 95%; }
|
354 |
table th { padding: 21px 25px 22px 25px; border-top: 1px solid #fafafa; border-bottom: 1px solid #e0e0e0; background: #ededed; background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb)); background: -moz-linear-gradient(top, #ededed, #ebebeb); }
|
355 |
table th:first-child { text-align: left; padding-left: 20px; }
|
356 |
table tr:first-child th:first-child { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
555 |
.w-bl{flex:1 0 100%;}
|
556 |
<?php endif; ?>
|
557 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
<?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
|
559 |
html {
|
560 |
scroll-behavior: smooth;
|
698 |
font-size: 13px;
|
699 |
color:#999;
|
700 |
}
|
701 |
+
<?php } ?>
|
702 |
+
|
703 |
+
.link-menu .toggle {
|
704 |
+
width: 100%;
|
705 |
+
height: 100%;
|
706 |
+
position: absolute;
|
707 |
+
top: 0px;
|
708 |
+
right: 0;
|
709 |
+
cursor:pointer;
|
710 |
+
}
|
@@ -122,7 +122,12 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
122 |
$get_cat_parents = rtrim(get_category_parents($primary_cateogory, false, '/'),'/');
|
123 |
}
|
124 |
}
|
125 |
-
$
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
// Loop through parent categories and store in variable $cat_display
|
128 |
$cat_display = '';
|
122 |
$get_cat_parents = rtrim(get_category_parents($primary_cateogory, false, '/'),'/');
|
123 |
}
|
124 |
}
|
125 |
+
if (strpos($get_cat_parents, '/') !== false) {
|
126 |
+
$cat_parents = explode(',',$get_cat_parents);
|
127 |
+
}else{
|
128 |
+
// Get parent any categories and create array
|
129 |
+
$cat_parents = explode('/',$get_cat_parents);
|
130 |
+
}
|
131 |
|
132 |
// Loop through parent categories and store in variable $cat_display
|
133 |
$cat_display = '';
|
@@ -76,7 +76,31 @@ if(empty($cross_btn_hvr_clr)){
|
|
76 |
|
77 |
?>
|
78 |
/* Global Styling */
|
79 |
-
body{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
a { color: #312C7E; text-decoration: none }
|
81 |
.clearfix, .cb { clear: both }
|
82 |
amp-iframe{ max-width: 100%; margin-bottom : 20px; }
|
@@ -91,6 +115,7 @@ ol, ul {list-style-position: inside;}
|
|
91 |
.hide{display:none}
|
92 |
/* Template Styles */
|
93 |
.amp-wp-content, .amp-wp-title-bar div {
|
|
|
94 |
<?php if ( $content_max_width > 0 ) : ?>
|
95 |
max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>;
|
96 |
margin: 0 auto;
|
@@ -342,7 +367,7 @@ main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bot
|
|
342 |
.single-post .ampforwp-social-icons.ampforwp-social-icons-wrapper{ margin: 0.9em auto 0.9em auto ; max-width: 1030px; }
|
343 |
.amp-wp-article-header.amp-wp-article-category.ampforwp-meta-taxonomy{ margin: 10px auto; max-width: 1030px; } .ampforwp_single_excerpt { margin-bottom:15px; font-size: 15px; text-align:center}
|
344 |
.single-post .amp_author_area amp-img{ margin: 0; float: left; margin-right: 12px; border-radius: 60px; }
|
345 |
-
.single-post .amp_author_area .amp_author_area_wrapper{ display: inline-block; width: 100%; line-height: 1.4; margin-top: 2px; font-size: 13px; color:#333;
|
346 |
<?php if(is_single()){
|
347 |
if( $redux_builder_amp['ampforwp-single-select-type-of-related'] ){ ?>
|
348 |
/* Related Posts */
|
@@ -396,7 +421,7 @@ table a:link { font-weight: bold; text-decoration: none; }
|
|
396 |
table a:visited { color: #999999; font-weight: bold; text-decoration: none; }
|
397 |
table a:active,
|
398 |
table a:hover { color: #bd5a35; text-decoration: underline; }
|
399 |
-
table {
|
400 |
table th { padding: 21px 25px 22px 25px; border-top: 1px solid #fafafa; border-bottom: 1px solid #e0e0e0; background: #ededed; background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb)); background: -moz-linear-gradient(top, #ededed, #ebebeb); }
|
401 |
table th:first-child { text-align: left; padding-left: 20px; }
|
402 |
table tr:first-child th:first-child { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
@@ -636,34 +661,6 @@ if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampfor
|
|
636 |
.w-bl{flex:1 0 100%;}
|
637 |
<?php endif; ?>
|
638 |
}
|
639 |
-
<?php // Back to Top CSS //
|
640 |
-
if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
|
641 |
-
.btt{
|
642 |
-
position: fixed;
|
643 |
-
<?php if( (is_single() && true == ampforwp_get_setting('enable-single-social-icons') ) || (is_page() && true == ampforwp_get_setting('ampforwp-page-sticky-social') ) ){ ?>
|
644 |
-
bottom: 55px;
|
645 |
-
<?php } else { ?>
|
646 |
-
bottom: 20px;
|
647 |
-
<?php } ?>
|
648 |
-
right: 20px;
|
649 |
-
background: rgba(71, 71, 71, 0.5);
|
650 |
-
color: #fff;
|
651 |
-
border-radius: 100%;
|
652 |
-
width: 50px;
|
653 |
-
height: 50px;
|
654 |
-
}
|
655 |
-
.btt:hover{color:#fff;background:#474747;}
|
656 |
-
.btt:before{
|
657 |
-
content: '\25be';
|
658 |
-
display: block;
|
659 |
-
font-size: 35px;
|
660 |
-
font-weight: 600;
|
661 |
-
color:#fff;
|
662 |
-
transform: rotate(180deg);
|
663 |
-
text-align: center;
|
664 |
-
line-height: 1.4;
|
665 |
-
}
|
666 |
-
<?php } ?>
|
667 |
<?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
|
668 |
html {
|
669 |
scroll-behavior: smooth;
|
@@ -822,4 +819,12 @@ if(true == ampforwp_get_setting('ampforwp-single-related-posts-excerpt')){?>
|
|
822 |
color: #999;
|
823 |
font-weight: normal;
|
824 |
}
|
825 |
-
<?php }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
?>
|
78 |
/* Global Styling */
|
79 |
+
body{
|
80 |
+
background: #f1f1f1;
|
81 |
+
font-size:16px;
|
82 |
+
line-height:1.4;
|
83 |
+
<?php $fontFamily = "font-family: sans-serif;"; ?>
|
84 |
+
<?php if( 1 == ampforwp_get_setting('ampforwp-google-font-switch') ) {
|
85 |
+
$fontFamily = "font-family: sans-serif;";
|
86 |
+
if(ampforwp_get_setting('amp_font_selector') != 1 && !empty(ampforwp_get_setting('amp_font_selector') )){
|
87 |
+
$fontFamily = "font-family: ".ampforwp_get_setting('amp_font_selector').";";
|
88 |
+
}
|
89 |
+
}
|
90 |
+
echo sanitize_text_field($fontFamily); ?>
|
91 |
+
}
|
92 |
+
<?php // secondary font family
|
93 |
+
$font_content = '';
|
94 |
+
$font_content = ampforwp_get_setting('amp_font_selector_content_single'); ?>
|
95 |
+
.amp-wp-post-content p, .amp-wp-content.the_content{
|
96 |
+
<?php $fontFamily = "font-family: sans-serif;";
|
97 |
+
if(1==ampforwp_get_setting('ampforwp-google-font-switch') && 1 == ampforwp_get_setting('content-font-family-enable')){
|
98 |
+
if(!empty($font_content) && $font_content != 1 ){
|
99 |
+
$fontFamily = "font-family: ".esc_attr($font_content).";";
|
100 |
+
}
|
101 |
+
}
|
102 |
+
echo sanitize_text_field($fontFamily); // secondary font family ends here ?>
|
103 |
+
}
|
104 |
a { color: #312C7E; text-decoration: none }
|
105 |
.clearfix, .cb { clear: both }
|
106 |
amp-iframe{ max-width: 100%; margin-bottom : 20px; }
|
115 |
.hide{display:none}
|
116 |
/* Template Styles */
|
117 |
.amp-wp-content, .amp-wp-title-bar div {
|
118 |
+
<?php echo ampforwp_font_selector('content'); ?>
|
119 |
<?php if ( $content_max_width > 0 ) : ?>
|
120 |
max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>;
|
121 |
margin: 0 auto;
|
367 |
.single-post .ampforwp-social-icons.ampforwp-social-icons-wrapper{ margin: 0.9em auto 0.9em auto ; max-width: 1030px; }
|
368 |
.amp-wp-article-header.amp-wp-article-category.ampforwp-meta-taxonomy{ margin: 10px auto; max-width: 1030px; } .ampforwp_single_excerpt { margin-bottom:15px; font-size: 15px; text-align:center}
|
369 |
.single-post .amp_author_area amp-img{ margin: 0; float: left; margin-right: 12px; border-radius: 60px; }
|
370 |
+
.single-post .amp_author_area .amp_author_area_wrapper{ display: inline-block; width: 100%; line-height: 1.4; margin-top: 2px; font-size: 13px; color:#333;}
|
371 |
<?php if(is_single()){
|
372 |
if( $redux_builder_amp['ampforwp-single-select-type-of-related'] ){ ?>
|
373 |
/* Related Posts */
|
421 |
table a:visited { color: #999999; font-weight: bold; text-decoration: none; }
|
422 |
table a:active,
|
423 |
table a:hover { color: #bd5a35; text-decoration: underline; }
|
424 |
+
table { color: #666; font-size: 12px; text-shadow: 1px 1px 0px #fff; background: #eee; margin: 0px; width: 95%; }
|
425 |
table th { padding: 21px 25px 22px 25px; border-top: 1px solid #fafafa; border-bottom: 1px solid #e0e0e0; background: #ededed; background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb)); background: -moz-linear-gradient(top, #ededed, #ebebeb); }
|
426 |
table th:first-child { text-align: left; padding-left: 20px; }
|
427 |
table tr:first-child th:first-child { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
661 |
.w-bl{flex:1 0 100%;}
|
662 |
<?php endif; ?>
|
663 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
<?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
|
665 |
html {
|
666 |
scroll-behavior: smooth;
|
819 |
color: #999;
|
820 |
font-weight: normal;
|
821 |
}
|
822 |
+
<?php } ?>
|
823 |
+
.link-menu .toggle {
|
824 |
+
width: 100%;
|
825 |
+
height: 100%;
|
826 |
+
position: absolute;
|
827 |
+
top: 0px;
|
828 |
+
right: 0;
|
829 |
+
cursor:pointer;
|
830 |
+
}
|
@@ -122,7 +122,12 @@ if ( ( (is_single() && 1 == ampforwp_get_setting('ampforwp-bread-crumb')) || (is
|
|
122 |
$get_cat_parents = rtrim(get_category_parents($primary_cateogory, false, '/'),'/');
|
123 |
}
|
124 |
}
|
125 |
-
$
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
// Loop through parent categories and store in variable $cat_display
|
128 |
$cat_display = '';
|
122 |
$get_cat_parents = rtrim(get_category_parents($primary_cateogory, false, '/'),'/');
|
123 |
}
|
124 |
}
|
125 |
+
if (strpos($get_cat_parents, '/') !== false) {
|
126 |
+
$cat_parents = explode(',',$get_cat_parents);
|
127 |
+
}else{
|
128 |
+
// Get parent any categories and create array
|
129 |
+
$cat_parents = explode('/',$get_cat_parents);
|
130 |
+
}
|
131 |
|
132 |
// Loop through parent categories and store in variable $cat_display
|
133 |
$cat_display = '';
|
@@ -18,8 +18,12 @@ do_action('ampforwp_above_the_title',$this); ?>
|
|
18 |
?>
|
19 |
<?php if( array_key_exists( 'enable-excerpt-single' , $redux_builder_amp ) ) {
|
20 |
if($redux_builder_amp['enable-excerpt-single']) {
|
|
|
|
|
|
|
|
|
21 |
if( has_excerpt() ){ ?>
|
22 |
-
<div class="ampforwp_single_excerpt">
|
23 |
<?php $content = get_the_excerpt();
|
24 |
echo wp_kses_post($content); ?>
|
25 |
</div> <?php
|
18 |
?>
|
19 |
<?php if( array_key_exists( 'enable-excerpt-single' , $redux_builder_amp ) ) {
|
20 |
if($redux_builder_amp['enable-excerpt-single']) {
|
21 |
+
$class = 'large-screen-excerpt-design-3';
|
22 |
+
if(true == ampforwp_get_setting('excerpt-option-design-3')){
|
23 |
+
$class = 'small-screen-excerpt-design-3';
|
24 |
+
}
|
25 |
if( has_excerpt() ){ ?>
|
26 |
+
<div class="ampforwp_single_excerpt <?php echo esc_attr($class) ?>">
|
27 |
<?php $content = get_the_excerpt();
|
28 |
echo wp_kses_post($content); ?>
|
29 |
</div> <?php
|
@@ -23,7 +23,30 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
?>
|
24 |
|
25 |
/* Global Styling */
|
26 |
-
body{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
a{ color: #312C7E; text-decoration: none }
|
28 |
.clearfix, .cb{ clear: both }
|
29 |
.alignleft{ margin-right: 12px; margin-bottom:5px; float: left; }
|
@@ -39,42 +62,45 @@ amp-wistia-player {margin:5px 0px;}
|
|
39 |
}
|
40 |
.hide{display:none}
|
41 |
ol, ul {list-style-position: inside;}
|
|
|
42 |
@font-face {
|
43 |
font-family: 'Roboto Slab';
|
44 |
font-display: swap;
|
45 |
font-style: normal;
|
46 |
font-weight: 400;
|
47 |
-
src: local('Roboto Slab Regular'), local('RobotoSlab-Regular'), url('<?php echo esc_url(plugin_dir_url(__FILE__).'fonts/robotoslab/RobotoSlab-Regular.ttf'); ?>');
|
48 |
}
|
49 |
@font-face {
|
50 |
font-family: 'Roboto Slab';
|
51 |
font-display: swap;
|
52 |
font-style: normal;
|
53 |
font-weight: 700;
|
54 |
-
src: local('Roboto Slab Bold'), local('RobotoSlab-Bold'), url('<?php echo esc_url(plugin_dir_url(__FILE__).'fonts/robotoslab/RobotoSlab-Bold.ttf'); ?>');
|
55 |
}
|
56 |
-
|
|
|
57 |
@font-face {
|
58 |
font-family: 'PT Serif';
|
59 |
font-display: swap;
|
60 |
font-style: normal;
|
61 |
font-weight: 400;
|
62 |
-
src: local('PT Serif'), local('PTSerif-Regular'), url('<?php echo esc_url(plugin_dir_url(__FILE__).'fonts/ptserif/PT_Serif-Web-Regular.ttf'); ?>');
|
63 |
}
|
64 |
@font-face {
|
65 |
font-family: 'PT Serif';
|
66 |
font-display: swap;
|
67 |
font-style: normal;
|
68 |
font-weight: 700;
|
69 |
-
src: local('PT Serif Bold'), local('PTSerif-Bold'), url('<?php echo esc_url(plugin_dir_url(__FILE__).'fonts/ptserif/PT_Serif-Web-Bold.ttf'); ?>');
|
70 |
}
|
71 |
-
|
72 |
/* Template Styles */
|
73 |
.amp-wp-content, .amp-wp-title-bar div {
|
74 |
<?php if ( $content_max_width > 0 ) : ?>
|
75 |
max-width: <?php echo esc_attr( sprintf( '%dpx', $content_max_width ) ); ?>;
|
76 |
margin: 0 auto;
|
77 |
<?php endif;
|
|
|
78 |
if((is_singular() || ampforwp_is_front_page() ) && checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){?>
|
79 |
max-width:100%;
|
80 |
<?php } ?>
|
@@ -119,10 +145,10 @@ if(empty($menubdrcolor)){
|
|
119 |
$menubdrcolor ='#555555';
|
120 |
}
|
121 |
?>
|
122 |
-
amp-sidebar{ width: 280px;
|
123 |
.amp-sidebar-image{ line-height: 100px; vertical-align:middle; }
|
124 |
.amp-close-image{ top: 15px; left: 225px; cursor: pointer; }
|
125 |
-
.navigation_heading{ padding: 20px 20px 15px 20px; color: <?php echo ampforwp_sanitize_color($menulblcolor); ?>; font-size: 10px;
|
126 |
.toggle-navigationv2 ul{ list-style-type: none; margin: 15px 0 0 0; padding: 0}
|
127 |
.toggle-navigationv2 ul.amp-menu li a{ padding: 10px 15px 10px 20px; display: inline-block; font-size: 14px; color:<?php echo ampforwp_sanitize_color($navmenucolor); ?>; width:100% }
|
128 |
.amp-menu li{position:relative;margin:0;}
|
@@ -203,10 +229,10 @@ header{ padding-bottom:50px; }
|
|
203 |
main .amp-wp-content{ font-size: 18px; line-height: 29px; color:#111 }
|
204 |
.amp-wp-meta.amp-meta-wrapper{list-style-type:none;}
|
205 |
.single-post main .amp-wp-article-content h1{ font-size:2em}
|
206 |
-
.single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6{
|
207 |
.home-post_image{ float: left; width:33%; padding-right: 2%; overflow:hidden; max-height: 225px }
|
208 |
.amp-wp-title{ margin-top: 0px; }
|
209 |
-
h2.amp-wp-title , h3.amp-wp-title{ font-
|
210 |
h2.amp-wp-title a ,h3.amp-wp-title a{ color: #000; }
|
211 |
.amp-wp-tags{ list-style-type: none; padding: 0; margin: 0 0 9px 0; display: inline-flex; }
|
212 |
.amp-wp-tags li{ display: inline; background: #F6F6F6; color: #9e9e9e; line-height: 1; border-radius: 50px; padding: 8px 18px; font-size: 12px; margin-right: 8px; top: -3px; position: relative; }
|
@@ -215,8 +241,8 @@ h2.amp-wp-title a ,h3.amp-wp-title a{ color: #000; }
|
|
215 |
body .amp-loop-list-noimg .amp-wp-post-content{ width:100% }
|
216 |
.amp-loop-list .amp-wp-post-content{ float: left; width: 65%; }
|
217 |
.amp-loop-list .featured_time{ color:#b3b3b3; padding-left:0 }
|
218 |
-
.amp-wp-post-content p{ color: grey; line-height: 1.5; font-size: 14px;word-
|
219 |
-
<?php if ( 1 == ampforwp_get_setting('enable-excerpt-single') ) { ?>
|
220 |
/* For Excerpt */
|
221 |
.amp-wp-post-content .small-screen-excerpt-design-3 {display: none;} .amp-wp-post-content .large-screen-excerpt-design-3 { display: block; }
|
222 |
<?php } ?>
|
@@ -274,20 +300,19 @@ a.btt:hover {
|
|
274 |
<?php if ( is_singular() || true == ampforwp_get_setting('amp-frontpage-select-option') && ampforwp_get_blog_details() == false && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
|
275 |
/* Single */
|
276 |
.single-post main{ margin: 20px 17px 17px 17px; }
|
277 |
-
.amp-wp-article-content{ font-family:'PT Serif', serif; }
|
278 |
.single-post .post-featured-img{ margin:0 -17px 0px -17px }
|
279 |
.amp-wp-article-featured-image.wp-caption .wp-caption-text, .ampforwp-gallery-item .wp-caption-text{color: #696969; font-size: 11px; line-height: 1.5; background: #eee; margin: 0; padding: .66em .75em; text-align: center; }
|
280 |
.ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
|
281 |
.ampforwp-title{ padding: 0px 0px 0px 0px; margin-top: 12px; margin-bottom: 12px; }
|
282 |
.comment-button-wrapper{ margin-bottom: 50px; margin-top: 30px; text-align:center }
|
283 |
-
.comment-button-wrapper a{ color: #fff; background: #312c7e; font-size: 14px; padding: 12px 22px 12px 22px;
|
284 |
-
h1.amp-wp-title
|
285 |
.post-pagination-meta{ min-height:75px }
|
286 |
-
.single-post .post-pagination-meta{ font-size:15px;
|
287 |
.single-post .post-pagination-meta span{ font-weight:bold }
|
288 |
-
.single-post .amp_author_area .amp_author_area_wrapper{ display: inline-block; width: 100%; line-height: 1.4; margin-top: 22px; font-size: 16px; color:#333;
|
289 |
.single-post .amp_author_area amp-img{ margin: 0; float: left; margin-right: 12px; border-radius: 60px; }
|
290 |
-
.amp-wp-article-tags .ampforwp-tax-tag, .amp-wp-article-tags .ampforwp-tax-tag a{ font-size: 12px; color: #555;
|
291 |
.amp-wp-article-tags span{ background: #eee; margin-right: 10px; padding: 5px 12px 5px 12px; border-radius: 3px; display: inline-block; margin: 5px; }
|
292 |
.ampforwp-social-icons{ margin-bottom: 70px; margin-top: 25px; min-height: 40px; }
|
293 |
.ampforwp-social-icons amp-social-share{ border-radius:60px; background-size:22px; margin-right:6px; }
|
@@ -371,11 +396,10 @@ main .amp-wp-content.featured-image-content{ padding: 0px; border: 0; margin-bot
|
|
371 |
/* Related Posts */
|
372 |
main .amp-wp-content.relatedpost{ background: none; box-shadow: none; padding:0px 0 0 0; margin:1.8em auto 1.5em auto }
|
373 |
.recentpost .loop-date{font-size:14px;}
|
374 |
-
.single-post main,.related-title,.single-post .comments_list h3{ font-size: 20px; color: #777;
|
375 |
-
.related-title {display:block}
|
376 |
.related_posts ol{ list-style-type:none; margin:0; padding:0 }
|
377 |
.related_posts ol li{ display:inline-block; width:100%; margin-bottom: 12px; padding: 0px; }
|
378 |
-
.related_posts .related_link a{ color: #444; font-size: 16px;
|
379 |
.related_posts ol li amp-img{float:left; margin-right:15px }
|
380 |
.related_posts ol li amp-img{ float:left; margin-right:15px }
|
381 |
.related_posts ol li p{ font-size: 12px; color: #999; line-height: 1.2; margin: 12px 0 0 0; }
|
@@ -390,7 +414,7 @@ main .amp-wp-content.relatedpost{ background: none; box-shadow: none; padding:0p
|
|
390 |
<?php if(!checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){ ?>
|
391 |
/* Comments */
|
392 |
.page-numbers{ padding: 9px 10px; background: #fff; font-size: 14px; }
|
393 |
-
.comment-body .comment-content{
|
394 |
main .amp-wp-content.comments_list{ background: none; box-shadow: none; padding:0 }
|
395 |
.comments_list div{ display:inline-block; }
|
396 |
.comments_list ul{ margin:0; padding:0 }
|
@@ -523,7 +547,7 @@ amp-lightbox{ background: rgba(0, 0, 0,0.85); }
|
|
523 |
.amp-carousel-button { z-index: 999}
|
524 |
.amp-featured-wrapper{ background:#333 }
|
525 |
.amp-featured-area{ margin: 0 auto; max-width: 450px; max-height: 270px; }
|
526 |
-
.amp-carousel-slide h2{ font-size: 30px;
|
527 |
.amp-featured-area .amp-carousel-slide amp-img:before{ z-index:100; bottom: 0; content: ""; display: block; height: 100%; position:absolute; width: 100%; background: -webkit-gradient(linear, 50% 0%, 50% 75%, color-stop(0%, rgba(0,0,0,0)), color-stop(150%, #000000)) repeat scroll 0 0 rgba(0,0,0,0.2); background: -webkit-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: -moz-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: -o-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); }
|
528 |
.featured_title{ position:absolute; z-index:110; bottom:0 }
|
529 |
.featured_meta{ color:#575757; font-size:12px; margin:0 15px; }
|
@@ -538,7 +562,7 @@ table { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap
|
|
538 |
table a:link { font-weight: bold; text-decoration: none; }
|
539 |
table a:visited { color: #999999; font-weight: bold; text-decoration: none; }
|
540 |
table a:active, table a:hover { color: #bd5a35; text-decoration: underline; }
|
541 |
-
table {
|
542 |
table th { padding: 21px 25px 22px 25px; border-top: 1px solid #fafafa; border-bottom: 1px solid #e0e0e0; background: #ededed; background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb)); background: -moz-linear-gradient(top, #ededed, #ebebeb); }
|
543 |
table th:first-child { text-align: left; padding-left: 20px; }
|
544 |
table tr:first-child th:first-child { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
@@ -847,34 +871,6 @@ if ( is_active_sidebar( 'ampforwp-above-footer' ) || is_active_sidebar( 'ampfor
|
|
847 |
.w-bl{flex:1 0 100%;}
|
848 |
<?php endif; ?>
|
849 |
}
|
850 |
-
<?php // Back to Top CSS //
|
851 |
-
if(true == ampforwp_get_setting('ampforwp-footer-top')){?>
|
852 |
-
.btt{
|
853 |
-
position: fixed;
|
854 |
-
<?php if( (is_single() && true == ampforwp_get_setting('enable-single-social-icons') ) || (is_page() && true == ampforwp_get_setting('ampforwp-page-sticky-social') ) ){ ?>
|
855 |
-
bottom: 55px;
|
856 |
-
<?php } else { ?>
|
857 |
-
bottom: 20px;
|
858 |
-
<?php } ?>
|
859 |
-
right: 20px;
|
860 |
-
background: rgba(71, 71, 71, 0.5);
|
861 |
-
color: #fff;
|
862 |
-
border-radius: 100%;
|
863 |
-
width: 50px;
|
864 |
-
height: 50px;
|
865 |
-
}
|
866 |
-
.btt:hover{color:#fff;background:#474747;}
|
867 |
-
.btt:before{
|
868 |
-
content: '\25be';
|
869 |
-
display: block;
|
870 |
-
font-size: 35px;
|
871 |
-
font-weight: 600;
|
872 |
-
color:#fff;
|
873 |
-
transform: rotate(180deg);
|
874 |
-
text-align: center;
|
875 |
-
line-height: 1.4;
|
876 |
-
}
|
877 |
-
<?php } ?>
|
878 |
<?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
|
879 |
html {
|
880 |
scroll-behavior: smooth;
|
@@ -1040,4 +1036,12 @@ if(true == ampforwp_get_setting('ampforwp-single-related-posts-excerpt')){?>
|
|
1040 |
font-weight:normal;
|
1041 |
margin-left: 5px;
|
1042 |
}
|
1043 |
-
<?php }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
?>
|
24 |
|
25 |
/* Global Styling */
|
26 |
+
body{
|
27 |
+
font-size: 16px;
|
28 |
+
line-height:1.6;
|
29 |
+
}
|
30 |
+
body, amp-sidebar, .single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6, h2.amp-wp-title , h3.amp-wp-title, .comment-button-wrapper a, h1.amp-wp-title, .single-post main,.related-title,.single-post .comments_list h3, .related_posts .related_link a{
|
31 |
+
<?php $fontFamily = "font-family: sans-serif;"; ?>
|
32 |
+
<?php if( 1 == ampforwp_get_setting('ampforwp-google-font-switch') ) {
|
33 |
+
$fontFamily = "font-family: 'Roboto Slab';";
|
34 |
+
if(ampforwp_get_setting('amp_font_selector') != 1 && !empty(ampforwp_get_setting('amp_font_selector') )){
|
35 |
+
$fontFamily = "font-family: '".ampforwp_get_setting('amp_font_selector')."';";
|
36 |
+
}
|
37 |
+
}
|
38 |
+
echo sanitize_text_field($fontFamily); ?>
|
39 |
+
}
|
40 |
+
.amp-carousel-slide h2, .amp-wp-article-content, .amp-wp-post-content p, .comment-body .comment-content{
|
41 |
+
<?php $fontFamily = "font-family: georgia;"; ?>
|
42 |
+
<?php if( 1 == ampforwp_get_setting('content-font-family-enable') ) {
|
43 |
+
$fontFamily = "font-family: 'PT Serif';";
|
44 |
+
if(ampforwp_get_setting('amp_font_selector_content_single') != 1 && !empty(ampforwp_get_setting('amp_font_selector_content_single') )){
|
45 |
+
$fontFamily = "font-family: '".ampforwp_get_setting('amp_font_selector_content_single')."';";
|
46 |
+
}
|
47 |
+
}
|
48 |
+
echo sanitize_text_field($fontFamily); ?>
|
49 |
+
}
|
50 |
a{ color: #312C7E; text-decoration: none }
|
51 |
.clearfix, .cb{ clear: both }
|
52 |
.alignleft{ margin-right: 12px; margin-bottom:5px; float: left; }
|
62 |
}
|
63 |
.hide{display:none}
|
64 |
ol, ul {list-style-position: inside;}
|
65 |
+
<?php if(1==ampforwp_get_setting('ampforwp-google-font-switch') && ( ampforwp_get_setting('amp_font_selector') == 1 || empty(ampforwp_get_setting('amp_font_selector') ) ) ) {?>
|
66 |
@font-face {
|
67 |
font-family: 'Roboto Slab';
|
68 |
font-display: swap;
|
69 |
font-style: normal;
|
70 |
font-weight: 400;
|
71 |
+
src: local('Roboto Slab Regular'), local('RobotoSlab-Regular'), url('<?php echo esc_url(ampforwp_font_url(plugin_dir_url(__FILE__).'fonts/robotoslab/RobotoSlab-Regular.ttf')); ?>');
|
72 |
}
|
73 |
@font-face {
|
74 |
font-family: 'Roboto Slab';
|
75 |
font-display: swap;
|
76 |
font-style: normal;
|
77 |
font-weight: 700;
|
78 |
+
src: local('Roboto Slab Bold'), local('RobotoSlab-Bold'), url('<?php echo esc_url(ampforwp_font_url(plugin_dir_url(__FILE__).'fonts/robotoslab/RobotoSlab-Bold.ttf')); ?>');
|
79 |
}
|
80 |
+
<?php } // Primary Fonts ends here
|
81 |
+
if(1==ampforwp_get_setting('content-font-family-enable') && ( ampforwp_get_setting('amp_font_selector_content_single') == 1 || empty(ampforwp_get_setting('amp_font_selector_content_single') ) ) ) {?>
|
82 |
@font-face {
|
83 |
font-family: 'PT Serif';
|
84 |
font-display: swap;
|
85 |
font-style: normal;
|
86 |
font-weight: 400;
|
87 |
+
src: local('PT Serif'), local('PTSerif-Regular'), url('<?php echo esc_url(ampforwp_font_url(plugin_dir_url(__FILE__).'fonts/ptserif/PT_Serif-Web-Regular.ttf')); ?>');
|
88 |
}
|
89 |
@font-face {
|
90 |
font-family: 'PT Serif';
|
91 |
font-display: swap;
|
92 |
font-style: normal;
|
93 |
font-weight: 700;
|
94 |
+
src: local('PT Serif Bold'), local('PTSerif-Bold'), url('<?php echo esc_url(ampforwp_font_url(plugin_dir_url(__FILE__).'fonts/ptserif/PT_Serif-Web-Bold.ttf')); ?>');
|
95 |
}
|
96 |
+
<?php } // Secondary Fonts Ends here?>
|
97 |
/* Template Styles */
|
98 |
.amp-wp-content, .amp-wp-title-bar div {
|
99 |
<?php if ( $content_max_width > 0 ) : ?>
|
100 |
max-width: <?php echo esc_attr( sprintf( '%dpx', $content_max_width ) ); ?>;
|
101 |
margin: 0 auto;
|
102 |
<?php endif;
|
103 |
+
echo ampforwp_font_selector('content');
|
104 |
if((is_singular() || ampforwp_is_front_page() ) && checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){?>
|
105 |
max-width:100%;
|
106 |
<?php } ?>
|
145 |
$menubdrcolor ='#555555';
|
146 |
}
|
147 |
?>
|
148 |
+
amp-sidebar{ width: 280px;background:<?php echo ampforwp_sanitize_color($menubgcolor);?>; }
|
149 |
.amp-sidebar-image{ line-height: 100px; vertical-align:middle; }
|
150 |
.amp-close-image{ top: 15px; left: 225px; cursor: pointer; }
|
151 |
+
.navigation_heading{ padding: 20px 20px 15px 20px; color: <?php echo ampforwp_sanitize_color($menulblcolor); ?>; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid <?php echo ampforwp_sanitize_color($menubdrcolor); ?>; display: inline-block; width: 100%}
|
152 |
.toggle-navigationv2 ul{ list-style-type: none; margin: 15px 0 0 0; padding: 0}
|
153 |
.toggle-navigationv2 ul.amp-menu li a{ padding: 10px 15px 10px 20px; display: inline-block; font-size: 14px; color:<?php echo ampforwp_sanitize_color($navmenucolor); ?>; width:100% }
|
154 |
.amp-menu li{position:relative;margin:0;}
|
229 |
main .amp-wp-content{ font-size: 18px; line-height: 29px; color:#111 }
|
230 |
.amp-wp-meta.amp-meta-wrapper{list-style-type:none;}
|
231 |
.single-post main .amp-wp-article-content h1{ font-size:2em}
|
232 |
+
.single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6{margin: 0px 0px 5px 0px; line-height: 1.6; }
|
233 |
.home-post_image{ float: left; width:33%; padding-right: 2%; overflow:hidden; max-height: 225px }
|
234 |
.amp-wp-title{ margin-top: 0px; }
|
235 |
+
h2.amp-wp-title , h3.amp-wp-title{ font-weight: 700; font-size: 20px; margin-bottom: 7px; line-height: 1.3; }
|
236 |
h2.amp-wp-title a ,h3.amp-wp-title a{ color: #000; }
|
237 |
.amp-wp-tags{ list-style-type: none; padding: 0; margin: 0 0 9px 0; display: inline-flex; }
|
238 |
.amp-wp-tags li{ display: inline; background: #F6F6F6; color: #9e9e9e; line-height: 1; border-radius: 50px; padding: 8px 18px; font-size: 12px; margin-right: 8px; top: -3px; position: relative; }
|
241 |
body .amp-loop-list-noimg .amp-wp-post-content{ width:100% }
|
242 |
.amp-loop-list .amp-wp-post-content{ float: left; width: 65%; }
|
243 |
.amp-loop-list .featured_time{ color:#b3b3b3; padding-left:0 }
|
244 |
+
.amp-wp-post-content p{ color: grey; line-height: 1.5; font-size: 14px;word-wrap: break-word; margin: 8px 0 10px;}
|
245 |
+
<?php if ( is_single() && 1 == ampforwp_get_setting('enable-excerpt-single') ) { ?>
|
246 |
/* For Excerpt */
|
247 |
.amp-wp-post-content .small-screen-excerpt-design-3 {display: none;} .amp-wp-post-content .large-screen-excerpt-design-3 { display: block; }
|
248 |
<?php } ?>
|
300 |
<?php if ( is_singular() || true == ampforwp_get_setting('amp-frontpage-select-option') && ampforwp_get_blog_details() == false && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
|
301 |
/* Single */
|
302 |
.single-post main{ margin: 20px 17px 17px 17px; }
|
|
|
303 |
.single-post .post-featured-img{ margin:0 -17px 0px -17px }
|
304 |
.amp-wp-article-featured-image.wp-caption .wp-caption-text, .ampforwp-gallery-item .wp-caption-text{color: #696969; font-size: 11px; line-height: 1.5; background: #eee; margin: 0; padding: .66em .75em; text-align: center; }
|
305 |
.ampforwp-gallery-item.amp-carousel-slide { padding-bottom: 20px;}
|
306 |
.ampforwp-title{ padding: 0px 0px 0px 0px; margin-top: 12px; margin-bottom: 12px; }
|
307 |
.comment-button-wrapper{ margin-bottom: 50px; margin-top: 30px; text-align:center }
|
308 |
+
.comment-button-wrapper a{ color: #fff; background: #312c7e; font-size: 14px; padding: 12px 22px 12px 22px; border-radius: 2px; text-transform: uppercase; letter-spacing: 1px; }
|
309 |
+
h1.amp-wp-title{ margin: 0; color: #333333; font-size: 48px; line-height: 58px;}
|
310 |
.post-pagination-meta{ min-height:75px }
|
311 |
+
.single-post .post-pagination-meta{ font-size:15px; min-height:auto; margin-top:-5px; line-height:26px; }
|
312 |
.single-post .post-pagination-meta span{ font-weight:bold }
|
313 |
+
.single-post .amp_author_area .amp_author_area_wrapper{ display: inline-block; width: 100%; line-height: 1.4; margin-top: 22px; font-size: 16px; color:#333; }
|
314 |
.single-post .amp_author_area amp-img{ margin: 0; float: left; margin-right: 12px; border-radius: 60px; }
|
315 |
+
.amp-wp-article-tags .ampforwp-tax-tag, .amp-wp-article-tags .ampforwp-tax-tag a{ font-size: 12px; color: #555; margin: 20px 0 0 0; }
|
316 |
.amp-wp-article-tags span{ background: #eee; margin-right: 10px; padding: 5px 12px 5px 12px; border-radius: 3px; display: inline-block; margin: 5px; }
|
317 |
.ampforwp-social-icons{ margin-bottom: 70px; margin-top: 25px; min-height: 40px; }
|
318 |
.ampforwp-social-icons amp-social-share{ border-radius:60px; background-size:22px; margin-right:6px; }
|
396 |
/* Related Posts */
|
397 |
main .amp-wp-content.relatedpost{ background: none; box-shadow: none; padding:0px 0 0 0; margin:1.8em auto 1.5em auto }
|
398 |
.recentpost .loop-date{font-size:14px;}
|
399 |
+
.single-post main,.related-title,.single-post .comments_list h3{ font-size: 20px; color: #777;border-bottom: 1px solid #eee; font-weight: 400; padding-bottom: 1px; margin-bottom: 10px; }
|
|
|
400 |
.related_posts ol{ list-style-type:none; margin:0; padding:0 }
|
401 |
.related_posts ol li{ display:inline-block; width:100%; margin-bottom: 12px; padding: 0px; }
|
402 |
+
.related_posts .related_link a{ color: #444; font-size: 16px;font-weight: 600; }
|
403 |
.related_posts ol li amp-img{float:left; margin-right:15px }
|
404 |
.related_posts ol li amp-img{ float:left; margin-right:15px }
|
405 |
.related_posts ol li p{ font-size: 12px; color: #999; line-height: 1.2; margin: 12px 0 0 0; }
|
414 |
<?php if(!checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){ ?>
|
415 |
/* Comments */
|
416 |
.page-numbers{ padding: 9px 10px; background: #fff; font-size: 14px; }
|
417 |
+
.comment-body .comment-content{margin-top: 2px; }
|
418 |
main .amp-wp-content.comments_list{ background: none; box-shadow: none; padding:0 }
|
419 |
.comments_list div{ display:inline-block; }
|
420 |
.comments_list ul{ margin:0; padding:0 }
|
547 |
.amp-carousel-button { z-index: 999}
|
548 |
.amp-featured-wrapper{ background:#333 }
|
549 |
.amp-featured-area{ margin: 0 auto; max-width: 450px; max-height: 270px; }
|
550 |
+
.amp-carousel-slide h2{ font-size: 30px;margin: 0; font-weight: normal; line-height: 38px; color: #fff; padding: 10px 20px 20px 20px; }
|
551 |
.amp-featured-area .amp-carousel-slide amp-img:before{ z-index:100; bottom: 0; content: ""; display: block; height: 100%; position:absolute; width: 100%; background: -webkit-gradient(linear, 50% 0%, 50% 75%, color-stop(0%, rgba(0,0,0,0)), color-stop(150%, #000000)) repeat scroll 0 0 rgba(0,0,0,0.2); background: -webkit-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: -moz-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: -o-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); background: linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0); }
|
552 |
.featured_title{ position:absolute; z-index:110; bottom:0 }
|
553 |
.featured_meta{ color:#575757; font-size:12px; margin:0 15px; }
|
562 |
table a:link { font-weight: bold; text-decoration: none; }
|
563 |
table a:visited { color: #999999; font-weight: bold; text-decoration: none; }
|
564 |
table a:active, table a:hover { color: #bd5a35; text-decoration: underline; }
|
565 |
+
table { color: #666; font-size: 12px; text-shadow: 1px 1px 0px #fff; background: #eee; margin: 0px; width: 100%; }
|
566 |
table th { padding: 21px 25px 22px 25px; border-top: 1px solid #fafafa; border-bottom: 1px solid #e0e0e0; background: #ededed; background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb)); background: -moz-linear-gradient(top, #ededed, #ebebeb); }
|
567 |
table th:first-child { text-align: left; padding-left: 20px; }
|
568 |
table tr:first-child th:first-child { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
|
871 |
.w-bl{flex:1 0 100%;}
|
872 |
<?php endif; ?>
|
873 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
874 |
<?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
|
875 |
html {
|
876 |
scroll-behavior: smooth;
|
1036 |
font-weight:normal;
|
1037 |
margin-left: 5px;
|
1038 |
}
|
1039 |
+
<?php } ?>
|
1040 |
+
.link-menu .toggle {
|
1041 |
+
width: 100%;
|
1042 |
+
height: 100%;
|
1043 |
+
position: absolute;
|
1044 |
+
top: 0px;
|
1045 |
+
right: 0;
|
1046 |
+
cursor:pointer;
|
1047 |
+
}
|
@@ -21,7 +21,7 @@ if ( empty($ampforwp_font_icon) ) {
|
|
21 |
$ampforwp_font_icon = 'swift-icons';
|
22 |
}
|
23 |
?>
|
24 |
-
<?php if(!isset($redux_builder_amp['amp_font_selector']) || $redux_builder_amp['amp_font_selector'] == 1 || empty($redux_builder_amp['amp_font_selector'])){
|
25 |
if(!ampforwp_levelup_compatibility('levelup_theme_and_elementor')){ // Level up Condition starts ?>
|
26 |
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 300;src: local('Poppins Light'), local('Poppins-Light'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Light.ttf');}
|
27 |
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 400;src: local('Poppins Regular'), local('Poppins-Regular'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Regular.ttf');}
|
@@ -43,6 +43,7 @@ if( !empty($swift_cs['color']) ) {
|
|
43 |
}
|
44 |
$swift_btn_hvr_color = ampforwp_get_setting('swift-btn-hover-color-scheme','color'); ?>
|
45 |
body{<?php
|
|
|
46 |
$fontFamily = "font-family: 'Arial', 'Helvetica', 'sans-serif';";
|
47 |
if( !ampforwp_levelup_compatibility('levelup_theme') && 1==ampforwp_get_setting('ampforwp-google-font-switch') ){
|
48 |
$fontFamily = "font-family: 'Poppins', sans-serif;";
|
@@ -50,7 +51,7 @@ if( !ampforwp_levelup_compatibility('levelup_theme') && 1==ampforwp_get_setting(
|
|
50 |
$fontFamily = "font-family: '".$redux_builder_amp['amp_font_selector']."';";
|
51 |
}
|
52 |
}
|
53 |
-
echo $fontFamily; ?>font-size: 16px; line-height:1.25; }
|
54 |
ol, ul{ list-style-position: inside }
|
55 |
p, ol, ul, figure{ margin: 0 0 1em; padding: 0; }
|
56 |
a, a:active, a:visited{ text-decoration: none; color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;}
|
@@ -305,6 +306,14 @@ cursor: pointer;border-radius: 35px;color: <?php echo ampforwp_sanitize_color($r
|
|
305 |
border-bottom: 1px solid <?php if(isset($redux_builder_amp['swift-element-menu-border-color']['rgba'])){echo ampforwp_sanitize_color($redux_builder_amp['swift-element-menu-border-color']['rgba']);}?>;
|
306 |
margin:0px 10px;
|
307 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
.m-menu .amp-menu .sub-menu li:last-child{border:none;}
|
309 |
.m-menu .amp-menu a {padding: 7px 15px;}
|
310 |
.m-menu > li{font-size:17px;}
|
@@ -359,6 +368,7 @@ padding: <?php echo esc_html($redux_builder_amp['primary-menu-padding-control'][
|
|
359 |
.p-menu{overflow-x: auto;overflow-y:hidden;white-space: nowrap;}
|
360 |
<?php } ?>
|
361 |
.p-menu ul li.menu-item-has-children:after{display:none;}
|
|
|
362 |
@media(max-width:768px){
|
363 |
.p-menu ul li.menu-item-has-children:hover > ul{display:none;}
|
364 |
.p-menu{overflow-x: auto;overflow-y:hidden;white-space: nowrap;}
|
@@ -425,7 +435,7 @@ if(1==ampforwp_get_setting('ampforwp-google-font-switch')){
|
|
425 |
$fontFamily = "font-family: '".esc_attr($font_content)."';";
|
426 |
}
|
427 |
}
|
428 |
-
echo $fontFamily;
|
429 |
?>
|
430 |
}
|
431 |
@media(max-width:1110px){
|
@@ -549,13 +559,14 @@ if( !ampforwp_woocommerce_conditional_check() ) { ?>
|
|
549 |
pre {padding: 30px 15px;background: #f7f7f7;white-space: pre-wrap;;font-size: 14px;color: #666666;border-left: 3px solid;border-color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;margin-bottom: 20px;}
|
550 |
.cntn-wrp{
|
551 |
<?php
|
552 |
-
|
553 |
-
if(1==ampforwp_get_setting('ampforwp-google-font-switch')
|
554 |
-
|
555 |
-
|
|
|
556 |
}
|
557 |
}
|
558 |
-
echo $fontFamily;
|
559 |
?>
|
560 |
}
|
561 |
<?php } ?>
|
21 |
$ampforwp_font_icon = 'swift-icons';
|
22 |
}
|
23 |
?>
|
24 |
+
<?php if(1==ampforwp_get_setting('ampforwp-google-font-switch') && ( !isset($redux_builder_amp['amp_font_selector']) || $redux_builder_amp['amp_font_selector'] == 1 || empty($redux_builder_amp['amp_font_selector']) ) ) {
|
25 |
if(!ampforwp_levelup_compatibility('levelup_theme_and_elementor')){ // Level up Condition starts ?>
|
26 |
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 300;src: local('Poppins Light'), local('Poppins-Light'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Light.ttf');}
|
27 |
@font-face {font-family: 'Poppins';font-display: swap;font-style: normal;font-weight: 400;src: local('Poppins Regular'), local('Poppins-Regular'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Regular.ttf');}
|
43 |
}
|
44 |
$swift_btn_hvr_color = ampforwp_get_setting('swift-btn-hover-color-scheme','color'); ?>
|
45 |
body{<?php
|
46 |
+
$theme = wp_get_theme();
|
47 |
$fontFamily = "font-family: 'Arial', 'Helvetica', 'sans-serif';";
|
48 |
if( !ampforwp_levelup_compatibility('levelup_theme') && 1==ampforwp_get_setting('ampforwp-google-font-switch') ){
|
49 |
$fontFamily = "font-family: 'Poppins', sans-serif;";
|
51 |
$fontFamily = "font-family: '".$redux_builder_amp['amp_font_selector']."';";
|
52 |
}
|
53 |
}
|
54 |
+
echo sanitize_text_field($fontFamily); ?>font-size: 16px; line-height:1.25; }
|
55 |
ol, ul{ list-style-position: inside }
|
56 |
p, ol, ul, figure{ margin: 0 0 1em; padding: 0; }
|
57 |
a, a:active, a:visited{ text-decoration: none; color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;}
|
306 |
border-bottom: 1px solid <?php if(isset($redux_builder_amp['swift-element-menu-border-color']['rgba'])){echo ampforwp_sanitize_color($redux_builder_amp['swift-element-menu-border-color']['rgba']);}?>;
|
307 |
margin:0px 10px;
|
308 |
}
|
309 |
+
.m-menu .link-menu .toggle {
|
310 |
+
width: 100%;
|
311 |
+
height: 100%;
|
312 |
+
position: absolute;
|
313 |
+
top: 0px;
|
314 |
+
right: 0;
|
315 |
+
cursor:pointer;
|
316 |
+
}
|
317 |
.m-menu .amp-menu .sub-menu li:last-child{border:none;}
|
318 |
.m-menu .amp-menu a {padding: 7px 15px;}
|
319 |
.m-menu > li{font-size:17px;}
|
368 |
.p-menu{overflow-x: auto;overflow-y:hidden;white-space: nowrap;}
|
369 |
<?php } ?>
|
370 |
.p-menu ul li.menu-item-has-children:after{display:none;}
|
371 |
+
.amp-menu .toggle:after{position:absolute;}
|
372 |
@media(max-width:768px){
|
373 |
.p-menu ul li.menu-item-has-children:hover > ul{display:none;}
|
374 |
.p-menu{overflow-x: auto;overflow-y:hidden;white-space: nowrap;}
|
435 |
$fontFamily = "font-family: '".esc_attr($font_content)."';";
|
436 |
}
|
437 |
}
|
438 |
+
echo sanitize_text_field($fontFamily);
|
439 |
?>
|
440 |
}
|
441 |
@media(max-width:1110px){
|
559 |
pre {padding: 30px 15px;background: #f7f7f7;white-space: pre-wrap;;font-size: 14px;color: #666666;border-left: 3px solid;border-color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;margin-bottom: 20px;}
|
560 |
.cntn-wrp{
|
561 |
<?php
|
562 |
+
$fontFamily = "font-family: 'Arial, Helvetica, sans-serif'";
|
563 |
+
if(1==ampforwp_get_setting('ampforwp-google-font-switch')){
|
564 |
+
$fontFamily = "font-family: 'Poppins', sans-serif;";
|
565 |
+
if(isset($redux_builder_amp['amp_font_selector_content_single']) && $redux_builder_amp['amp_font_selector_content_single'] != 1 && !empty($redux_builder_amp['amp_font_selector_content_single'])){
|
566 |
+
$fontFamily = "font-family: '".$redux_builder_amp['amp_font_selector_content_single']."';";
|
567 |
}
|
568 |
}
|
569 |
+
echo sanitize_text_field($fontFamily);
|
570 |
?>
|
571 |
}
|
572 |
<?php } ?>
|
@@ -5333,6 +5333,9 @@ add_action('amp_post_template_css', 'ampforwp_google_fonts_generator');
|
|
5333 |
if ( ! function_exists( 'ampforwp_google_fonts_generator' ) ) {
|
5334 |
function ampforwp_google_fonts_generator() {
|
5335 |
global $redux_builder_amp;
|
|
|
|
|
|
|
5336 |
if(isset($redux_builder_amp['google_current_font_data'])){
|
5337 |
$font_data = json_decode(stripslashes($redux_builder_amp['google_current_font_data']));
|
5338 |
}
|
@@ -5344,7 +5347,7 @@ if ( ! function_exists( 'ampforwp_google_fonts_generator' ) ) {
|
|
5344 |
$font_type = $redux_builder_amp['amp_font_type'];
|
5345 |
}
|
5346 |
|
5347 |
-
if ( $font_type ) {
|
5348 |
foreach ($font_type as $key => $value) {
|
5349 |
// Font Weight generator
|
5350 |
$font_weight = (int) $value;
|
@@ -5411,7 +5414,7 @@ if ( ! function_exists( 'ampforwp_google_fonts_generator' ) ) {
|
|
5411 |
}
|
5412 |
|
5413 |
//for Single content Font Family
|
5414 |
-
if(ampforwp_get_setting('content-font-family-enable') && is_singular()){
|
5415 |
if(ampforwp_get_setting('google_current_font_data_content_single')){
|
5416 |
$font_data = json_decode(stripslashes(ampforwp_get_setting('google_current_font_data_content_single')));
|
5417 |
}
|
@@ -5419,7 +5422,7 @@ if ( ! function_exists( 'ampforwp_google_fonts_generator' ) ) {
|
|
5419 |
if( ampforwp_get_setting('amp_font_type_content_single') ){
|
5420 |
$font_type = ampforwp_get_setting('amp_font_type_content_single');
|
5421 |
}
|
5422 |
-
if ( $font_type ) {
|
5423 |
foreach ($font_type as $key => $value) {
|
5424 |
// Font Weight generator
|
5425 |
$font_weight = (int) $value;
|
@@ -7308,4 +7311,32 @@ function ampforwp_nofollow_cta_header_link(){
|
|
7308 |
return;
|
7309 |
}
|
7310 |
return false;
|
7311 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5333 |
if ( ! function_exists( 'ampforwp_google_fonts_generator' ) ) {
|
5334 |
function ampforwp_google_fonts_generator() {
|
5335 |
global $redux_builder_amp;
|
5336 |
+
if( 1!=ampforwp_get_setting('ampforwp-google-font-switch') || true == ampforwp_get_setting('amp_google_font_restrict')){
|
5337 |
+
return;
|
5338 |
+
}
|
5339 |
if(isset($redux_builder_amp['google_current_font_data'])){
|
5340 |
$font_data = json_decode(stripslashes($redux_builder_amp['google_current_font_data']));
|
5341 |
}
|
5347 |
$font_type = $redux_builder_amp['amp_font_type'];
|
5348 |
}
|
5349 |
|
5350 |
+
if ( $font_type && ampforwp_get_setting('amp_font_selector') != 'Segoe UI') {
|
5351 |
foreach ($font_type as $key => $value) {
|
5352 |
// Font Weight generator
|
5353 |
$font_weight = (int) $value;
|
5414 |
}
|
5415 |
|
5416 |
//for Single content Font Family
|
5417 |
+
if(ampforwp_get_setting('content-font-family-enable') && (is_singular() || (ampforwp_get_setting('amp-design-selector')!=4) ) ){
|
5418 |
if(ampforwp_get_setting('google_current_font_data_content_single')){
|
5419 |
$font_data = json_decode(stripslashes(ampforwp_get_setting('google_current_font_data_content_single')));
|
5420 |
}
|
5422 |
if( ampforwp_get_setting('amp_font_type_content_single') ){
|
5423 |
$font_type = ampforwp_get_setting('amp_font_type_content_single');
|
5424 |
}
|
5425 |
+
if ( $font_type && ampforwp_get_setting('amp_font_selector_content_single') != 'Segoe UI') {
|
5426 |
foreach ($font_type as $key => $value) {
|
5427 |
// Font Weight generator
|
5428 |
$font_weight = (int) $value;
|
7311 |
return;
|
7312 |
}
|
7313 |
return false;
|
7314 |
+
}
|
7315 |
+
|
7316 |
+
// Font Selector
|
7317 |
+
if( ! function_exists('ampforwp_font_selector') ) {
|
7318 |
+
function ampforwp_font_selector( $container ) {
|
7319 |
+
global $redux_builder_amp;
|
7320 |
+
$fontFamily = '';
|
7321 |
+
if(1==ampforwp_get_setting('ampforwp-google-font-switch')){
|
7322 |
+
return sanitize_text_field($fontFamily);
|
7323 |
+
}
|
7324 |
+
if(empty($container)) {
|
7325 |
+
$container = 'body';
|
7326 |
+
}
|
7327 |
+
if ( 'content' == $container && ampforwp_get_setting('amp_font_selector_content_single') && 1 != ampforwp_get_setting('amp_font_selector_content_single') ) {
|
7328 |
+
$fontFamily = "font-family: '".ampforwp_get_setting('amp_font_selector_content_single')."';";
|
7329 |
+
}
|
7330 |
+
if ( 'body' == $container && ampforwp_get_setting('amp_font_selector') && 1 != ampforwp_get_setting('amp_font_selector') ) {
|
7331 |
+
$fontFamily = "font-family: '".ampforwp_get_setting('amp_font_selector')."'";
|
7332 |
+
}
|
7333 |
+
return sanitize_text_field($fontFamily);
|
7334 |
+
}
|
7335 |
+
}
|
7336 |
+
|
7337 |
+
// Font URL controller
|
7338 |
+
if ( ! function_exists('ampforwp_font_url') ) {
|
7339 |
+
function ampforwp_font_url($font_url){
|
7340 |
+
return apply_filters('ampforwp_font_url', $font_url);
|
7341 |
+
}
|
7342 |
+
}
|