AMP for WP – Accelerated Mobile Pages - Version 0.9.97.63

Version Description

(9th July 2019) = * Improvements: Custom Taxonomy support #3036 * Improvements: Option to change the Navigation part background color and element color for Design-3 #3034 * Improvements: Compatibility with the SEO Framework Plugin #2670 * Improvements: Facebook Messenger Icon in social share icons #2806 * Improvements: Option to change the Homepage Thumbnail size in design-3 theme #2986 * Improvements: Changed prefix class of whatsapp to Api #3369 * Improvements: Colour changing feature in Navigation bar in a design-2 #3059 * Improvements: Google Lighthouse Audit Score improved #3276 * Improvements: AMP option panel compatibility with a basix theme #3366 * Improvements: Template mode code improved #3357 * Fixed: PHP debug warning #3128 * Fixed: Proper alignment of description in Design-3 #3385 * Fixed: 'Modified Date' option not working when Date Format 'Traditional view' is selected #3383 * Fixed: When Parmalinks in "/index.php/%year%/%monthnum%/%day%/%postname%/" format category not working #3279 * Fixed: Separator Character's of Rank math plugin is not working on AMP pages #3335 * Fixed: SVG images not rendering in AMP #3208 * Fixed: Improvements code in Search form widget #3000 * Fixed: Dynamically change accordion-mod class name to reduce the styling size #3334 * Fixed: Social sticky icons to show on top as well as it is getting hidden behind sticky ads #3126 * Fixed: Font icons not loading in master and beta #3382 * Fixed: Yoast SEO Data not loading in AMP when 'Glue for Yoast SEO & AMP' plugin is active #3338 * Fixed: When AMP Comments is disabled, div of comments is loading #3345 * Fixed: Error 500 PHP 5.3.3 Fallback support #3333 * Fixed: Debug warnings after recent update #3400 * Fixed: Video sanitizer not allowing the "id" attribute #3406 * Fixed: Check if function_exists('get_rocket_option') #3417

Full changelog available at changelog.txt

Download this release

Release Info

Developer mohammed_kaludi
Plugin Icon 128x128 AMP for WP – Accelerated Mobile Pages
Version 0.9.97.63
Comparing to
See all releases

Code changes from version 0.9.97.62 to 0.9.97.63

README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
- Stable tag: 0.9.97.62
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -188,7 +188,35 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
188
 
189
  == Changelog ==
190
 
191
- = 0.9.97.62 (3rd July 2019) =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  * Improvements: Change AddThis controls labels. #3359
193
  * Fixed: Alternative methods to sanitize(`sanitize_textarea_field`) for users who are using older then 4.7 #3394
194
  * Fixed: amp-addthis script is loading on WooCommerce product pages. #3393
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
+ Stable tag: 0.9.97.63
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
188
 
189
  == Changelog ==
190
 
191
+ = 0.9.97.63 (9th July 2019) =
192
+ * Improvements: Custom Taxonomy support #3036
193
+ * Improvements: Option to change the Navigation part background color and element color for Design-3 #3034
194
+ * Improvements: Compatibility with the SEO Framework Plugin #2670
195
+ * Improvements: Facebook Messenger Icon in social share icons #2806
196
+ * Improvements: Option to change the Homepage Thumbnail size in design-3 theme #2986
197
+ * Improvements: Changed prefix class of whatsapp to Api #3369
198
+ * Improvements: Colour changing feature in Navigation bar in a design-2 #3059
199
+ * Improvements: Google Lighthouse Audit Score improved #3276
200
+ * Improvements: AMP option panel compatibility with a basix theme #3366
201
+ * Improvements: Template mode code improved #3357
202
+ * Fixed: PHP debug warning #3128
203
+ * Fixed: Proper alignment of description in Design-3 #3385
204
+ * Fixed: 'Modified Date' option not working when Date Format 'Traditional view' is selected #3383
205
+ * Fixed: When Parmalinks in "/index.php/%year%/%monthnum%/%day%/%postname%/" format category not working #3279
206
+ * Fixed: Separator Character's of Rank math plugin is not working on AMP pages #3335
207
+ * Fixed: SVG images not rendering in AMP #3208
208
+ * Fixed: Improvements code in Search form widget #3000
209
+ * Fixed: Dynamically change accordion-mod class name to reduce the styling size #3334
210
+ * Fixed: Social sticky icons to show on top as well as it is getting hidden behind sticky ads #3126
211
+ * Fixed: Font icons not loading in master and beta #3382
212
+ * Fixed: Yoast SEO Data not loading in AMP when 'Glue for Yoast SEO & AMP' plugin is active #3338
213
+ * Fixed: When AMP Comments is disabled, div of comments is loading #3345
214
+ * Fixed: Error 500 PHP 5.3.3 Fallback support #3333
215
+ * Fixed: Debug warnings after recent update #3400
216
+ * Fixed: Video sanitizer not allowing the "id" attribute #3406
217
+ * Fixed: Check if function_exists('get_rocket_option') #3417
218
+
219
+ = 0.9.97.62 (4th July 2019) =
220
  * Improvements: Change AddThis controls labels. #3359
221
  * Fixed: Alternative methods to sanitize(`sanitize_textarea_field`) for users who are using older then 4.7 #3394
222
  * Fixed: amp-addthis script is loading on WooCommerce product pages. #3393
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 0.9.97.62
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','0.9.97.62');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  // any changes to AMP_QUERY_VAR should be refelected here
26
  function ampforwp_generate_endpoint(){
@@ -207,18 +207,10 @@ function ampforwp_add_custom_rewrite_rules() {
207
  'top'
208
  );
209
  //Rewrite rule for custom Taxonomies
210
- $taxonomies = '';
211
- $taxonomies = get_transient('ampforwp_get_taxonomies');
212
- if ( false == $taxonomies ) {
213
- $args = array(
214
- 'public' => true,
215
- '_builtin' => false,
216
- );
217
- $output = 'names'; // or objects
218
- $operator = 'and'; // 'and' or 'or'
219
- $taxonomies = get_taxonomies( $args, $output, $operator );
220
- set_transient('ampforwp_get_taxonomies',$taxonomies);
221
- }
222
 
223
  if(!function_exists('amp_woocommerce_pro_add_woocommerce_support') ) {
224
  if( class_exists( 'WooCommerce' ) ) {
@@ -263,17 +255,24 @@ function ampforwp_add_custom_rewrite_rules() {
263
 
264
  $taxonomies = apply_filters( 'ampforwp_modify_rewrite_tax', $taxonomies );
265
  if ( $taxonomies ) {
266
- foreach ( $taxonomies as $key => $taxonomy ) {
267
- if ( ! empty( $taxonomy ) ) {
 
 
 
 
 
 
 
268
  add_rewrite_rule(
269
- $taxonomy.'\/(.+?)\/amp/?$',
270
- 'index.php?amp&'.$key.'=$matches[1]',
271
  'top'
272
  );
273
  // For Custom Taxonomies with pages
274
  add_rewrite_rule(
275
- $taxonomy.'\/(.+?)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
276
- 'index.php?amp&'.$taxonomy.'=$matches[1]&paged=$matches[2]',
277
  'top'
278
  );
279
  }
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.97.63
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','0.9.97.63');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  // any changes to AMP_QUERY_VAR should be refelected here
26
  function ampforwp_generate_endpoint(){
207
  'top'
208
  );
209
  //Rewrite rule for custom Taxonomies
210
+ if( function_exists('ampforwp_generate_taxonomies_transient')){
211
+ //Rewrite rule for custom Taxonomies
212
+ $taxonomies = ampforwp_generate_taxonomies_transient();
213
+ }
 
 
 
 
 
 
 
 
214
 
215
  if(!function_exists('amp_woocommerce_pro_add_woocommerce_support') ) {
216
  if( class_exists( 'WooCommerce' ) ) {
255
 
256
  $taxonomies = apply_filters( 'ampforwp_modify_rewrite_tax', $taxonomies );
257
  if ( $taxonomies ) {
258
+ $taxonomySlug = '';
259
+ foreach ( $taxonomies as $taxonomyName => $taxonomyLabel ) {
260
+ $taxonomies = get_taxonomy( $taxonomyName );
261
+ if(isset($taxonomies->rewrite['slug']) && !empty($taxonomies->rewrite['slug']) ){
262
+ $taxonomySlug = $taxonomies->rewrite['slug'];
263
+ }else{
264
+ $taxonomySlug = $taxonomyName;
265
+ }
266
+ if ( ! empty( $taxonomySlug ) ) {
267
  add_rewrite_rule(
268
+ $taxonomySlug.'\/([^/]+)\/amp/?$',
269
+ 'index.php?amp&'.$taxonomyName.'=$matches[1]',
270
  'top'
271
  );
272
  // For Custom Taxonomies with pages
273
  add_rewrite_rule(
274
+ $taxonomySlug.'\/([^/]+)\/amp\/'.$wp_rewrite->pagination_base.'\/?([0-9]{1,})\/?$',
275
+ 'index.php?amp&'.$taxonomyName.'=$matches[1]&paged=$matches[2]',
276
  'top'
277
  );
278
  }
changelog.txt CHANGED
@@ -1,6 +1,34 @@
1
  == Changelog ==
2
 
3
- = 0.9.97.62 (3rd July 2019) =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * Improvements: Change AddThis controls labels. #3359
5
  * Fixed: Alternative methods to sanitize(`sanitize_textarea_field`) for users who are using older then 4.7 #3394
6
  * Fixed: amp-addthis script is loading on WooCommerce product pages. #3393
1
  == Changelog ==
2
 
3
+ = 0.9.97.63 (9th July 2019) =
4
+ * Improvements: Custom Taxonomy support #3036
5
+ * Improvements: Option to change the Navigation part background color and element color for Design-3 #3034
6
+ * Improvements: Compatibility with the SEO Framework Plugin #2670
7
+ * Improvements: Facebook Messenger Icon in social share icons #2806
8
+ * Improvements: Option to change the Homepage Thumbnail size in design-3 theme #2986
9
+ * Improvements: Changed prefix class of whatsapp to Api #3369
10
+ * Improvements: Colour changing feature in Navigation bar in a design-2 #3059
11
+ * Improvements: Google Lighthouse Audit Score improved #3276
12
+ * Improvements: AMP option panel compatibility with a basix theme #3366
13
+ * Improvements: Template mode code improved #3357
14
+ * Fixed: PHP debug warning #3128
15
+ * Fixed: Proper alignment of description in Design-3 #3385
16
+ * Fixed: 'Modified Date' option not working when Date Format 'Traditional view' is selected #3383
17
+ * Fixed: When Parmalinks in "/index.php/%year%/%monthnum%/%day%/%postname%/" format category not working #3279
18
+ * Fixed: Separator Character's of Rank math plugin is not working on AMP pages #3335
19
+ * Fixed: SVG images not rendering in AMP #3208
20
+ * Fixed: Improvements code in Search form widget #3000
21
+ * Fixed: Dynamically change accordion-mod class name to reduce the styling size #3334
22
+ * Fixed: Social sticky icons to show on top as well as it is getting hidden behind sticky ads #3126
23
+ * Fixed: Font icons not loading in master and beta #3382
24
+ * Fixed: Yoast SEO Data not loading in AMP when 'Glue for Yoast SEO & AMP' plugin is active #3338
25
+ * Fixed: When AMP Comments is disabled, div of comments is loading #3345
26
+ * Fixed: Error 500 PHP 5.3.3 Fallback support #3333
27
+ * Fixed: Debug warnings after recent update #3400
28
+ * Fixed: Video sanitizer not allowing the "id" attribute #3406
29
+ * Fixed: Check if function_exists('get_rocket_option') #3417
30
+
31
+ = 0.9.97.62 (4th July 2019) =
32
  * Improvements: Change AddThis controls labels. #3359
33
  * Fixed: Alternative methods to sanitize(`sanitize_textarea_field`) for users who are using older then 4.7 #3394
34
  * Fixed: amp-addthis script is loading on WooCommerce product pages. #3393
components/components-core.php CHANGED
@@ -386,7 +386,8 @@ function amp_header_core(){
386
  <?php $thisTemplate->load_parts( array( 'style' ) ); ?>
387
  <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
388
  <?php do_action( 'amp_css', $thisTemplate ); ?>
389
- <?php $custom_css = ampforwp_get_setting('css_editor');
 
390
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
391
  echo $sanitized_css; ?>
392
  </style>
@@ -570,28 +571,29 @@ function amp_content($post_id= ''){
570
  }
571
 
572
  function amp_date( $args=array() ) {
573
-
574
- global $redux_builder_amp;
575
- if ( 2 == $redux_builder_amp['ampforwp-post-date-format'] ) {
576
  $args = array('format' => 'traditional');
577
  }
578
- if ( (isset($args['format']) && $args['format'] == 'traditional') || 'time' == $args ) {
579
- $post_date = get_the_date() . ' '. get_the_time();
580
- } else {
581
- $post_date = human_time_diff(
 
 
 
582
  get_the_time('U', get_the_ID() ),
583
- current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
584
  'ago');
585
- }
586
- $post_date = apply_filters('ampforwp_modify_post_date', $post_date);
587
- if(isset($args['custom_format']) && $args['custom_format']!=""){
588
- $post_date = date($args['custom_format'],get_the_time('U', get_the_ID() ));
589
- }
590
- if ( 'date' == $args || 'time' == $args ) {
591
- echo esc_attr($post_date) .' ';
592
- }
593
- else
594
- echo '<div class="loop-date">'.esc_attr($post_date).'</div>';
595
  }
596
 
597
  //Load font Compoment
386
  <?php $thisTemplate->load_parts( array( 'style' ) ); ?>
387
  <?php do_action( 'amp_post_template_css', $thisTemplate ); ?>
388
  <?php do_action( 'amp_css', $thisTemplate ); ?>
389
+ <?php $custom_css = ampforwp_get_setting('css_editor');
390
+ $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
391
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
392
  echo $sanitized_css; ?>
393
  </style>
571
  }
572
 
573
  function amp_date( $args=array() ) {
574
+ if ( 2 == ampforwp_get_setting('ampforwp-post-date-format') ) {
 
 
575
  $args = array('format' => 'traditional');
576
  }
577
+ if ( (isset($args['format']) && $args['format'] == 'traditional') && 2 == ampforwp_get_setting('ampforwp-post-date-global') ) {
578
+ $post_date = get_the_modified_date( get_option( 'date_format' )). ' '. get_the_modified_time();
579
+ }
580
+ elseif ( (isset($args['format']) && $args['format'] == 'traditional') || 'time' == $args ){
581
+ $post_date = get_the_date(). ' '. get_the_time();
582
+ }else{
583
+ $post_date = human_time_diff(
584
  get_the_time('U', get_the_ID() ),
585
+ current_time('timestamp') ) .' '. ampforwp_translation(ampforwp_get_setting('amp-translator-ago-date-text'),
586
  'ago');
587
+ }
588
+ $post_date = apply_filters('ampforwp_modify_post_date', $post_date);
589
+ if(isset($args['custom_format']) && $args['custom_format']!=""){
590
+ $post_date = date($args['custom_format'],get_the_time('U', get_the_ID() ));
591
+ }
592
+ if ( 'date' == $args || 'time' == $args ) {
593
+ echo esc_html( $post_date ) .' ';
594
+ }
595
+ else
596
+ echo '<div class="loop-date">'.esc_html( $post_date ).'</div>';
597
  }
598
 
599
  //Load font Compoment
components/loop/loop.php CHANGED
@@ -294,7 +294,7 @@ function amp_loop_title($data=array()){
294
  $tag = $data['tag'];
295
  }
296
  // if $data is in key & value pair
297
- $data_val = $data_attr = '';
298
  foreach ($data as $key => $value) {
299
  $data_attr .= $key;
300
  if( $key != 'attributes' && $key != 'tag' ){
@@ -305,7 +305,9 @@ function amp_loop_title($data=array()){
305
  }
306
  }
307
  // if $data key is attributes & tag
308
- $attr_val ='';
 
 
309
  if( (isset($data_attr) && false !== strpos($data_attr,'attributes')) || empty($data_attr) ){
310
  $attributes = 'class="loop-title"';
311
  if(isset($data['attributes']) && $data['attributes']!=""){
294
  $tag = $data['tag'];
295
  }
296
  // if $data is in key & value pair
297
+ $data_val = $data_attr = $attr_val = '';
298
  foreach ($data as $key => $value) {
299
  $data_attr .= $key;
300
  if( $key != 'attributes' && $key != 'tag' ){
305
  }
306
  }
307
  // if $data key is attributes & tag
308
+ if(!isset($data['attributes'])){
309
+ $data_attr = '';
310
+ }
311
  if( (isset($data_attr) && false !== strpos($data_attr,'attributes')) || empty($data_attr) ){
312
  $attributes = 'class="loop-title"';
313
  if(isset($data['attributes']) && $data['attributes']!=""){
includes/features/functions.php CHANGED
@@ -323,6 +323,15 @@ function ampforwp_generate_meta_desc($json=""){
323
  if ( function_exists('qode_header_meta') && 'bridge' == ampforwp_get_setting('ampforwp-seo-selection')){
324
  $desc = get_post_meta($post_id, "qode_seo_description", true);
325
  }
 
 
 
 
 
 
 
 
 
326
  // strip_shortcodes strategy not working here so had to do this way
327
  // strips shortcodes
328
  $desc = preg_replace('/\[(.*?)\]/','', $desc);
323
  if ( function_exists('qode_header_meta') && 'bridge' == ampforwp_get_setting('ampforwp-seo-selection')){
324
  $desc = get_post_meta($post_id, "qode_seo_description", true);
325
  }
326
+ // The SEO Framework
327
+ if ( function_exists( 'the_seo_framework' ) && 'seo_framework' == ampforwp_get_setting('ampforwp-seo-selection') ) {
328
+ $tsf_desc = $ampforwp_tsf = '';
329
+ $ampforwp_tsf = \the_seo_framework();
330
+ $tsf_desc = $ampforwp_tsf->get_description();
331
+ if ( $tsf_desc ) {
332
+ $desc = $tsf_desc;
333
+ }
334
+ }
335
  // strip_shortcodes strategy not working here so had to do this way
336
  // strips shortcodes
337
  $desc = preg_replace('/\[(.*?)\]/','', $desc);
includes/options/admin-config.php CHANGED
@@ -1317,7 +1317,23 @@ Redux::setArgs( "redux_builder_amp", $args );
1317
  'options' => ampforwp_get_cpt_generated_post_types(),
1318
  );
1319
  }
1320
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1321
  // AMP to WP Default value
1322
  function ampforwp_amp2wp_default(){
1323
  $default = 0;
@@ -1490,6 +1506,7 @@ Redux::setArgs( "redux_builder_amp", $args );
1490
  'required' => array('ampforwp-archive-support', '=' , '1')
1491
  ),
1492
  $amp_cpt_option,
 
1493
  array(
1494
  'id' => 'ampforwp-amp-convert-to-wp',
1495
  'type' => 'switch',
@@ -1554,6 +1571,9 @@ Redux::setArgs( "redux_builder_amp", $args );
1554
  elseif ( is_plugin_active('wp-seopress/seopress.php') ) {
1555
  $default = 'seopress';
1556
  }
 
 
 
1557
  return $default;
1558
  }
1559
  }
@@ -1604,7 +1624,8 @@ Redux::setArgs( "redux_builder_amp", $args );
1604
  'rank_math' => 'Rank Math SEO',
1605
  'genesis' => 'Genesis',
1606
  'seopress' => 'SEOPress',
1607
- 'bridge' => 'Bridge Qode SEO'
 
1608
  ),
1609
  'default' => ampforwp_seo_default(),
1610
  ),
@@ -3855,6 +3876,17 @@ Redux::setSection( $opt_name, array(
3855
  'required' => array(
3856
  array('amp-design-selector', '=' , '4')
3857
  )
 
 
 
 
 
 
 
 
 
 
 
3858
  ),
3859
  array(
3860
  'id' => 'amp-opt-color-rgba-headercolor',
@@ -3877,6 +3909,72 @@ Redux::setSection( $opt_name, array(
3877
  'required' => array(
3878
  array('amp-design-selector', '=' , '3')
3879
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3880
  ),
3881
  // Tab 1 end
3882
  // Tab 2
@@ -4349,14 +4447,40 @@ Redux::setSection( $opt_name, array(
4349
  'required' => array(array('amp-design-selector', '=' , '3') ),
4350
  'default' =>'1',
4351
  ),
4352
-
4353
- // Homepage thumbnail
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4354
  array(
4355
  'id' => 'ampforwp-homepage-posts-image-modify-size',
4356
  'type' => 'switch',
4357
- 'title' => esc_html__('Override Homepage Thumbnail Size', 'accelerated-mobile-pages'),
4358
- 'required' => array( array( 'amp-design-selector','!=',3 ) ),
4359
- 'default' => 0,
4360
  ),
4361
  array(
4362
  'class' => 'child_opt child_opt_arrow',
@@ -4384,6 +4508,30 @@ Redux::setSection( $opt_name, array(
4384
  array('ampforwp-homepage-posts-image-modify-size','=',1)
4385
  )
4386
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4387
  array(
4388
  'class' => 'child_opt',
4389
  'id' => 'ampforwp-swift-homepage-posts-width',
@@ -4408,34 +4556,6 @@ Redux::setSection( $opt_name, array(
4408
  array('ampforwp-homepage-posts-image-modify-size','=',1)
4409
  )
4410
  ),
4411
- array(
4412
- 'id' => 'ampforwp-homepage-section-loop',
4413
- 'type' => 'section',
4414
- 'title' => esc_html__('Loop Display Controls', 'accelerated-mobile-pages'),
4415
- 'indent' => true,
4416
- 'layout_type' => 'accordion',
4417
- 'accordion-open'=> 1,
4418
- ),
4419
- array(
4420
- 'id' => 'ampforwp-homepage-loop-type',
4421
- 'type' => 'select',
4422
- 'title' => esc_html__( 'Post Type in Loop', 'accelerated-mobile-pages' ),
4423
- 'options' => $ampforwp_home_loop,
4424
- 'default' => 'post',
4425
- ),
4426
- array(
4427
- 'id' => 'ampforwp-homepage-loop-cats',
4428
- 'type' => 'select',
4429
- 'title' => esc_html__( 'Exclude Categories', 'accelerated-mobile-pages' ),
4430
- 'data' => 'categories',
4431
- 'multi' => true
4432
- ),
4433
- array(
4434
- 'id' => 'ampforwp-homepage-loop-readmore-link',
4435
- 'type' => 'switch',
4436
- 'title' => esc_html__('Read More Link', 'accelerated-mobile-pages'),
4437
- 'default' => 0,
4438
- ),
4439
 
4440
 
4441
  )
@@ -5661,15 +5781,31 @@ else{
5661
  // Facebook app ID
5662
  array(
5663
  'id' => 'amp-facebook-app-id',
 
5664
  'title' => esc_html__('Facebook App ID', 'accelerated-mobile-pages'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5665
  'tooltip-subtitle' => sprintf( '%s <a style="color:#93FCFF;" href="%s" target="_blank">%s</a> %s <a style="color:#93FCFF;" href="%s" target="_blank">%s</a>',esc_html__('In order to use Facebook share you need to register an app ID','accelerated-mobile-pages'),esc_url("https://developers.facebook.com/apps"),esc_html__('here','accelerated-mobile-pages'),esc_html__('You can register one','accelerated-mobile-pages'),esc_url('https://developers.facebook.com/apps'),esc_html__('here','accelerated-mobile-pages') ),
5666
  'type' => 'text',
5667
- 'required' => array('enable-single-facebook-share', '=' , '1'),
5668
  'placeholder' => esc_html__('Enter your facebook app id','accelerated-mobile-pages'),
5669
  'default' => '',
5670
- 'required' => array(
5671
- array('amp-design-selector', '!=' , '4')
5672
- ),
5673
  ),
5674
  // Twitter ON/OFF
5675
  array(
1317
  'options' => ampforwp_get_cpt_generated_post_types(),
1318
  );
1319
  }
1320
+ function ampforwp_get_generated_custom_taxonomies(){
1321
+ $taxonomies = '';
1322
+ $taxonomies = get_transient('ampforwp_get_taxonomies');
1323
+ return $taxonomies;
1324
+ }
1325
+ $amp_custom_tax_option = array();
1326
+ $taxonomies = ampforwp_get_generated_custom_taxonomies();
1327
+ if( !empty($taxonomies) && $taxonomies != false){
1328
+ $amp_custom_tax_option = array(
1329
+ 'id' => 'ampforwp-custom-taxonomies',
1330
+ 'type' => 'select',
1331
+ 'title' => esc_html__('Custom Taxonomies', 'accelerated-mobile-pages'),
1332
+ 'tooltip-subtitle' => esc_html__('Enable AMP Support on Archives for Custom Taxonomies.', 'accelerated-mobile-pages'),
1333
+ 'multi' => true,
1334
+ 'options' => ampforwp_get_generated_custom_taxonomies(),
1335
+ );
1336
+ }
1337
  // AMP to WP Default value
1338
  function ampforwp_amp2wp_default(){
1339
  $default = 0;
1506
  'required' => array('ampforwp-archive-support', '=' , '1')
1507
  ),
1508
  $amp_cpt_option,
1509
+ $amp_custom_tax_option,
1510
  array(
1511
  'id' => 'ampforwp-amp-convert-to-wp',
1512
  'type' => 'switch',
1571
  elseif ( is_plugin_active('wp-seopress/seopress.php') ) {
1572
  $default = 'seopress';
1573
  }
1574
+ elseif ( function_exists( 'the_seo_framework' ) ) {
1575
+ $default = 'seo_framework';
1576
+ }
1577
  return $default;
1578
  }
1579
  }
1624
  'rank_math' => 'Rank Math SEO',
1625
  'genesis' => 'Genesis',
1626
  'seopress' => 'SEOPress',
1627
+ 'bridge' => 'Bridge Qode SEO',
1628
+ 'seo_framework' => 'The SEO Framework',
1629
  ),
1630
  'default' => ampforwp_seo_default(),
1631
  ),
3876
  'required' => array(
3877
  array('amp-design-selector', '=' , '4')
3878
  )
3879
+ ),
3880
+ array(
3881
+ 'id' => 'amp-d2-background-color',
3882
+ 'type' => 'color_rgba',
3883
+ 'title' => esc_html__('Header Background','accelerated-mobile-pages'),
3884
+ 'default' => array(
3885
+ 'color' => '#0a89c0',
3886
+ ),
3887
+ 'required' => array(
3888
+ array('amp-design-selector', '=' , '2')
3889
+ )
3890
  ),
3891
  array(
3892
  'id' => 'amp-opt-color-rgba-headercolor',
3909
  'required' => array(
3910
  array('amp-design-selector', '=' , '3')
3911
  )
3912
+ ),
3913
+ array(
3914
+ 'id' => 'amp-opt-color-rgba-menu-bg-color',
3915
+ 'type' => 'color_rgba',
3916
+ 'title' => esc_html__('Menu Background','accelerated-mobile-pages'),
3917
+ 'default' => array(
3918
+ 'color' => '#131313',
3919
+ ),
3920
+ 'required' => array(
3921
+ array('amp-design-selector', '=' , '3')
3922
+ )
3923
+ ),
3924
+ array(
3925
+ 'id' => 'amp-opt-color-rgba-menu-elements-color',
3926
+ 'type' => 'color_rgba',
3927
+ 'title' => esc_html__('Navigation Menu Color','accelerated-mobile-pages'),
3928
+ 'default' => array(
3929
+ 'color' => '#eeeeee',
3930
+ ),
3931
+ 'required' => array(
3932
+ array('amp-design-selector', '=' , '3')
3933
+ )
3934
+ ),
3935
+ array(
3936
+ 'id' => 'amp-opt-color-rgba-submenu-bgcolor',
3937
+ 'type' => 'color_rgba',
3938
+ 'title' => esc_html__('Sub Menu Background Color','accelerated-mobile-pages'),
3939
+ 'default' => array(
3940
+ 'color' => '#666666',
3941
+ ),
3942
+ 'required' => array(
3943
+ array('amp-design-selector', '=' , '3')
3944
+ )
3945
+ ),
3946
+ array(
3947
+ 'id' => 'amp-opt-color-rgba-submenu-hover-bgcolor',
3948
+ 'type' => 'color_rgba',
3949
+ 'title' => esc_html__('Sub Menu Hover Background Color','accelerated-mobile-pages'),
3950
+ 'default' => array(
3951
+ 'color' => '#666666',
3952
+ ),
3953
+ 'required' => array(
3954
+ array('amp-design-selector', '=' , '3')
3955
+ )
3956
+ ),
3957
+ array(
3958
+ 'id' => 'amp-opt-color-rgba-menu-label-color',
3959
+ 'type' => 'color_rgba',
3960
+ 'title' => esc_html__('Navigate Label Color','accelerated-mobile-pages'),
3961
+ 'default' => array(
3962
+ 'color' => '#aaa',
3963
+ ),
3964
+ 'required' => array(
3965
+ array('amp-design-selector', '=' , '3')
3966
+ )
3967
+ ),
3968
+ array(
3969
+ 'id' => 'amp-opt-color-rgba-menu-brdr-color',
3970
+ 'type' => 'color_rgba',
3971
+ 'title' => esc_html__('Menu Border Color','accelerated-mobile-pages'),
3972
+ 'default' => array(
3973
+ 'color' => '#555555',
3974
+ ),
3975
+ 'required' => array(
3976
+ array('amp-design-selector', '=' , '3')
3977
+ )
3978
  ),
3979
  // Tab 1 end
3980
  // Tab 2
4447
  'required' => array(array('amp-design-selector', '=' , '3') ),
4448
  'default' =>'1',
4449
  ),
4450
+ array(
4451
+ 'id' => 'ampforwp-homepage-section-loop',
4452
+ 'type' => 'section',
4453
+ 'title' => esc_html__('Loop Display Controls', 'accelerated-mobile-pages'),
4454
+ 'indent' => true,
4455
+ 'layout_type' => 'accordion',
4456
+ 'accordion-open'=> 1,
4457
+ ),
4458
+ array(
4459
+ 'id' => 'ampforwp-homepage-loop-type',
4460
+ 'type' => 'select',
4461
+ 'title' => esc_html__( 'Post Type in Loop', 'accelerated-mobile-pages' ),
4462
+ 'options' => $ampforwp_home_loop,
4463
+ 'default' => 'post',
4464
+ ),
4465
+ array(
4466
+ 'id' => 'ampforwp-homepage-loop-cats',
4467
+ 'type' => 'select',
4468
+ 'title' => esc_html__( 'Exclude Categories', 'accelerated-mobile-pages' ),
4469
+ 'data' => 'categories',
4470
+ 'multi' => true
4471
+ ),
4472
+ array(
4473
+ 'id' => 'ampforwp-homepage-loop-readmore-link',
4474
+ 'type' => 'switch',
4475
+ 'title' => esc_html__('Read More Link', 'accelerated-mobile-pages'),
4476
+ 'default' => 0,
4477
+ ),
4478
+ // Homepage thumbnail
4479
  array(
4480
  'id' => 'ampforwp-homepage-posts-image-modify-size',
4481
  'type' => 'switch',
4482
+ 'title' => esc_html__('Change Image Size', 'accelerated-mobile-pages'),
4483
+ 'default' => 0,
 
4484
  ),
4485
  array(
4486
  'class' => 'child_opt child_opt_arrow',
4508
  array('ampforwp-homepage-posts-image-modify-size','=',1)
4509
  )
4510
  ),
4511
+ array(
4512
+ 'class' => 'child_opt',
4513
+ 'id' => 'ampforwp-design-3-homepage-posts-width',
4514
+ 'type' => 'text',
4515
+ 'title' => esc_html__('Image Width', 'accelerated-mobile-pages'),
4516
+ 'tooltip-subtitle' => esc_html__('Defaults to 300', 'accelerated-mobile-pages'),
4517
+ 'default' => 300,
4518
+ 'required' => array(
4519
+ array('amp-design-selector','=',3),
4520
+ array('ampforwp-homepage-posts-image-modify-size','=',1)
4521
+ )
4522
+ ),
4523
+ array(
4524
+ 'class' => 'child_opt',
4525
+ 'id' => 'ampforwp-design-3-homepage-posts-height',
4526
+ 'type' => 'text',
4527
+ 'title' => esc_html__('Image Height', 'accelerated-mobile-pages'),
4528
+ 'tooltip-subtitle' => esc_html__('Defaults to 300', 'accelerated-mobile-pages'),
4529
+ 'default' => 300,
4530
+ 'required' => array(
4531
+ array('amp-design-selector','=',3),
4532
+ array('ampforwp-homepage-posts-image-modify-size','=',1)
4533
+ )
4534
+ ),
4535
  array(
4536
  'class' => 'child_opt',
4537
  'id' => 'ampforwp-swift-homepage-posts-width',
4556
  array('ampforwp-homepage-posts-image-modify-size','=',1)
4557
  )
4558
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4559
 
4560
 
4561
  )
5781
  // Facebook app ID
5782
  array(
5783
  'id' => 'amp-facebook-app-id',
5784
+ 'class' => 'child_opt child_opt_arrow',
5785
  'title' => esc_html__('Facebook App ID', 'accelerated-mobile-pages'),
5786
+ 'tooltip-subtitle' => esc_html__('In order to use Facebook share you need to register an app ID, <a href="https://developers.facebook.com/apps" style="color:#93FCFF;" >You can register one here: https://developers.facebook.com/apps.', 'accelerated-mobile-pages'),
5787
+ 'type' => 'text',
5788
+ 'required' => array(array('enable-single-facebook-share', '=' , '1'),array('amp-design-selector', '!=' , '4')),
5789
+ 'placeholder' => esc_html__('Enter your facebook app id','accelerated-mobile-pages'),
5790
+ 'default' => '',
5791
+ ),
5792
+ // Facebook Messenger ON/OFF
5793
+ array(
5794
+ 'id' => 'enable-single-facebook-share-messenger',
5795
+ 'type' => 'switch',
5796
+ 'title' => esc_html__('Facebook Messenger', 'accelerated-mobile-pages'),
5797
+ 'default' => 0,
5798
+ ),
5799
+ // Facebook app ID
5800
+ array(
5801
+ 'id' => 'amp-facebook-app-id-messenger',
5802
+ 'title' => esc_html__('Facebook App ID', 'accelerated-mobile-pages'),
5803
+ 'class' => 'child_opt child_opt_arrow',
5804
  'tooltip-subtitle' => sprintf( '%s <a style="color:#93FCFF;" href="%s" target="_blank">%s</a> %s <a style="color:#93FCFF;" href="%s" target="_blank">%s</a>',esc_html__('In order to use Facebook share you need to register an app ID','accelerated-mobile-pages'),esc_url("https://developers.facebook.com/apps"),esc_html__('here','accelerated-mobile-pages'),esc_html__('You can register one','accelerated-mobile-pages'),esc_url('https://developers.facebook.com/apps'),esc_html__('here','accelerated-mobile-pages') ),
5805
  'type' => 'text',
5806
+ 'required' => array('enable-single-facebook-share-messenger', '=' , '1'),
5807
  'placeholder' => esc_html__('Enter your facebook app id','accelerated-mobile-pages'),
5808
  'default' => '',
 
 
 
5809
  ),
5810
  // Twitter ON/OFF
5811
  array(
includes/redirect.php CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
7
  add_action( 'template_redirect', 'ampforwp_redirection', 10 );
8
  function ampforwp_redirection() {
9
  global $redux_builder_amp, $wp, $post;
10
- $hide_cats_amp = $url = $archive_check = $go_to_url = '';
11
  $hide_cats_amp = is_category_amp_disabled();
12
  // No redirection if Post/Page is AMP Disabled #3287
13
  if ( ( is_singular() || ampforwp_is_front_page() || ampforwp_is_blog() ) && 'hide-amp' == get_post_meta( ampforwp_get_the_ID(),'ampforwp-amp-on-off',true) ) {
@@ -15,10 +15,23 @@ function ampforwp_redirection() {
15
  }
16
  // Redirection for Homepage and Archive Pages when Turned Off from options panel
17
  if ( ampforwp_is_amp_endpoint() ) {
18
- if( (is_archive() && 0 == ampforwp_get_setting('ampforwp-archive-support')) || (is_category() && 0 == ampforwp_get_setting('ampforwp-archive-support-cat')) || (is_tag() && 0 == ampforwp_get_setting('ampforwp-archive-support-tag')) ){
19
- $archive_check = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
- if ( ( true == $archive_check ) || true == $hide_cats_amp || ((ampforwp_is_home() || ampforwp_is_front_page()) && 0 == ampforwp_get_setting('ampforwp-homepage-on-off-support')) ) {
22
  $url = $wp->request;
23
  if( ampforwp_is_home() && get_query_var('amp') ) {
24
  $url = 'amp';
7
  add_action( 'template_redirect', 'ampforwp_redirection', 10 );
8
  function ampforwp_redirection() {
9
  global $redux_builder_amp, $wp, $post;
10
+ $hide_cats_amp = $url = $archive_check = $go_to_url = $archive_check_tax = '';
11
  $hide_cats_amp = is_category_amp_disabled();
12
  // No redirection if Post/Page is AMP Disabled #3287
13
  if ( ( is_singular() || ampforwp_is_front_page() || ampforwp_is_blog() ) && 'hide-amp' == get_post_meta( ampforwp_get_the_ID(),'ampforwp-amp-on-off',true) ) {
15
  }
16
  // Redirection for Homepage and Archive Pages when Turned Off from options panel
17
  if ( ampforwp_is_amp_endpoint() ) {
18
+ if(is_tax()){
19
+ $term_id = get_queried_object()->term_id;
20
+ $term = get_term( $term_id );
21
+ $taxonomy_name = $term->taxonomy;
22
+
23
+ $custom_taxonomies = ampforwp_get_setting('ampforwp-custom-taxonomies');
24
+ if(!empty($custom_taxonomies)){
25
+ if(( is_archive() && !in_array( $taxonomy_name,$custom_taxonomies) ) ){
26
+ $archive_check_tax = true;
27
+ }
28
+ }
29
+ }else{
30
+ if( (is_archive() && 0 == ampforwp_get_setting('ampforwp-archive-support')) || (is_category() && 0 == ampforwp_get_setting('ampforwp-archive-support-cat')) || (is_tag() && 0 == ampforwp_get_setting('ampforwp-archive-support-tag')) ){
31
+ $archive_check = true;
32
+ }
33
  }
34
+ if ( (true == $archive_check_tax) || ( true == $archive_check ) || true == $hide_cats_amp || ((ampforwp_is_home() || ampforwp_is_front_page()) && 0 == ampforwp_get_setting('ampforwp-homepage-on-off-support')) ) {
35
  $url = $wp->request;
36
  if( ampforwp_is_home() && get_query_var('amp') ) {
37
  $url = 'amp';
includes/vendor/amp/includes/sanitizers/class-amp-blacklist-sanitizer.php CHANGED
@@ -43,6 +43,10 @@ class AMP_Blacklist_Sanitizer extends AMP_Base_Sanitizer {
43
  if ( $href ){
44
  $node->setAttribute('href',\ampforwp_findInternalUrl($href));
45
  }
 
 
 
 
46
  }
47
 
48
  // Some nodes may contain valid content but are themselves invalid.
43
  if ( $href ){
44
  $node->setAttribute('href',\ampforwp_findInternalUrl($href));
45
  }
46
+ // Adding rel="noreferrer" to external links to prevent security vulnerabilities #3276
47
+ if ( \ampforwp_isexternal($href) ) {
48
+ $node->setAttribute('rel', 'noreferrer');
49
+ }
50
  }
51
 
52
  // Some nodes may contain valid content but are themselves invalid.
includes/vendor/amp/includes/sanitizers/class-amp-img-sanitizer.php CHANGED
@@ -102,7 +102,9 @@ class AMP_Img_Sanitizer extends AMP_Base_Sanitizer {
102
  if ( is_numeric( $node->getAttribute( 'height' ) ) && isset( $dimensions['height'] ) && 0 !== $dimensions['height'] && isset( $dimensions['width'] ) ) {
103
  $width = round( ( floatval( $node->getAttribute( 'height' ) ) * $dimensions['width'] ) / $dimensions['height'] );
104
  }
105
-
 
 
106
  $node->setAttribute( 'width', $width );
107
  if ( ! isset( $dimensions['width'] ) ) {
108
  $class .= ' amp-wp-unknown-width';
@@ -114,7 +116,9 @@ class AMP_Img_Sanitizer extends AMP_Base_Sanitizer {
114
  if ( is_numeric( $node->getAttribute( 'width' ) ) && isset( $dimensions['width'] ) && 0 !== $dimensions['width'] && isset( $dimensions['height'] ) ) {
115
  $height = round( ( floatval( $node->getAttribute( 'width' ) ) * $dimensions['height'] ) / $dimensions['width'] );
116
  }
117
-
 
 
118
  $node->setAttribute( 'height', $height );
119
  if ( ! isset( $dimensions['height'] ) ) {
120
  $class .= ' amp-wp-unknown-height';
102
  if ( is_numeric( $node->getAttribute( 'height' ) ) && isset( $dimensions['height'] ) && 0 !== $dimensions['height'] && isset( $dimensions['width'] ) ) {
103
  $width = round( ( floatval( $node->getAttribute( 'height' ) ) * $dimensions['width'] ) / $dimensions['height'] );
104
  }
105
+ if($width==0){
106
+ $width = self::FALLBACK_WIDTH;
107
+ }
108
  $node->setAttribute( 'width', $width );
109
  if ( ! isset( $dimensions['width'] ) ) {
110
  $class .= ' amp-wp-unknown-width';
116
  if ( is_numeric( $node->getAttribute( 'width' ) ) && isset( $dimensions['width'] ) && 0 !== $dimensions['width'] && isset( $dimensions['height'] ) ) {
117
  $height = round( ( floatval( $node->getAttribute( 'width' ) ) * $dimensions['height'] ) / $dimensions['width'] );
118
  }
119
+ if($height==0){
120
+ $height = self::FALLBACK_HEIGHT;
121
+ }
122
  $node->setAttribute( 'height', $height );
123
  if ( ! isset( $dimensions['height'] ) ) {
124
  $class .= ' amp-wp-unknown-height';
includes/vendor/amp/includes/sanitizers/class-amp-video-sanitizer.php CHANGED
@@ -83,6 +83,7 @@ class AMP_Video_Sanitizer extends AMP_Base_Sanitizer {
83
  case 'poster':
84
  case 'class':
85
  case 'sizes':
 
86
  $out[ $name ] = $value;
87
  break;
88
 
83
  case 'poster':
84
  case 'class':
85
  case 'sizes':
86
+ case 'id':
87
  $out[ $name ] = $value;
88
  break;
89
 
includes/vendor/vendor-changelog.txt CHANGED
@@ -75,4 +75,6 @@ Reason: To extend the functionality of sidebars and Pagebuilder
75
  45. Added a filter called ampforwp_featured_image_size, so users can change the default size of featured image in single post. #2896
76
  46. Class-amp-gallery-block-sanitizer file updated for Gallery with GIF Image not working issue #3304
77
  47. class-amp-allowed-tag-generated.php added amp-recaptcha-input support #3315
78
- 48. Image sanitizer updated #3112
 
 
75
  45. Added a filter called ampforwp_featured_image_size, so users can change the default size of featured image in single post. #2896
76
  46. Class-amp-gallery-block-sanitizer file updated for Gallery with GIF Image not working issue #3304
77
  47. class-amp-allowed-tag-generated.php added amp-recaptcha-input support #3315
78
+ 48. Image sanitizer updated #3112
79
+ 49. class-amp-blacklist-sanitizer.php updated #3276
80
+ 50. Added id atttribute allowed in amp-video sanitizer #3406
pagebuilder/inc/viewShowFrontData.php CHANGED
@@ -496,7 +496,7 @@ function amppb_validateCss($css){
496
  $css = (esc_html($css));
497
  $css = str_replace('&quot;', '"', $css);
498
  $css = preg_replace('/@media([^\r\n,{}]+){\s*}/', "", $css);
499
- $css = str_replace(array('.amppb-fluid','.amppb-fixed'), array('.ap-fl','.ap-fi'), $css);
500
  $css = preg_replace('/(([a-z -]*:(\s)*;))/', "", $css);
501
  $css = preg_replace('/((;[\s\n;]*;))/', ";", $css);
502
  $css = preg_replace('/(?:[^\r\n,{}]+)(?:,(?=[^}]*{,)|\s*{[\s]*})/', "", $css);
@@ -1034,6 +1034,9 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
1034
  $moduleFrontHtml = str_replace('{{repeater_max_count}}', $repeaterUniqueId, $moduleFrontHtml);
1035
  $moduleFrontHtml = ampforwp_replaceIfContentConditional('repeater_max_count', $repeaterUniqueId, $moduleFrontHtml);
1036
  }
 
 
 
1037
  $html .= "<div class='amp_mod ap_m_".$contentArray['cell_id'].' '.$contentArray['type']."'>".$moduleFrontHtml;
1038
  $html .= '</div>';
1039
  /*if($contentArray['type']=="text"){
496
  $css = (esc_html($css));
497
  $css = str_replace('&quot;', '"', $css);
498
  $css = preg_replace('/@media([^\r\n,{}]+){\s*}/', "", $css);
499
+ $css = str_replace(array('.amppb-fluid','.amppb-fixed','.accordion-mod'), array('.ap-fl','.ap-fi','.apac'), $css);
500
  $css = preg_replace('/(([a-z -]*:(\s)*;))/', "", $css);
501
  $css = preg_replace('/((;[\s\n;]*;))/', ";", $css);
502
  $css = preg_replace('/(?:[^\r\n,{}]+)(?:,(?=[^}]*{,)|\s*{[\s]*})/', "", $css);
1034
  $moduleFrontHtml = str_replace('{{repeater_max_count}}', $repeaterUniqueId, $moduleFrontHtml);
1035
  $moduleFrontHtml = ampforwp_replaceIfContentConditional('repeater_max_count', $repeaterUniqueId, $moduleFrontHtml);
1036
  }
1037
+ if($contentArray['type'] == 'accordion-mod'){
1038
+ $contentArray['type'] = str_replace('accordion-mod', 'apac', $contentArray['type']);
1039
+ }
1040
  $html .= "<div class='amp_mod ap_m_".$contentArray['cell_id'].' '.$contentArray['type']."'>".$moduleFrontHtml;
1041
  $html .= '</div>';
1042
  /*if($contentArray['type']=="text"){
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
- Stable tag: 0.9.97.62
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,58 +190,32 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
193
- = 0.9.97.62 (3rd July 2019) =
194
- * Improvements: Change AddThis controls labels. #3359
195
- * Fixed: Alternative methods to sanitize(`sanitize_textarea_field`) for users who are using older then 4.7 #3394
196
- * Fixed: amp-addthis script is loading on WooCommerce product pages. #3393
197
- * Fixed: Page titles are changing when Rank math plugin active #3358
198
- * Fixed: Icons added in featured image caption not working properly with font awesome #3288
199
-
200
- = 0.9.97.61 (2nd July 2019) =
201
- * Improvements: AMP option panel for better enhancement #2432
202
- * Improvements: Lighthouse score improved in all designs #3108
203
- * Improvements: Option to change featured image size in the AMP panel's single settings [ only in Swift theme] #3339
204
- * Improvements: Clicky Analytic compatibility integrated #3220
205
- * Improvements: Some Improvements in image sanitizer #3112
206
- * Improvements: Gallery Design integrated in Facebook instant article #3143
207
- * Improvements: Featured Video Plus plugin compatibility integrated #2583
208
- * Improvements: Performance improvement ! SELECT SQL_CALC_FOUND_ROWS #3336
209
- * Improvements: 'Featured Image from URL' plugin compatibility integrated #3365
210
- * Improvements: Template-mode functionality added for group users to work on the main/AMP theme #3252
211
- * Fixed: Images are blur in beta in design 2 #2541
212
- * Fixed: SRC set in the Featured Image #1619
213
- * Fixed: AMP page builder is not showing when the AMPforWP plugin is activated from Network admin panel in Multisite #3322
214
- * Fixed: AMP Panel options code improved - 2 #3083
215
- * Fixed: Fatal error with an older version of Wordpress #3094
216
- * Fixed: Extra option in Analytics section removed #3037
217
- * Fixed: ?nonamp=1 should redirect to normal url #3269
218
- * Fixed: Recent comments shows first in ascending order #3325
219
- * Fixed: Footnotes not working properly #2982
220
- * Fixed: On twitter share Via twitter handle name is not shown in the tweet beside Url in Design-Swift #3286
221
- * Fixed: Fatal Error when activate quadmenu plugin #3308
222
- * Fixed: Default schema generated Page (Migrated from AMPforWP) or post (Migrated from AMPforWP)'s Target Location is showing empty by default #3343
223
- * Fixed: When auto add amp in menu option is enabled it is rendering the cache version menu for WPML site #3251
224
- * Fixed: External URL not working with Revolution Slider #3218
225
- * Fixed: Images are getting distorted in AMP when the lazy loading option is enabled in the WoodMart theme settings #3254
226
- * Fixed: More variables support in Advanced Google Analytics #3281
227
- * Fixed: When amp takeover is enabled, /amp is added at the end of category module url #3367
228
- * Fixed: Auto Add AMP in Menu URL option is is not working for the product category #3319
229
- * Fixed: Swift Theme has doublequotes in related Post quotes issue #3045
230
- * Fixed: Wordpress Spanish language does not showing "Design" tab #3342
231
- * Fixed: Tittle attribute not generates in related posts in all designs #3346
232
- * Fixed: AMP optin short code is not rendering in AMP from footer widget #3349
233
- * Fixed: Single post main title should be H1 and sub title should be H2 or H3 in design-1 #3350
234
- * Fixed: ampforwp_the_content_filter_full function hook changed to work minify option in AMP cache plugin #3355
235
- * Fixed: AMP is not working due to JCH Optimize Pro plugin #3185
236
- * Fixed: AMP validation warning when Google Tag Manager Advanced Option is enabled #2660
237
- * Fixed: PHP Warning implode() Invalid arguments passed when Enfold theme is activate #3307
238
- * Fixed: Mobile redirection not working properly #3370
239
- * Fixed: Redirection code improved #3326
240
- * Fixed: Yoast Description does not output #3374
241
- * Fixed: Debug errors after 0.9.97.60 #3377
242
- * Fixed: Code improvements in loadComponents() #3384
243
- * Fixed: License key is visible in Source code #2528
244
- * Fixed: Fatal error can't use function return value in write context - 2 #3087
245
- * Fixed: Code improvements #3388
246
 
247
  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.2.2
7
+ Stable tag: 0.9.97.63
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
190
 
191
  == Changelog ==
192
 
193
+ = 0.9.97.63 (9th July 2019) =
194
+ * Improvements: Custom Taxonomy support #3036
195
+ * Improvements: Option to change the Navigation part background color and element color for Design-3 #3034
196
+ * Improvements: Compatibility with the SEO Framework Plugin #2670
197
+ * Improvements: Facebook Messenger Icon in social share icons #2806
198
+ * Improvements: Option to change the Homepage Thumbnail size in design-3 theme #2986
199
+ * Improvements: Changed prefix class of whatsapp to Api #3369
200
+ * Improvements: Colour changing feature in Navigation bar in a design-2 #3059
201
+ * Improvements: Google Lighthouse Audit Score improved #3276
202
+ * Improvements: AMP option panel compatibility with a basix theme #3366
203
+ * Improvements: Template mode code improved #3357
204
+ * Fixed: PHP debug warning #3128
205
+ * Fixed: Proper alignment of description in Design-3 #3385
206
+ * Fixed: 'Modified Date' option not working when Date Format 'Traditional view' is selected #3383
207
+ * Fixed: When Parmalinks in "/index.php/%year%/%monthnum%/%day%/%postname%/" format category not working #3279
208
+ * Fixed: Separator Character's of Rank math plugin is not working on AMP pages #3335
209
+ * Fixed: SVG images not rendering in AMP #3208
210
+ * Fixed: Improvements code in Search form widget #3000
211
+ * Fixed: Dynamically change accordion-mod class name to reduce the styling size #3334
212
+ * Fixed: Social sticky icons to show on top as well as it is getting hidden behind sticky ads #3126
213
+ * Fixed: Font icons not loading in master and beta #3382
214
+ * Fixed: Yoast SEO Data not loading in AMP when 'Glue for Yoast SEO & AMP' plugin is active #3338
215
+ * Fixed: When AMP Comments is disabled, div of comments is loading #3345
216
+ * Fixed: Error 500 PHP 5.3.3 Fallback support #3333
217
+ * Fixed: Debug warnings after recent update #3400
218
+ * Fixed: Video sanitizer not allowing the "id" attribute #3406
219
+ * Fixed: Check if function_exists('get_rocket_option') #3417
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
 
221
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-1/elements/social-icons.php CHANGED
@@ -1,11 +1,15 @@
1
  <?php global $redux_builder_amp;
2
  // Social share in AMP
3
- $amp_permalink = "";
 
4
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
5
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
6
  } else{
7
  $amp_permalink = get_the_permalink();
8
  }
 
 
 
9
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
10
  $permalink = '';
11
  if(ampforwp_get_setting('enable-single-twitter-share-link')){
@@ -29,6 +33,13 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
29
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
30
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
31
  <?php } ?>
 
 
 
 
 
 
 
32
  <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
33
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
34
  <amp-social-share type="twitter"
@@ -52,7 +63,7 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
52
  <amp-social-share type="linkedin" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
53
  <?php } ?>
54
  <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
55
- <a title="whatsapp share" <?php ampforwp_nofollow_social_links(); ?> href="whatsapp://send?text=<?php echo esc_url($amp_permalink); ?>">
56
  <div class="amp-social-icon">
57
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB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M2NC02LjAyNS03LjQ0MWMtMC42MzEtMS4wNzUtMC4wNjYtMS42NTYsMC40NzUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
58
  </div>
1
  <?php global $redux_builder_amp;
2
  // Social share in AMP
3
+ $amp_permalink = $facebook_app_id = $amp_permalink_fb_messenger = '';
4
+ $facebook_app_id = ampforwp_get_setting('amp-facebook-app-id-messenger');
5
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
6
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
7
  } else{
8
  $amp_permalink = get_the_permalink();
9
  }
10
+ if($facebook_app_id){
11
+ $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
12
+ }
13
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
14
  $permalink = '';
15
  if(ampforwp_get_setting('enable-single-twitter-share-link')){
33
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
34
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
35
  <?php } ?>
36
+ <?php if ( true == ampforwp_get_setting('enable-single-facebook-share-messenger') ) { ?>
37
+ <a title="facebookmessenger share" <?php ampforwp_nofollow_social_links(); ?> href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>" target="_blank">
38
+ <div class="amp-social-icon amp-social-facebookmessenger">
39
+ <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
40
+ </div>
41
+ </a>
42
+ <?php } ?>
43
  <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
44
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
45
  <amp-social-share type="twitter"
63
  <amp-social-share type="linkedin" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
64
  <?php } ?>
65
  <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
66
+ <a title="whatsapp share" <?php ampforwp_nofollow_social_links(); ?> href="https://api.whatsapp.com/send?text=<?php echo esc_url($amp_permalink); ?>">
67
  <div class="amp-social-icon">
68
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBl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2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
69
  </div>
templates/design-manager/design-1/style.php CHANGED
@@ -74,14 +74,20 @@ blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background:
74
  <?php if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
75
  .amp-disqus-comments { text-align:center } .amp-disqus-comments {padding: 15px;}.amp-disqus-comments amp-iframe{background: none;} <?php
76
  } ?>
77
- .wp-caption {padding: 0;}.wp-caption.alignleft {margin-right: 16px;}.wp-caption.alignright { margin-left: 16px;}.wp-caption-text {border-bottom: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 0;padding: .66em 10px .75em;text-align: center;} amp-carousel {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em;} amp-iframe,amp-youtube,amp-instagram,amp-vine {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em; } .amp-wp-article-content amp-carousel amp-img {border: none;} amp-carousel > amp-img > img {object-fit: contain; } .amp-wp-iframe-placeholder { background: <?php echo sanitize_hex_color( $border_color ); ?> url( <?php echo esc_url( $get_customizer->get( 'placeholder_image_url' ) ); ?> ) no-repeat center 40%;background-size: 48px 48px;min-height: 48px;} .amp-wp-article-footer .amp-wp-meta {display: block;} .amp-wp-tags{ list-style-type: none; padding: 0; margin: 0 0 9px 0; display: inline-flex; } .amp-wp-tags li{display:inline; padding-left: 5px; } .amp-wp-tax-category span{margin-right:5px;} .amp-wp-tax-category, .amp-wp-tax-tag { color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 1.5em 16px;}.ampforwp-comment-button {margin-bottom:20px;} .amp-wp-comments-link {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;text-align: center;margin: 2.25em 0 1.5em;} .amp-wp-comments-link a { border-style: solid;border-color: <?php echo sanitize_hex_color( $border_color ); ?>;border-width: 1px 1px 2px;border-radius: 4px;background-color: transparent;color: <?php echo sanitize_hex_color( $link_color ); ?>;cursor: pointer; display: block;font-size: 14px;font-weight: 600;line-height: 18px;margin: 0 auto;max-width: 200px;padding: 11px 16px;text-decoration: none;width: 50%;-webkit-transition: background-color 0.2s ease;transition: background-color 0.2s ease;} .page-title {margin: 0 15px; font-size: 1.17em; }.amp-sub-archives li{width: 50%;} .amp-sub-archives ul{padding: 0;list-style: none;display: flex;font-size: 12px;line-height: 1.2;margin: 5px 1.5em 10px 1.5em;} .author-archive amp-img{border-radius: 50%;margin: 0px 8px 10px;display: block;}.author-archive{float: left;} .amp-wp-footer {border-top: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;margin: calc(1.5em - 1px) 0 0;padding-bottom:25px;}
78
  .amp-wp-footer div{margin:0 auto;max-width:calc(840px - 32px);padding:1.25em 16px;position:relative}.amp-wp-footer h2{font-size:1em;line-height:1.375em;margin:0 0 .5em}
79
  .amp-wp-footer p {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .8em;line-height: 1.5em;margin: 0 15px 0 0;}
80
  .amp-wp-footer a{text-decoration:none}.copyright_txt{float:left}.back-to-top{float:right}.amp-wp-header .nav_container{float: right;top: 16px;line-height: 1; right: 65px; position: absolute}.toggle-text{position:absolute;right:0;height:22px;width:28px}.toggle-text span{display:block;position:absolute;height:2px;width:25px;background:#fff;border-radius:19px;opacity:1;left:0}.toggle-text span:nth-child(2){top:9px}.toggle-text span:nth-child(3){top:18px}.amp-wp-home .amp-wp-meta{margin:5px 0}.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 ); ?>;}.comment-button-wrapper a,.related_posts ol{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}
81
  <?php if(!checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){ ?>
82
  #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}.ampforwp-social-icons{margin:1.5em 16px}.amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; margin-bottom:5px; }
83
  .amp-social-icon amp-img{ top: 4px; }
84
-
 
 
 
 
 
 
85
  <?php if ( true == ampforwp_get_setting('enable-single-line-share') ) { ?>
86
  .custom-amp-socialsharing-line{background:#00b900}
87
  <?php } ?>
@@ -126,7 +132,23 @@ blockquote {color: <?php echo sanitize_hex_color( $text_color ); ?>;background:
126
 
127
 
128
  .comments_list ul li p{margin:0;font-size:14px;clear:both;padding-top:5px; word-break:break-word;}
129
- .comments_list ul li{font-family:sans-serif;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 p{font-family:Merriweather,'Times New Roman',Times,Serif}.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;}<?php } ?>amp-sidebar{width:250px}.amp-sidebar-image{line-height:100px;vertical-align:middle}.amp-close-image{top:15px;left:225px;cursor:pointer}.toggle-navigationv2 ul{list-style-type:none;margin:0;font-family:sans-serif;padding:0}.toggle-navigationv2 ul ul li a{padding-left:35px;background:#fff;display:inline-block}.toggle-navigationv2 ul li a{padding:10px 15px 10px 25px;width:100%;text-decoration:none;background:#fafafa;font-size:13px;border-bottom:1px solid #efefef}.close-nav{font-size:12px;font-family:sans-serif;background:rgba(0,0,0,.25);letter-spacing:1px;padding:10px;border-radius:100px;line-height:8px;margin:14px;left:191px;color:#fff}.close-nav:hover{background:rgba(0,0,0,.45)}.toggle-navigation ul{list-style-type:none;margin:0;padding:0;width:100%}.menu-all-pages-container:after{content:"";clear:both}.toggle-navigation ul li{font-size:13px;border-bottom:1px solid rgba(0,0,0,.11);padding:11px 0;width:25%;float:left;text-align:center;margin-top:6px}.toggle-navigation ul ul{display:none}.toggle-navigation ul li a{color:#eee;padding:15px}.toggle-navigation{display:none;background:#444}.nav_container:hover+.toggle-navigation,.toggle-navigation:active,.toggle-navigation:focus,.toggle-navigation:hover{display:inline-block;width:100%}#amp-user-notification1 p{display:inline-block}amp-user-notification{padding:5px;text-align:center;background:#fff;border-top:1px solid} amp-user-notification button {padding: 8px 10px;background: <?php echo sanitize_hex_color( $header_background_color ); ?>;color: <?php echo sanitize_hex_color( $header_color ); ?>;margin-left: 5px;border: 0;}.amp-not-privacy{color:<?php echo sanitize_hex_color( $header_background_color ); ?>;text-decoration: none;font-size: 15px;}amp-user-notification button:hover {cursor: pointer} .amp-ad-wrapper {text-align: center} <?php if( $redux_builder_amp['enable-single-social-icons'] == true && is_single() ) { ?>body {padding-bottom: 43px;}<?php } ?> .sticky_social a{text-decoration:none}.sticky_social{width:100%;bottom:0;display:block;left:0;box-shadow:0 4px 7px #000;background:#fff;padding:7px 0 0;position:fixed;margin:0;z-index:10;text-align:center}.whatsapp-share-icon{width:50px;height:28px;display:inline-block;background:#5cbe4a;padding:4px 0;position:relative;top:-4px}.amp-wp-tax-category span:first-child:after{content:' '}.amp-wp-tax-category span:after,.amp-wp-tax-tag span:after{content:', '}.amp-wp-tax-category span:last-child:after,.amp-wp-tax-tag span:last-child:after{content:' '}pre{white-space:pre-wrap}.amp-ad-wrapper.amp_ad_1{padding-top:20px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  .amp-wp-content-loop{width:100%}
131
  .amp-wp-content-loop ul{margin:0}
132
  .ampforwp_single_excerpt { margin-bottom:15px; }
@@ -280,7 +302,8 @@ if( ( isset($redux_builder_amp['enable-amp-ads-1'] ) && $redux_builder_amp['enab
280
  if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
281
  .ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
282
  <?php }
283
- $custom_css = ampforwp_get_setting('css_editor');
 
284
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
285
  echo $sanitized_css;
286
  //} ?>
74
  <?php if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
75
  .amp-disqus-comments { text-align:center } .amp-disqus-comments {padding: 15px;}.amp-disqus-comments amp-iframe{background: none;} <?php
76
  } ?>
77
+ .wp-caption {padding: 0;}.wp-caption.alignleft {margin-right: 16px;}.wp-caption.alignright { margin-left: 16px;}.wp-caption-text {border-bottom: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 0;padding: .66em 10px .75em;text-align: center;} amp-carousel {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em;} amp-iframe,amp-youtube,amp-instagram,amp-vine {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em; } .amp-wp-article-content amp-carousel amp-img {border: none;} amp-carousel > amp-img > img {object-fit: contain; } .amp-wp-iframe-placeholder { background: <?php echo sanitize_hex_color( $border_color ); ?> url( <?php echo esc_url( $get_customizer->get( 'placeholder_image_url' ) ); ?> ) no-repeat center 40%;background-size: 48px 48px;min-height: 48px;} .amp-wp-article-footer .amp-wp-meta {display: block;} .amp-wp-tags{ list-style-type: none; padding: 0; margin: 0 0 9px 0; display: inline-flex; } .amp-wp-tags li{display:inline; padding-left: 5px; } .amp-wp-tax-category span{margin-right:5px;} .amp-wp-tax-category, .amp-wp-tax-tag { color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 1.5em 16px;}.ampforwp-comment-button {margin-bottom:20px;} .amp-wp-comments-link {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;text-align: center;margin: 2.25em 0 1.5em;} .amp-wp-comments-link a { border-style: solid;border-color: <?php echo sanitize_hex_color( $border_color ); ?>;border-width: 1px 1px 2px;border-radius: 4px;background-color: transparent;color: <?php echo sanitize_hex_color( $link_color ); ?>;cursor: pointer; display: block;font-size: 14px;font-weight: 600;line-height: 18px;margin: 0 auto;max-width: 200px;padding: 11px 16px;text-decoration: none;width: 50%;-webkit-transition: background-color 0.2s ease;transition: background-color 0.2s ease;} .page-title {margin: 0 15px; font-size: 1.17em; }.amp-sub-archives li{width: 50%;} .amp-sub-archives ul{padding: 0;list-style: none;display: flex;font-size: 12px;line-height: 1.2;margin: 5px 1.5em 10px 1.5em;} .author-archive amp-img{border-radius: 50%;margin: 0px 8px 10px;display: block;}.author-archive{float: left;} .amp-wp-content.taxonomy-description{margin: 0 15px;} .amp-wp-footer {border-top: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;margin: calc(1.5em - 1px) 0 0;padding-bottom:25px;}
78
  .amp-wp-footer div{margin:0 auto;max-width:calc(840px - 32px);padding:1.25em 16px;position:relative}.amp-wp-footer h2{font-size:1em;line-height:1.375em;margin:0 0 .5em}
79
  .amp-wp-footer p {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .8em;line-height: 1.5em;margin: 0 15px 0 0;}
80
  .amp-wp-footer a{text-decoration:none}.copyright_txt{float:left}.back-to-top{float:right}.amp-wp-header .nav_container{float: right;top: 16px;line-height: 1; right: 65px; position: absolute}.toggle-text{position:absolute;right:0;height:22px;width:28px}.toggle-text span{display:block;position:absolute;height:2px;width:25px;background:#fff;border-radius:19px;opacity:1;left:0}.toggle-text span:nth-child(2){top:9px}.toggle-text span:nth-child(3){top:18px}.amp-wp-home .amp-wp-meta{margin:5px 0}.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 ); ?>;}.comment-button-wrapper a,.related_posts ol{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.amp-wp-meta{display:flex}.amp-wp-posted-on{display:initial}
81
  <?php if(!checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){ ?>
82
  #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}.ampforwp-social-icons{margin:1.5em 16px}.amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; margin-bottom:5px; }
83
  .amp-social-icon amp-img{ top: 4px; }
84
+ amp-social-share[type="facebookmessenger"] {
85
+ background-image: url(https://img.icons8.com/color/100/000000/facebook-messenger.png);
86
+ max-height: 33px;
87
+ }
88
+ <?php if ( true == ampforwp_get_setting('enable-single-facebook-share-messenger') ) { ?>
89
+ .amp-social-icon.amp-social-facebookmessenger {background: #d5e1e6;text-align: center;}
90
+ <?php } ?>
91
  <?php if ( true == ampforwp_get_setting('enable-single-line-share') ) { ?>
92
  .custom-amp-socialsharing-line{background:#00b900}
93
  <?php } ?>
132
 
133
 
134
  .comments_list ul li p{margin:0;font-size:14px;clear:both;padding-top:5px; word-break:break-word;}
135
+ .comments_list ul li{font-family:sans-serif;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 p{font-family:Merriweather,'Times New Roman',Times,Serif}.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;}<?php } ?>amp-sidebar{width:250px}.amp-sidebar-image{line-height:100px;vertical-align:middle}.amp-close-image{top:15px;left:225px;cursor:pointer}.toggle-navigationv2 ul{list-style-type:none;margin:0;font-family:sans-serif;padding:0}.toggle-navigationv2 ul ul li a{padding-left:35px;background:#fff;display:inline-block}.toggle-navigationv2 ul li a{padding:10px 15px 10px 25px;width:100%;text-decoration:none;background:#fafafa;font-size:13px;border-bottom:1px solid #efefef}.close-nav{font-size:12px;font-family:sans-serif;background:rgba(0,0,0,.25);letter-spacing:1px;padding:10px;border-radius:100px;line-height:8px;margin:14px;left:191px;color:#fff}.close-nav:hover{background:rgba(0,0,0,.45)}.toggle-navigation ul{list-style-type:none;margin:0;padding:0;width:100%}.menu-all-pages-container:after{content:"";clear:both}.toggle-navigation ul li{font-size:13px;border-bottom:1px solid rgba(0,0,0,.11);padding:11px 0;width:25%;float:left;text-align:center;margin-top:6px}.toggle-navigation ul ul{display:none}.toggle-navigation ul li a{color:#eee;padding:15px}.toggle-navigation{display:none;background:#444}.nav_container:hover+.toggle-navigation,.toggle-navigation:active,.toggle-navigation:focus,.toggle-navigation:hover{display:inline-block;width:100%}#amp-user-notification1 p{display:inline-block}amp-user-notification{padding:5px;text-align:center;background:#fff;border-top:1px solid} amp-user-notification button {padding: 8px 10px;background: <?php echo sanitize_hex_color( $header_background_color ); ?>;color: <?php echo sanitize_hex_color( $header_color ); ?>;margin-left: 5px;border: 0;}.amp-not-privacy{color:<?php echo sanitize_hex_color( $header_background_color ); ?>;text-decoration: none;font-size: 15px;}amp-user-notification button:hover {cursor: pointer} .amp-ad-wrapper {text-align: center} <?php if( ampforwp_get_setting('enable-single-social-icons') == true && is_single() ) { ?>
136
+ body {padding-bottom: 43px;}
137
+ .body.single-post .sticky_social{z-index:99999;}
138
+ .body.single-post .adsforwp-stick-ad, .body.single-post amp-sticky-ad{padding-top:4px;padding-bottom:52px;}
139
+ .body.single-post .ampforwp-sticky-custom-ad{
140
+ bottom: 46px;
141
+ padding: 5px 0px 0px;
142
+ }
143
+ .body.single-post .afw a{line-height:0;}
144
+ .body.single-post amp-sticky-ad amp-sticky-ad-top-padding{height:0px;}
145
+ <?php } ?>
146
+ .sticky_social a{text-decoration:none}.sticky_social{width:100%;bottom:0;display:block;left:0;box-shadow:0 4px 7px #000;background:#fff;padding:7px 0 0;position:fixed;margin:0;z-index:10;text-align:center}
147
+ <?php if( ampforwp_get_setting('ampforwp-advertisement-sticky-type') == 3) {?>
148
+ .btt{z-index:9999;}
149
+ <?php } // advanced ads type 3 ends here ?>
150
+
151
+ .whatsapp-share-icon{width:50px;height:28px;display:inline-block;background:#5cbe4a;padding:4px 0;position:relative;top:-4px}.amp-wp-tax-category span:first-child:after{content:' '}.amp-wp-tax-category span:after,.amp-wp-tax-tag span:after{content:', '}.amp-wp-tax-category span:last-child:after,.amp-wp-tax-tag span:last-child:after{content:' '}pre{white-space:pre-wrap}.amp-ad-wrapper.amp_ad_1{padding-top:20px}
152
  .amp-wp-content-loop{width:100%}
153
  .amp-wp-content-loop ul{margin:0}
154
  .ampforwp_single_excerpt { margin-bottom:15px; }
302
  if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
303
  .ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
304
  <?php }
305
+ $custom_css = ampforwp_get_setting('css_editor');
306
+ $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
307
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
308
  echo $sanitized_css;
309
  //} ?>
templates/design-manager/design-2/elements/social-icons.php CHANGED
@@ -1,11 +1,15 @@
1
  <?php global $redux_builder_amp;
2
  // Social share in AMP
3
- $amp_permalink = "";
 
4
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
5
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
6
  } else{
7
  $amp_permalink = get_the_permalink();
8
  }
 
 
 
9
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
10
  $permalink = '';
11
  if(ampforwp_get_setting('enable-single-twitter-share-link')){
@@ -30,6 +34,13 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
30
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
31
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
32
  <?php } ?>
 
 
 
 
 
 
 
33
  <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
34
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
35
  <amp-social-share type="twitter"
@@ -53,7 +64,7 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
53
  <amp-social-share type="linkedin" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
54
  <?php } ?>
55
  <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
56
- <a title="whatsapp share" <?php ampforwp_nofollow_social_links(); ?> href="whatsapp://send?text=<?php echo esc_url($amp_permalink); ?>">
57
  <div class="amp-social-icon">
58
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj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Social share in AMP
3
+ $amp_permalink = $facebook_app_id = $amp_permalink_fb_messenger = '';
4
+ $facebook_app_id = ampforwp_get_setting('amp-facebook-app-id-messenger');
5
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
6
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
7
  } else{
8
  $amp_permalink = get_the_permalink();
9
  }
10
+ if($facebook_app_id){
11
+ $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
12
+ }
13
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
14
  $permalink = '';
15
  if(ampforwp_get_setting('enable-single-twitter-share-link')){
34
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
35
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
36
  <?php } ?>
37
+ <?php if ( true == ampforwp_get_setting('enable-single-facebook-share-messenger') ) { ?>
38
+ <a title="facebookmessenger share" <?php ampforwp_nofollow_social_links(); ?> href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>" target="_blank">
39
+ <div class="amp-social-icon amp-social-facebookmessenger">
40
+ <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
41
+ </div>
42
+ </a>
43
+ <?php } ?>
44
  <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
45
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
46
  <amp-social-share type="twitter"
64
  <amp-social-share type="linkedin" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
65
  <?php } ?>
66
  <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
67
+ <a title="whatsapp share" <?php ampforwp_nofollow_social_links(); ?> href="https://api.whatsapp.com/send?text=<?php echo esc_url($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uNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
70
  </div>
templates/design-manager/design-2/style.php CHANGED
@@ -22,6 +22,10 @@ global $redux_builder_amp;
22
  $link_color = $get_customizer->get_customizer_setting( 'link_color' );
23
  $header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
24
  $header_color = $get_customizer->get_customizer_setting( 'header_color' );
 
 
 
 
25
  ?>
26
 
27
  /* Global Styling */
@@ -108,6 +112,13 @@ if(ampforwp_get_setting('enable-single-social-icons') == true && is_single() ||
108
  .sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
109
  .amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; margin-bottom:5px; }
110
  .amp-social-icon amp-img{ top: 4px; }
 
 
 
 
 
 
 
111
  <?php if ( true == ampforwp_get_setting('enable-single-line-share') ) { ?>
112
  .custom-amp-socialsharing-line{background:#00b900}
113
  <?php } ?>
@@ -190,6 +201,9 @@ if (empty($footer_back_color)) {
190
  a.btt:hover {
191
  cursor: pointer;
192
  }
 
 
 
193
  <?php if(is_singular() || is_home() && true == ampforwp_get_setting('amp-frontpage-select-option') && ampforwp_get_blog_details() == false && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ){ ?>
194
  /* Single */
195
  .comment-button-wrapper{ margin-bottom: 0px; margin-top: 60px; text-align:center }
@@ -343,14 +357,25 @@ amp-carousel{direction: ltr;} .tt-lb{float:right;margin-left:5px;}
343
  .amp-wp-tax-tag a, a, .amp-wp-author, .headerlogo a, [class*=icono-] { color: <?php echo sanitize_hex_color( $header_background_color ); ?>;; }
344
  body a {color: <?php echo ampforwp_sanitize_color($redux_builder_amp['amp-opt-color-rgba-link-design2']['color']);?> }
345
  .amp-wp-content blockquote{ border-color:<?php echo sanitize_hex_color( $header_background_color ); ?>;; }
346
- .nav_container, .comment-button-wrapper a { background: <?php echo sanitize_hex_color( $header_background_color ); ?>;; }
347
  .nav_container a{ color:<?php echo sanitize_hex_color( $header_color ); ?> }
348
  amp-user-notification { border-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;; }
349
  amp-user-notification button { background-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;; }
350
- <?php if( $redux_builder_amp['enable-single-social-icons'] == true && is_socialshare_or_socialsticky_enabled_in_ampforwp() ) { ?>
351
  .single-post footer { padding-bottom: 40px; }
352
  .amp-ad-2{ margin-bottom: 50px; }
353
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
354
  /**/
355
  .amp-wp-author:before{ content: " <?php global $redux_builder_amp; echo ampforwp_translation($redux_builder_amp['amp-translator-by-text'], 'By '); ?> "; }
356
  .ampforwp-tax-category span:first-child:after { content: ' '; }
@@ -405,7 +430,8 @@ if( ( isset($redux_builder_amp['enable-amp-ads-1'] ) && $redux_builder_amp['enab
405
  if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
406
  .ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
407
  <?php }
408
- $custom_css = ampforwp_get_setting('css_editor');
 
409
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
410
  echo $sanitized_css;
411
  //} ?>
22
  $link_color = $get_customizer->get_customizer_setting( 'link_color' );
23
  $header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
24
  $header_color = $get_customizer->get_customizer_setting( 'header_color' );
25
+ $header_bg_clr = ampforwp_get_setting('amp-d2-background-color','color');
26
+ if(empty($header_bg_clr)){
27
+ $header_bg_clr ='#0a89c0';
28
+ }
29
  ?>
30
 
31
  /* Global Styling */
112
  .sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
113
  .amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; margin-bottom:5px; }
114
  .amp-social-icon amp-img{ top: 4px; }
115
+ amp-social-share[type="facebookmessenger"] {
116
+ background-image: url(https://img.icons8.com/color/100/000000/facebook-messenger.png);
117
+ max-height: 33px;
118
+ }
119
+ <?php if ( true == ampforwp_get_setting('enable-single-facebook-share-messenger') ) { ?>
120
+ .amp-social-icon.amp-social-facebookmessenger {background: #d5e1e6;text-align: center;}
121
+ <?php } ?>
122
  <?php if ( true == ampforwp_get_setting('enable-single-line-share') ) { ?>
123
  .custom-amp-socialsharing-line{background:#00b900}
124
  <?php } ?>
201
  a.btt:hover {
202
  cursor: pointer;
203
  }
204
+ .nav_container {
205
+ background: <?php echo ampforwp_sanitize_color($header_bg_clr); ?>
206
+ }
207
  <?php if(is_singular() || is_home() && true == ampforwp_get_setting('amp-frontpage-select-option') && ampforwp_get_blog_details() == false && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ){ ?>
208
  /* Single */
209
  .comment-button-wrapper{ margin-bottom: 0px; margin-top: 60px; text-align:center }
357
  .amp-wp-tax-tag a, a, .amp-wp-author, .headerlogo a, [class*=icono-] { color: <?php echo sanitize_hex_color( $header_background_color ); ?>;; }
358
  body a {color: <?php echo ampforwp_sanitize_color($redux_builder_amp['amp-opt-color-rgba-link-design2']['color']);?> }
359
  .amp-wp-content blockquote{ border-color:<?php echo sanitize_hex_color( $header_background_color ); ?>;; }
360
+ .comment-button-wrapper a { background: <?php echo sanitize_hex_color( $header_background_color ); ?>;; }
361
  .nav_container a{ color:<?php echo sanitize_hex_color( $header_color ); ?> }
362
  amp-user-notification { border-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;; }
363
  amp-user-notification button { background-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;; }
364
+ <?php if( ampforwp_get_setting('enable-single-social-icons') == true && is_socialshare_or_socialsticky_enabled_in_ampforwp() && is_single() ) { ?>
365
  .single-post footer { padding-bottom: 40px; }
366
  .amp-ad-2{ margin-bottom: 50px; }
367
+ .body.single-post .sticky_social{z-index:99999;}
368
+ .body.single-post .adsforwp-stick-ad, .body.single-post amp-sticky-ad{padding-top:4px;padding-bottom:48px;}
369
+ .body.single-post .ampforwp-sticky-custom-ad{
370
+ bottom: 43px;
371
+ padding: 4px 0px 0px;
372
+ }
373
+ .body.single-post .afw a{line-height:0;}
374
+ .body.single-post amp-sticky-ad amp-sticky-ad-top-padding{height:0px;}
375
+ <?php }
376
+ if( ampforwp_get_setting('ampforwp-advertisement-sticky-type') == 3) {?>
377
+ .btt{z-index:9999;}
378
+ <?php } // advanced ads type 3 ends here ?>
379
  /**/
380
  .amp-wp-author:before{ content: " <?php global $redux_builder_amp; echo ampforwp_translation($redux_builder_amp['amp-translator-by-text'], 'By '); ?> "; }
381
  .ampforwp-tax-category span:first-child:after { content: ' '; }
430
  if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
431
  .ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
432
  <?php }
433
+ $custom_css = ampforwp_get_setting('css_editor');
434
+ $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
435
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
436
  echo $sanitized_css;
437
  //} ?>
templates/design-manager/design-3/archive.php CHANGED
@@ -126,6 +126,10 @@ if ( get_query_var( 'paged' ) ) {
126
  $thumb_url = ampforwp_get_post_thumbnail();
127
  $thumb_width = ampforwp_get_post_thumbnail('width');
128
  $thumb_height = ampforwp_get_post_thumbnail('height');
 
 
 
 
129
  if($thumb_url){
130
  ?>
131
  <div class="home-post_image">
126
  $thumb_url = ampforwp_get_post_thumbnail();
127
  $thumb_width = ampforwp_get_post_thumbnail('width');
128
  $thumb_height = ampforwp_get_post_thumbnail('height');
129
+ if(ampforwp_get_setting('ampforwp-homepage-posts-image-modify-size')){
130
+ $thumb_width = ampforwp_get_setting('ampforwp-design-3-homepage-posts-width');
131
+ $thumb_height = ampforwp_get_setting('ampforwp-design-3-homepage-posts-height');
132
+ }
133
  if($thumb_url){
134
  ?>
135
  <div class="home-post_image">
templates/design-manager/design-3/elements/social-icons.php CHANGED
@@ -1,11 +1,15 @@
1
  <?php global $redux_builder_amp, $post;
2
  // Social share in AMP
3
- $amp_permalink = "";
 
4
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
5
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
6
  } else{
7
  $amp_permalink = get_the_permalink();
8
  }
 
 
 
9
  $image = '';
10
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
11
  if ( has_post_thumbnail( $post->ID ) ) {
@@ -40,6 +44,13 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
40
  </a>
41
  </div>
42
  <?php } ?>
 
 
 
 
 
 
 
43
  <?php if ( true == $redux_builder_amp['enable-single-twitter-share'] ) {
44
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle']; ?>
45
  <div class="ampforwp-custom-social">
@@ -78,7 +89,7 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
78
  <?php } ?>
79
  <?php if ( true == $redux_builder_amp['enable-single-whatsapp-share'] ) { ?>
80
  <div class="ampforwp-custom-social">
81
- <a title="whatsapp share" <?php ampforwp_nofollow_social_links(); ?> href="whatsapp://send?text=<?php echo esc_url($amp_permalink);?>" class="amp-social-icon-rounded amp-social-whatsapp">
82
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3NS0yMy41MjIgICBjLTQuMDIzLTYuNjA2LTYuMzQtMTQuMzU0LTYuMzQtMjIuNjM3QzEuNjM1LDE5LjYyOCwyMS40MTYsMCw0NS44MTgsMEM3MC4yMjMsMCw5MCwxOS42Mjg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wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="16" height="16" />
83
  </a>
84
  </div>
1
  <?php global $redux_builder_amp, $post;
2
  // Social share in AMP
3
+ $amp_permalink = $facebook_app_id = $amp_permalink_fb_messenger = '';
4
+ $facebook_app_id = ampforwp_get_setting('amp-facebook-app-id-messenger');
5
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
6
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
7
  } else{
8
  $amp_permalink = get_the_permalink();
9
  }
10
+ if($facebook_app_id){
11
+ $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
12
+ }
13
  $image = '';
14
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
15
  if ( has_post_thumbnail( $post->ID ) ) {
44
  </a>
45
  </div>
46
  <?php } ?>
47
+ <?php if(ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
48
+ <div class="ampforwp-custom-social">
49
+ <a title="facebook share messenger" <?php ampforwp_nofollow_social_links(); ?> href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>" class="amp-social-facebook-messenger amp-social-icon-rounded">
50
+ <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="16" height="16" />
51
+ </a>
52
+ </div>
53
+ <?php } ?>
54
  <?php if ( true == $redux_builder_amp['enable-single-twitter-share'] ) {
55
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle']; ?>
56
  <div class="ampforwp-custom-social">
89
  <?php } ?>
90
  <?php if ( true == $redux_builder_amp['enable-single-whatsapp-share'] ) { ?>
91
  <div class="ampforwp-custom-social">
92
+ <a title="whatsapp share" <?php ampforwp_nofollow_social_links(); ?> href="https://api.whatsapp.com/send?text=<?php echo esc_url($amp_permalink);?>" class="amp-social-icon-rounded amp-social-whatsapp">
93
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb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UtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="16" height="16" />
94
  </a>
95
  </div>
templates/design-manager/design-3/index.php CHANGED
@@ -145,6 +145,14 @@ if ( get_query_var( 'paged' ) ) {
145
  $thumb_url = ampforwp_get_post_thumbnail('url');
146
  $thumb_width = ampforwp_get_post_thumbnail('width');
147
  $thumb_height = ampforwp_get_post_thumbnail('height');
 
 
 
 
 
 
 
 
148
  if($thumb_url){
149
  ?>
150
  <div class="home-post_image">
145
  $thumb_url = ampforwp_get_post_thumbnail('url');
146
  $thumb_width = ampforwp_get_post_thumbnail('width');
147
  $thumb_height = ampforwp_get_post_thumbnail('height');
148
+ if(ampforwp_get_setting('ampforwp-homepage-posts-image-modify-size')){
149
+ $thumb_id = get_post_thumbnail_id();
150
+ $thumb_width = ampforwp_get_setting('ampforwp-design-3-homepage-posts-width');
151
+ $thumb_height = ampforwp_get_setting('ampforwp-design-3-homepage-posts-height');
152
+ $thumb_url_modify = wp_get_attachment_image_src($thumb_id, 'full' , true);
153
+ $thumb_crop_url = ampforwp_aq_resize( $thumb_url_modify[0], $thumb_width , $thumb_height , true, false );
154
+ $thumb_url = $thumb_crop_url[0];
155
+ }
156
  if($thumb_url){
157
  ?>
158
  <div class="home-post_image">
templates/design-manager/design-3/style.php CHANGED
@@ -9,10 +9,8 @@ use AMPforWP\AMPVendor\AMP_Post_Template;
9
  $get_customizer = new AMP_Post_Template( $post_id );
10
  // Get content width
11
  $colorscheme = ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color');
12
- $headercolor = ampforwp_get_setting('amp-opt-color-rgba-headercolor','color');
13
  $font_color = ampforwp_get_setting('amp-opt-color-rgba-font','color');
14
  $link_color = ampforwp_get_setting('amp-opt-color-rgba-link','color');
15
- $headerelements = ampforwp_get_setting('amp-opt-color-rgba-headerelements','color');
16
  $sticky_head = ampforwp_get_setting('amp-opt-sticky-head');
17
 
18
  $content_max_width = absint( $get_customizer->get( 'content_max_width' ) );
@@ -79,22 +77,59 @@ figure.aligncenter amp-img {
79
  margin: 0 auto;
80
  }
81
  /* Slide Navigation code */
82
- amp-sidebar{ width: 280px; background: #131313; font-family: 'Roboto Slab', serif; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  .amp-sidebar-image{ line-height: 100px; vertical-align:middle; }
84
  .amp-close-image{ top: 15px; left: 225px; cursor: pointer; }
85
- .navigation_heading{ padding: 20px 20px 15px 20px; color: #aaa; font-size: 10px; font-family: sans-serif; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid #555; display: inline-block; width: 100%}
86
  .toggle-navigationv2 ul{ list-style-type: none; margin: 15px 0 0 0; padding: 0}
87
- .toggle-navigationv2 ul.amp-menu li a{ padding: 10px 15px 10px 20px; display: inline-block; font-size: 14px; color:#eee; width:100% }
88
  .amp-menu li{position:relative}
89
- .toggle-navigationv2 ul.amp-menu li a:hover{background:#666;color:#fff}
90
- .amp-menu li.menu-item-has-children ul{display:none;margin:0;background:#666;position:relative;
 
91
  }
92
  .amp-menu li.menu-item-has-children .sub-menu li a span:before{
93
  content: '\25b8';
94
  position: relative;
95
  left: -6px;
96
  font-size: 10px;
97
- color: #a9a9a9;
98
  top: -2px;
99
  z-index: 10000;
100
  line-height: 1;
@@ -103,17 +138,15 @@ amp-sidebar{ width: 280px; background: #131313; font-family: 'Roboto Slab', seri
103
  padding: 15px 0px 15px 20px;
104
  }
105
  .amp-menu li.menu-item-has-children .sub-menu .sub-menu li a{
106
- padding: 15px 0px 15px 30px;
 
 
 
107
  }
108
-
109
- .amp-menu li.menu-item-has-children ul ul{background:#444}
110
- .amp-menu li.menu-item-has-children ul ul ul{background:#666}
111
-
112
  .amp-menu input{display:none}
113
  .amp-menu [id^=drop]:checked + label + ul{ display: block;}
114
- .amp-menu .toggle:after{content:'\25be';position:absolute;padding: 12px 20px 10px 30px;right:0;font-size:13px;color:#ccc;top:6px;z-index:10000;line-height:1}
115
-
116
- .toggle-navigationv2 .social_icons{ margin-top: 25px; border-top: 1px solid #555; padding: 25px 0px; color: #fff; width: 100%; }
117
  .menu-all-pages-container:after{ content: ""; clear: both }
118
  .toggle-text{ color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 3px; display: inherit; text-align: center; }
119
  .toggle-text:before{ content: "..."; font-size: 32px; position: ; font-family: georgia; line-height: 0px; margin-left: 0px; letter-spacing: 1px; top: -3px; position: relative; padding-right: 10px; }
@@ -122,7 +155,7 @@ amp-sidebar{ width: 280px; background: #131313; font-family: 'Roboto Slab', seri
122
  .cl-btn:after{
123
  content: "x";
124
  font-size: 16px;
125
- color: #999;
126
  position: absolute;
127
  right: 15px;
128
  top: 15px;
@@ -141,6 +174,7 @@ if ( ampforwp_get_setting('enable-single-social-icons') == true && is_single() |
141
  .sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
142
  .amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; }
143
  .amp-social-icon amp-img{ top: 4px; }
 
144
  .custom-amp-socialsharing-line{background:#00b900}
145
  .custom-amp-socialsharing-mewe{background:#b8d6e6}
146
  .sticky_social .whatsapp-share-icon{ padding: 4px 0px 14px 0px; height: 28px; top: -4px; position: relative; }
@@ -448,7 +482,7 @@ amp-user-notification button{ padding: 8px 10px; background: #000; color: #fff;
448
  amp-user-notification button:hover{ cursor: pointer }
449
  .amp-not-privacy{color:<?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?>;text-decoration: none;font-size: 15px;margin-left: 2px;}
450
  <?php } ?>
451
- .archive-heading{padding: 10px 15px 0 15px;}
452
  /* Responsive */
453
  @media screen and (min-width: 650px) { table {display: inline-table;} }
454
  @media screen and (max-width: 768px){ .amp-wp-meta{ margin:10px 0px 15px 0px } .home-post_image{ width: 40%; } .amp-loop-list .amp-wp-post-content{ width: 58%; } .amp-loop-list .featured_time{line-height:1} .single-post main .amp-wp-content h1{ line-height:1.4; font-size: 30px;} }
@@ -506,9 +540,20 @@ body a { color: <?php echo ampforwp_get_setting('amp-opt-color-rgba-link','colo
506
  .amp-wp-content blockquote { border-color: <?php echo ampforwp_sanitize_color( $header_background_color ); ?>; }
507
  amp-user-notification { border-color: <?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?>;}
508
  amp-user-notification button { background-color: <?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?>;}
509
- <?php if ( true == ampforwp_get_setting('enable-single-social-icons') && is_socialshare_or_socialsticky_enabled_in_ampforwp() ) { ?>
510
  .single-post footer { padding-bottom: 41px;}
511
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
512
  .amp-wp-author:before{ content: " <?php global $redux_builder_amp; echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-published-by'], 'Published by' ));?> ";}
513
  .ampforwp-tax-category span:last-child:after { content: ' ';}
514
  .ampforwp-tax-category span:after{ content: ', ';}
@@ -546,10 +591,10 @@ amp-user-notification button { background-color: <?php echo ampforwp_get_settin
546
  .social_icons li{ box-sizing: initial; display:inline-block; margin:5px; }
547
  .social_icons li a:before{ box-sizing: initial; color:#fff; padding: 10px; display: inline-block; border-radius: 70px; width: 18px; height: 18px; line-height: 20px; text-align: center; }
548
  #ampforwp_search_query_item { display: none; }
549
- #header, .headerlogo a{ background:<?php echo ampforwp_get_setting('amp-opt-color-rgba-headercolor','color','ampforwp_sanitize_color'); ?> }
550
  .comment-button-wrapper a, #pagination .next a, #pagination .prev a{ background: <?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?> ; }
551
- .toast:after, .toast:before, .toast span{ background: <?php echo ampforwp_get_setting('amp-opt-color-rgba-headerelements','color','ampforwp_sanitize_color'); ?> ; }
552
- [class*=icono-], .headerlogo a{ color: <?php echo ampforwp_get_setting('amp-opt-color-rgba-headerelements','color','ampforwp_sanitize_color'); ?> }
553
  #pagination .next a, #pagination .prev a , #pagination .next a, #pagination .prev a ,.comment-button-wrapper a{ color: <?php echo ampforwp_get_setting('amp-opt-color-rgba-font','color','ampforwp_sanitize_color'); ?> ;}
554
  <?php if ( ! has_nav_menu( 'amp-menu' ) ) { ?>
555
  .toggle-navigationv2 .social_icons { border-top: 0px; }
@@ -595,7 +640,8 @@ if ( (isset($redux_builder_amp['enable-amp-ads-1'] ) && $redux_builder_amp['enab
595
  if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
596
  .ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
597
  <?php }
598
- $custom_css = ampforwp_get_setting('css_editor');
 
599
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
600
  echo $sanitized_css;
601
  //} ?>
9
  $get_customizer = new AMP_Post_Template( $post_id );
10
  // Get content width
11
  $colorscheme = ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color');
 
12
  $font_color = ampforwp_get_setting('amp-opt-color-rgba-font','color');
13
  $link_color = ampforwp_get_setting('amp-opt-color-rgba-link','color');
 
14
  $sticky_head = ampforwp_get_setting('amp-opt-sticky-head');
15
 
16
  $content_max_width = absint( $get_customizer->get( 'content_max_width' ) );
77
  margin: 0 auto;
78
  }
79
  /* Slide Navigation code */
80
+ <?php
81
+ $headercolor = ampforwp_get_setting('amp-opt-color-rgba-headercolor','color');
82
+ $headerelements = ampforwp_get_setting('amp-opt-color-rgba-headerelements','color');
83
+ $menubgcolor = ampforwp_get_setting('amp-opt-color-rgba-menu-bg-color','color');
84
+ $navmenucolor = ampforwp_get_setting('amp-opt-color-rgba-menu-elements-color','color');
85
+ $submenucolor = ampforwp_get_setting('amp-opt-color-rgba-submenu-bgcolor','color');
86
+ $submenuhovercolor = ampforwp_get_setting('amp-opt-color-rgba-submenu-hover-bgcolor','color');
87
+ $menulblcolor = ampforwp_get_setting('amp-opt-color-rgba-menu-label-color','color');
88
+ $menubdrcolor = ampforwp_get_setting('amp-opt-color-rgba-menu-brdr-color','color');
89
+
90
+ //when the fields are empty default value will load
91
+ if(empty($headercolor)){
92
+ $headercolor ='#FFFFFF';
93
+ }
94
+ if(empty($headerelements)){
95
+ $headerelements ='#F42F42';
96
+ }
97
+ if(empty($menubgcolor)){
98
+ $menubgcolor ='#131313';
99
+ }
100
+ if(empty($navmenucolor)){
101
+ $navmenucolor ='#eeeeee';
102
+ }
103
+ if(empty($submenucolor)){
104
+ $submenucolor ='#666666';
105
+ }
106
+ if(empty($submenuhovercolor)){
107
+ $submenuhovercolor ='#666666';
108
+ }
109
+ if(empty($menulblcolor)){
110
+ $menulblcolor ='#aaaaaa';
111
+ }
112
+ if(empty($menubdrcolor)){
113
+ $menubdrcolor ='#555555';
114
+ }
115
+ ?>
116
+ amp-sidebar{ width: 280px;font-family: 'Roboto Slab', serif;background:<?php echo ampforwp_sanitize_color($menubgcolor);?>; }
117
  .amp-sidebar-image{ line-height: 100px; vertical-align:middle; }
118
  .amp-close-image{ top: 15px; left: 225px; cursor: pointer; }
119
+ .navigation_heading{ padding: 20px 20px 15px 20px; color: <?php echo ampforwp_sanitize_color($menulblcolor); ?>; font-size: 10px; font-family: sans-serif; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid <?php echo ampforwp_sanitize_color($menubdrcolor); ?>; display: inline-block; width: 100%}
120
  .toggle-navigationv2 ul{ list-style-type: none; margin: 15px 0 0 0; padding: 0}
121
+ .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% }
122
  .amp-menu li{position:relative}
123
+ .toggle-navigationv2 ul.amp-menu li a:hover{background:<?php echo ampforwp_sanitize_color($submenuhovercolor); ?>;color:<?php echo ampforwp_sanitize_color($navmenucolor); ?>;}
124
+ .amp-menu li.menu-item-has-children ul{display:none;margin:0;position:relative;
125
+ background:<?php echo ampforwp_sanitize_color($submenucolor);?>;
126
  }
127
  .amp-menu li.menu-item-has-children .sub-menu li a span:before{
128
  content: '\25b8';
129
  position: relative;
130
  left: -6px;
131
  font-size: 10px;
132
+ color:<?php echo ampforwp_sanitize_color($menulblcolor); ?>;
133
  top: -2px;
134
  z-index: 10000;
135
  line-height: 1;
138
  padding: 15px 0px 15px 20px;
139
  }
140
  .amp-menu li.menu-item-has-children .sub-menu .sub-menu li a{
141
+ padding: 15px 0px 15px 33px;
142
+ }
143
+ .amp-menu li.menu-item-has-children .sub-menu .sub-menu .sub-menu li a{
144
+ padding: 15px 0px 15px 45px;
145
  }
 
 
 
 
146
  .amp-menu input{display:none}
147
  .amp-menu [id^=drop]:checked + label + ul{ display: block;}
148
+ .amp-menu .toggle:after{content:'\25be';position:absolute;padding: 12px 20px 10px 30px;right:0;font-size:13px;color:<?php echo ampforwp_sanitize_color($navmenucolor); ?>;top:6px;z-index:10000;line-height:1}
149
+ .toggle-navigationv2 .social_icons{ margin-top: 25px; border-top: 1px solid <?php echo ampforwp_sanitize_color($menubdrcolor); ?>; padding: 25px 0px; color: #fff; width: 100%; }
 
150
  .menu-all-pages-container:after{ content: ""; clear: both }
151
  .toggle-text{ color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 3px; display: inherit; text-align: center; }
152
  .toggle-text:before{ content: "..."; font-size: 32px; position: ; font-family: georgia; line-height: 0px; margin-left: 0px; letter-spacing: 1px; top: -3px; position: relative; padding-right: 10px; }
155
  .cl-btn:after{
156
  content: "x";
157
  font-size: 16px;
158
+ color:<?php echo ampforwp_sanitize_color($menulblcolor); ?>;
159
  position: absolute;
160
  right: 15px;
161
  top: 15px;
174
  .sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
175
  .amp-social-icon{ width: 50px; height: 28px; display: inline-block; background: #5cbe4a;position: relative; top: -8px; padding-top: 0px; }
176
  .amp-social-icon amp-img{ top: 4px; }
177
+ a.amp-social-facebook-messenger,.amp-social-facebookmessenger{background:#d5e1e6;}
178
  .custom-amp-socialsharing-line{background:#00b900}
179
  .custom-amp-socialsharing-mewe{background:#b8d6e6}
180
  .sticky_social .whatsapp-share-icon{ padding: 4px 0px 14px 0px; height: 28px; top: -4px; position: relative; }
482
  amp-user-notification button:hover{ cursor: pointer }
483
  .amp-not-privacy{color:<?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?>;text-decoration: none;font-size: 15px;margin-left: 2px;}
484
  <?php } ?>
485
+ .archive-heading,.taxonomy-description{padding: 10px 15px 0 15px;}
486
  /* Responsive */
487
  @media screen and (min-width: 650px) { table {display: inline-table;} }
488
  @media screen and (max-width: 768px){ .amp-wp-meta{ margin:10px 0px 15px 0px } .home-post_image{ width: 40%; } .amp-loop-list .amp-wp-post-content{ width: 58%; } .amp-loop-list .featured_time{line-height:1} .single-post main .amp-wp-content h1{ line-height:1.4; font-size: 30px;} }
540
  .amp-wp-content blockquote { border-color: <?php echo ampforwp_sanitize_color( $header_background_color ); ?>; }
541
  amp-user-notification { border-color: <?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?>;}
542
  amp-user-notification button { background-color: <?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?>;}
543
+ <?php if ( true == ampforwp_get_setting('enable-single-social-icons') && is_socialshare_or_socialsticky_enabled_in_ampforwp() && is_single() ) { ?>
544
  .single-post footer { padding-bottom: 41px;}
545
+ .body.single-post .sticky_social{z-index:99999;}
546
+ .body.single-post .adsforwp-stick-ad, .body.single-post amp-sticky-ad{padding-top:3px;padding-bottom:48px;}
547
+ .body.single-post .ampforwp-sticky-custom-ad{
548
+ bottom: 43px;
549
+ padding: 4px 0px 0px;
550
+ }
551
+ .body.single-post .afw a{line-height:0;}
552
+ .body.single-post amp-sticky-ad amp-sticky-ad-top-padding{height:0px;}
553
+ <?php }
554
+ if( ampforwp_get_setting('ampforwp-advertisement-sticky-type') == 3) {?>
555
+ .btt{z-index:9999;}
556
+ <?php } // advanced ads type 3 ends here ?>
557
  .amp-wp-author:before{ content: " <?php global $redux_builder_amp; echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-published-by'], 'Published by' ));?> ";}
558
  .ampforwp-tax-category span:last-child:after { content: ' ';}
559
  .ampforwp-tax-category span:after{ content: ', ';}
591
  .social_icons li{ box-sizing: initial; display:inline-block; margin:5px; }
592
  .social_icons li a:before{ box-sizing: initial; color:#fff; padding: 10px; display: inline-block; border-radius: 70px; width: 18px; height: 18px; line-height: 20px; text-align: center; }
593
  #ampforwp_search_query_item { display: none; }
594
+ #header, .headerlogo a{ background:<?php echo ampforwp_sanitize_color($headercolor); ?> }
595
  .comment-button-wrapper a, #pagination .next a, #pagination .prev a{ background: <?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?> ; }
596
+ .toast:after, .toast:before, .toast span{ background: <?php echo ampforwp_sanitize_color($headerelements);?>; }
597
+ [class*=icono-], .headerlogo a{ color: <?php echo ampforwp_sanitize_color($headerelements);?>; }
598
  #pagination .next a, #pagination .prev a , #pagination .next a, #pagination .prev a ,.comment-button-wrapper a{ color: <?php echo ampforwp_get_setting('amp-opt-color-rgba-font','color','ampforwp_sanitize_color'); ?> ;}
599
  <?php if ( ! has_nav_menu( 'amp-menu' ) ) { ?>
600
  .toggle-navigationv2 .social_icons { border-top: 0px; }
640
  if ( true == $redux_builder_amp['amp-pagination'] ) { ?>
641
  .ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
642
  <?php }
643
+ $custom_css = ampforwp_get_setting('css_editor');
644
+ $custom_css = str_replace(array('.accordion-mod'), array('.apac'), $custom_css);
645
  $sanitized_css = ampforwp_sanitize_i_amphtml($custom_css);
646
  echo $sanitized_css;
647
  //} ?>
templates/design-manager/swift/footer.php CHANGED
@@ -48,12 +48,16 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
48
  <?php }
49
  }
50
  // Social share in AMP
51
- $amp_permalink = "";
 
52
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
53
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
54
  } else{
55
  $amp_permalink = get_the_permalink();
56
  }
 
 
 
57
  if(ampforwp_get_setting('enable-single-twitter-share-link')){
58
  $amp_permalink = wp_get_shortlink();
59
  }
@@ -86,6 +90,15 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
86
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
87
  </li>
88
  <?php } ?>
 
 
 
 
 
 
 
 
 
89
  <?php
90
  $data_param = '';
91
  if(ampforwp_get_setting('enable-single-twitter-share')){
@@ -122,7 +135,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
122
  <?php } ?>
123
  <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
124
  <li>
125
- <a title="whatsapp share" class="s_wp" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="whatsapp://send?text=<?php echo esc_url($amp_permalink); ?>" data-action="share/whatsapp/share"></a>
126
  </li>
127
  <?php } ?>
128
  <?php if(ampforwp_get_setting('enable-single-line-share') == true){
48
  <?php }
49
  }
50
  // Social share in AMP
51
+ $amp_permalink = $facebook_app_id = $amp_permalink_fb_messenger = '';
52
+ $facebook_app_id = ampforwp_get_setting('amp-facebook-app-id-messenger');
53
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
54
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
55
  } else{
56
  $amp_permalink = get_the_permalink();
57
  }
58
+ if($facebook_app_id){
59
+ $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
60
+ }
61
  if(ampforwp_get_setting('enable-single-twitter-share-link')){
62
  $amp_permalink = wp_get_shortlink();
63
  }
90
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
91
  </li>
92
  <?php } ?>
93
+ <?php if(true == ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
94
+ <li>
95
+ <a title="facebook share messenger" <?php ampforwp_nofollow_social_links(); ?> target="_blank" href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>">
96
+ <div class="amp-social-icon amp-social-facebookmessenger">
97
+ <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
98
+ </div>
99
+ </a>
100
+ </li>
101
+ <?php } ?>
102
  <?php
103
  $data_param = '';
104
  if(ampforwp_get_setting('enable-single-twitter-share')){
135
  <?php } ?>
136
  <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
137
  <li>
138
+ <a title="whatsapp share" class="s_wp" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://api.whatsapp.com/send?text=<?php echo esc_url($amp_permalink); ?>" data-action="share/whatsapp/share"></a>
139
  </li>
140
  <?php } ?>
141
  <?php if(ampforwp_get_setting('enable-single-line-share') == true){
templates/design-manager/swift/functions.php CHANGED
@@ -40,14 +40,18 @@ add_amp_icon( array( 'widgets', 'search', 'shopping-cart' ) );
40
 
41
  // Swift Social Icons
42
  function ampforwp_swift_social_icons(){
43
- global $redux_builder_amp;
 
 
44
  // Social share in AMP
45
- $amp_permalink = "";
46
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
47
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
48
  } else{
49
  $amp_permalink = get_the_permalink();
50
  }
 
 
 
51
  if(ampforwp_get_setting('enable-single-twitter-share-link')){
52
  $amp_permalink = wp_get_shortlink();
53
  }
@@ -60,6 +64,11 @@ function ampforwp_swift_social_icons(){
60
  <a class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
61
  </li>
62
  <?php } ?>
 
 
 
 
 
63
  <?php
64
  $data_param = '';
65
  if(ampforwp_get_setting('enable-single-twitter-share')){
@@ -96,7 +105,7 @@ function ampforwp_swift_social_icons(){
96
  <?php } ?>
97
  <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
98
  <li>
99
- <a class="s_wp" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="whatsapp://send?text=<?php echo esc_url($amp_permalink); ?>" data-action="share/whatsapp/share"></a>
100
  </li>
101
  <?php } ?>
102
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
40
 
41
  // Swift Social Icons
42
  function ampforwp_swift_social_icons(){
43
+ global $redux_builder_amp;
44
+ $amp_permalink = $facebook_app_id = $amp_permalink_fb_messenger = '';
45
+ $facebook_app_id = ampforwp_get_setting('amp-facebook-app-id-messenger');
46
  // Social share in AMP
 
47
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
48
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
49
  } else{
50
  $amp_permalink = get_the_permalink();
51
  }
52
+ if($facebook_app_id){
53
+ $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
54
+ }
55
  if(ampforwp_get_setting('enable-single-twitter-share-link')){
56
  $amp_permalink = wp_get_shortlink();
57
  }
64
  <a class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
65
  </li>
66
  <?php } ?>
67
+ <?php if(ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
68
+ <li>
69
+ <a title="facebook share messenger" class="s_fb_ms" target="_blank" href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>"></a>
70
+ </li>
71
+ <?php } ?>
72
  <?php
73
  $data_param = '';
74
  if(ampforwp_get_setting('enable-single-twitter-share')){
105
  <?php } ?>
106
  <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
107
  <li>
108
+ <a class="s_wp" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://api.whatsapp.com/send?text=<?php echo esc_url($amp_permalink); ?>" data-action="share/whatsapp/share"></a>
109
  </li>
110
  <?php } ?>
111
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
templates/design-manager/swift/page.php CHANGED
@@ -106,7 +106,7 @@ amp_header(); ?>
106
  <?php } ?>
107
  <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
108
  <li>
109
- <a title="whatsapp share" class="s_wp" target="_blank" href="whatsapp://send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
110
  </li>
111
  <?php } ?>
112
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
106
  <?php } ?>
107
  <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
108
  <li>
109
+ <a title="whatsapp share" class="s_wp" target="_blank" href="https://api.whatsapp.com/send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
110
  </li>
111
  <?php } ?>
112
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
templates/design-manager/swift/single.php CHANGED
@@ -55,13 +55,15 @@
55
  amp_author_box( $author_box ); ?>
56
  <?php } ?>
57
  <?php amp_post_navigation();?>
 
58
  <div class="cmts">
59
  <?php amp_comments();?>
60
  <?php do_action('ampforwp_post_after_design_elements'); ?>
61
  </div>
62
  <?php } ?>
 
63
  </div>
64
- <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
65
  <div class="sp-lt">
66
  <?php if (isset($redux_builder_amp['swift-social-position']) && 'default' == $redux_builder_amp['swift-social-position']){
67
  ampforwp_swift_social_icons();
@@ -82,7 +84,7 @@
82
  <?php amp_tags_list();?>
83
  </div>
84
  <?php }
85
- if( true == $redux_builder_amp['swift-date'] ) { ?>
86
  <div class="post-date">
87
  <?php amp_date(); ?><?php edit_post_link(); ?>
88
  </div>
@@ -316,7 +318,7 @@ do_action("ampforwp_single_design_type_handle_d1");
316
  <?php } ?>
317
  <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
318
  <li>
319
- <a class="s_wp" target="_blank" href="whatsapp://send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
320
  </li>
321
  <?php } ?>
322
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
@@ -409,7 +411,7 @@ do_action("ampforwp_single_design_type_handle_d1");
409
  <?php amp_tags_list();?>
410
  </div>
411
  <?php }
412
- if( true == $redux_builder_amp['swift-date'] ) { ?>
413
  <div class="post-date">
414
  <?php amp_date(); ?><?php edit_post_link(); ?>
415
  </div>
55
  amp_author_box( $author_box ); ?>
56
  <?php } ?>
57
  <?php amp_post_navigation();?>
58
+ <?php if ( true == ampforwp_get_setting('wordpress-comments-support')){ ?>
59
  <div class="cmts">
60
  <?php amp_comments();?>
61
  <?php do_action('ampforwp_post_after_design_elements'); ?>
62
  </div>
63
  <?php } ?>
64
+ <?php } ?>
65
  </div>
66
+ <?php if(!checkAMPforPageBuilderStatus(get_the_ID()) && (true == ampforwp_get_setting('enable-single-post-social-icons') || true == ampforwp_get_setting('amp-author-name') || true == ampforwp_get_setting('swift-date') || true == ampforwp_get_setting('ampforwp-single-related-posts-switch'))){ ?>
67
  <div class="sp-lt">
68
  <?php if (isset($redux_builder_amp['swift-social-position']) && 'default' == $redux_builder_amp['swift-social-position']){
69
  ampforwp_swift_social_icons();
84
  <?php amp_tags_list();?>
85
  </div>
86
  <?php }
87
+ if( true == ampforwp_get_setting('swift-date') ) { ?>
88
  <div class="post-date">
89
  <?php amp_date(); ?><?php edit_post_link(); ?>
90
  </div>
318
  <?php } ?>
319
  <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
320
  <li>
321
+ <a class="s_wp" target="_blank" href="https://api.whatsapp.com/send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
322
  </li>
323
  <?php } ?>
324
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
411
  <?php amp_tags_list();?>
412
  </div>
413
  <?php }
414
+ if( true == ampforwp_get_setting('swift-date') ) { ?>
415
  <div class="post-date">
416
  <?php amp_date(); ?><?php edit_post_link(); ?>
417
  </div>
templates/design-manager/swift/style.php CHANGED
@@ -1,6 +1,10 @@
1
  <?php global $redux_builder_amp;
2
  $font_content = '';
3
  $font_content = ampforwp_get_setting('amp_font_selector_content_single');
 
 
 
 
4
  ?>
5
  <?php if(!isset($redux_builder_amp['amp_font_selector']) || $redux_builder_amp['amp_font_selector'] == 1 || empty($redux_builder_amp['amp_font_selector'])){
6
  if(!ampforwp_levelup_compatibility('levelup_theme_and_elementor')){ // Level up Condition starts ?>
@@ -66,7 +70,7 @@ figure.aligncenter amp-img {margin: 0 auto;}
66
  if( class_exists('\Elementor\Plugin') && \Elementor\Plugin::$instance->db->is_built_with_elementor($post->ID) && (is_page() || ampforwp_is_front_page() ) && ( function_exists( 'amp_pagebuilder_compatibility_init' ) || class_exists('Elementor_For_Amp') ) ) { }
67
  else{ ?>.cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px} <?php } ?>
68
  <?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
69
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
70
  @font-face {font-family: 'icomoon';font-display: swap;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf');}
71
  <?php } // Swift icomoon icons condition ends ?>
72
  header .cntr{
@@ -100,18 +104,18 @@ header .cntr{
100
  <?php } // Sickt CSS Ends ?>
101
  .h_m_w{width:100%;clear:both;display: inline-flex;<?php if(ampforwp_get_setting('swift-height-control')){?>height:<?php echo esc_html(ampforwp_get_setting('swift-height-control'))?>;<?php } ?>}
102
  .icon-src:before{
103
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
104
  content: "\e8b6";font-family: 'icomoon';font-size: 23px;
105
  <?php }
106
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
107
  content:"\f002";font-family: "Font Awesome 5 Free";font-weight:600;font-size:18px;
108
  <?php } ?>
109
  }
110
  .isc:after{
111
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
112
  content: "\e8cc";font-family: 'icomoon';font-size: 20px;
113
  <?php }
114
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
115
  content:"\f07a";font-family: "Font Awesome 5 Free";font-weight:600;font-size:16px;
116
  <?php } ?>
117
  }
@@ -119,10 +123,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
119
  <?php if(isset($redux_builder_amp['swift-element-color-control'] ['rgba']) && $redux_builder_amp['swift-element-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-color-control']['rgba'])?>;<?php } ?>}
120
  <?php if ( true == ampforwp_get_setting('ampforwp-callnow-button') ) { ?>
121
  .h-call a:after{
122
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
123
  content: "\e0cd";font-family: 'icomoon';
124
  <?php }
125
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
126
  content:"\f095";font-family: "Font Awesome 5 Free";font-weight:600;font-size:15px;
127
  <?php } ?>
128
  }
@@ -178,10 +182,10 @@ if( true == $redux_builder_amp['amp-swift-search-feature'] ){ ?>
178
  .lb-t img {margin: auto;position: absolute;top: 0;left:0;right:0;bottom: 0;max-height: 0%;max-width: 0%;border: 3px solid white;box-shadow: 0px 0px 8px rgba(0,0,0,.3);box-sizing: border-box;-webkit-transition: .5s ease-in-out;transition: .5s ease-in-out;}
179
  a.lb-x {display: block;width:50px;height:50px;box-sizing: border-box;background: tranparent;color: black;text-decoration: none;position: absolute;top: -80px;right: 0;-webkit-transition: .5s ease-in-out;transition: .5s ease-in-out;}
180
  a.lb-x:after {
181
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
182
  content: "\e5cd";font-family: 'icomoon';font-size: 30px;
183
  <?php }
184
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
185
  content:"\f00d";font-family: "Font Awesome 5 Free";font-weight:600;font-size:22px;
186
  <?php } ?>
187
  line-height: 0;display: block;text-indent: 1px;
@@ -195,10 +199,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
195
  .lb-btn #amp-search-submit{padding:10px;cursor:pointer;}
196
  .amp-search-wrapper{width: 80%;margin: 0 auto;position: relative;}
197
  .overlay-search:before {
198
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
199
  content: "\e8b6";font-family: 'icomoon';font-size: 24px;
200
  <?php }
201
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
202
  content:"\f002";font-family: "Font Awesome 5 Free";font-weight:600;font-size:18px;
203
  <?php } ?>
204
  position: absolute;right:0;cursor: pointer;top:4px;
@@ -228,19 +232,19 @@ if($redux_builder_amp['menu-type'] == '1'){?>
228
  .tg:checked + .hamb-mnu > .fsc{display: block;background: rgba(0,0,0,.9);height:-webkit-fill-available;}
229
  .t-btn, .c-btn{cursor: pointer;}
230
  .t-btn:after{
231
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
232
  content:"\e5d2";font-family: "icomoon";font-size:28px;
233
  <?php }
234
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
235
  content:"\f0c9";font-family: "Font Awesome 5 Free";font-weight:600;font-size:22px;
236
  <?php } ?>
237
  display:inline-block;
238
  <?php if( isset($redux_builder_amp['swift-element-color-control']['rgba']) && $redux_builder_amp['swift-element-color-control']['rgba']){ ?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-color-control']['rgba'])?>;<?php } ?>}
239
  .c-btn:after{
240
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
241
  content: "\e5cd";font-family: "icomoon";font-size: 20px;
242
  <?php }
243
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
244
  content:"\f00d";font-family: "Font Awesome 5 Free";font-weight:600;font-size:18px;
245
  <?php } ?>
246
  <?php if(isset($redux_builder_amp['swift-element-overlay-color-control'] ['rgba']) && $redux_builder_amp['swift-element-overlay-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;<?php } ?>line-height: 0;display: block;text-indent: 1px;}
@@ -250,10 +254,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
250
  .m-menu{display: inline-block;width: 100%;padding: 2px 20px 10px 20px;}
251
  .m-scrl{overflow-y: auto;display: inline-block;width: 100%;overflow: scroll;max-height: 94vh;}
252
  .m-menu .amp-menu .toggle:after{
253
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
254
  content: "\e313";font-family: 'icomoon';font-size:25px;
255
  <?php }
256
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
257
  content:"\f107";font-family: "Font Awesome 5 Free";font-weight:600;font-size:20px;
258
  <?php } ?>
259
  display: inline-block;top: 1px;padding: 5px;transform: rotate(270deg);cursor: pointer;border-radius: 35px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;}
@@ -300,18 +304,18 @@ padding: <?php echo esc_html($redux_builder_amp['primary-menu-padding-control'][
300
  .p-menu li ul li{display: block;position: relative;}
301
  .p-menu ul li.menu-item-has-children .sub-menu li a{padding:7px;}
302
  .p-menu ul li.menu-item-has-children > a:after{
303
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
304
  content: "\e313";font-family: 'icomoon';font-size: 16px;right:10px;top: 3px;
305
  <?php }
306
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
307
  content:"\f107";font-family: "Font Awesome 5 Free";font-weight:600;font-size:14px;right: 6px;top: 1px;
308
  <?php } ?>
309
  display: inline-block;top: 3px;font-size: 16px;color: rgba(0,41,96,1);position:relative;padding-left: 10px;line-height:0;right:10px;color:<?php echo ampforwp_sanitize_color($redux_builder_amp['primary-menu-text-scheme']['rgba'])?>;}
310
  .p-menu .amp-menu li.menu-item-has-children>ul>li {padding-left: 0px;margin-right:0;}
311
  .p-menu li.menu-item-has-children:hover > a:after{transform:rotate(180deg);
312
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
313
  right:0px;
314
- <?php } if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
315
  right:-3px;
316
  <?php } ?>}
317
  <?php } else { ?>
@@ -466,7 +470,7 @@ if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
466
  blockquote p:before {content: "";border-top: 8px solid #000;width: 115px;line-height: 40px;display: inline-block;position: absolute;top: 0;}
467
  .form-submit #submit{background-color: #005be2;font-size: 14px;text-align: center;border-radius: 3px;font-weight: 500;color: #fff;cursor: pointer;margin: 0;border: 0;padding: 11px 21px;}
468
  #respond p {margin: 12px 0;}
469
- <?php if( !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) && ampforwp_get_comments_status() ){ ?>
470
  .amp-comment-button{background-color: <?php echo ampforwp_sanitize_color($swift_cs_color) ?>;font-size: 15px;float: none;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
471
  .amp-comment-button .nocomments{color: #fff;display: block;padding: 7px 0px 8px 0px;}
472
  .cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
@@ -543,10 +547,10 @@ p.nocomments {padding: 10px;color: #fff;}
543
  .sf-img figure{margin:0;}
544
  .sf-img .wp-caption-text{width: 1100px;text-align: left;margin: 0 auto;color: #a1a1a1;font-size: 14px;line-height:20px;font-weight: 500;border-bottom: 1px solid #ccc;padding: 15px 0px;}
545
  .sf-img .wp-caption-text:before{
546
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
547
  content:"\e412";font-family: 'icomoon';font-size:24px;
548
  <?php }
549
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
550
  content:"\f030";font-family: "Font Awesome 5 Free";font-weight:600;font-size: 20px;
551
  <?php } ?>
552
  position: relative;top: 4px;opacity: 0.4;margin-right: 5px;}
@@ -554,7 +558,9 @@ p.nocomments {padding: 10px;color: #fff;}
554
  .sp-cnt{margin-top: 40px;clear: both;width: 100%;display: inline-block; }
555
  .sp-rl{display:inline-flex;width:100%;}
556
  .sp-rt{width: 72%;margin-left: 60px;flex-direction: column;justify-content: space-around;order: 1;} <?php } ?>
 
557
  .sp-lt{display: flex;flex-direction: column;flex: 1 0 20%;order: 0;max-width:237px;}
 
558
  .ss-ic, .sp-athr, .amp-tags, .post-date{padding-bottom:20px;border-bottom:1px dotted #ccc;}
559
  .shr-txt, .athr-tx, .amp-tags > span:nth-child(1), .amp-related-posts-title, .related-title, .r-pf h3{margin-bottom: 12px;}
560
  .shr-txt, .athr-tx, .r-pf h3, .amp-tags > span:nth-child(1), .amp-related-posts-title, .post-date, .related-title{display: block;}
@@ -727,11 +733,6 @@ letter-spacing: 0.10px;margin-top: 5px;font-weight: 400;}
727
  .related_posts .related_link p{word-break: break-word;color: #444;font-size: 13px;line-height: 20px;
728
  letter-spacing: 0.10px;margin-top: 5px;font-weight: 400;}
729
  <?php } ?>
730
- <?php if(is_single() && $redux_builder_amp['enable-single-social-icons'] ){?>
731
- .body.single-post{
732
- padding-bottom:40px;
733
- }
734
- <?php } ?>
735
  <?php if( true == ampforwp_get_setting('amp-author-description') ) { ?>
736
  .sp-rt .amp-author {padding: 20px 20px;border-radius: 0;background: #f9f9f9;border: 1px solid #ececec;display: inline-block;width: 100%;}
737
  .sp-rt .amp-author-image{float:left;}
@@ -752,6 +753,7 @@ letter-spacing: 0.10px;margin-top: 5px;font-weight: 400;}
752
  .ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
753
  .ampforwp_post_pagination p{margin: 0;font-size: 18px;color: #444;font-weight: 500;margin-bottom:10px;}
754
  .ampforwp_post_pagination p a{color:#005be2;padding:0px 10px;}
 
755
  .cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
756
  .amp-comment-button{background-color: <?php echo ampforwp_sanitize_color($swift_cs_color) ?>;font-size: 15px;float: none;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
757
  .form-submit #submit{background-color: #005be2;font-size: 14px;text-align: center;border-radius: 3px;font-weight: 500;color: #fff;cursor: pointer;margin: 0;border: 0;padding: 11px 21px;}
@@ -772,6 +774,7 @@ letter-spacing: 0.10px;margin-top: 5px;font-weight: 400;}
772
  .comment-content{margin-top:6px;width:100%;display:inline-block;}
773
  .comment-content p{font-size: 14px;color: #333;line-height: 22px;font-weight: 400;margin: 0;}
774
  .comment-meta amp-img{float:left;margin-right:10px;border-radius:50%;width:40px;}
 
775
  .sp-rt .amp-author {margin-top: 5px;}
776
  <?php } ?>
777
  .cntn-wrp a{margin:10px 0px;color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;}
@@ -817,11 +820,15 @@ if ( true == ampforwp_get_setting('ampforwp-disqus-comments-support') ) {?>
817
  @media(max-width:768px){
818
  .tl-exc {font-size: 14px;margin-top: 3px;line-height: 22px;}
819
  .sp-rl {display: inline-block;width: 100%;}
 
820
  .sp-lt {width: 100%;margin-top: 20px;max-width:100%;}
 
821
  .sp-cnt{margin-top: 15px;}
822
  .r-pf h3{padding-top:20px;border-top:1px dotted #ccc; }
823
  .r-pf {margin-top:20px;}
 
824
  .cmts{margin:20px 0px 20px 0px;}
 
825
  .sp-rt {width: 100%;margin-left: 0;}
826
  .sp-rt .amp-author {padding: 20px 15px;}
827
  #pagination {margin: 20px 0px 20px 0px;border-top: none;}
@@ -945,11 +952,11 @@ if ( isset($redux_builder_amp['menu-social']) && $redux_builder_amp['menu-social
945
  text-align: center;
946
  }
947
  .m-s-i li{
948
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
949
  font-family: 'icomoon';
950
  font-size: 20px;
951
  <?php }
952
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
953
  font-family: "Font Awesome 5 Brands";
954
  font-size:16px;
955
  <?php } ?>
@@ -967,80 +974,80 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
967
  }
968
  <?php if($redux_builder_amp['enbl-fb']){?>
969
  .s_fb:after {
970
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
971
  content: "\e92d";
972
  <?php }
973
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
974
  content: "\f082";
975
  <?php } ?>
976
  }
977
  <?php }
978
  if($redux_builder_amp['enbl-tw']){ ?>
979
  .s_tw:after {
980
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
981
  content: "\e942";
982
  <?php }
983
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
984
  content:"\f099";
985
  <?php } ?>
986
  }
987
  <?php }
988
  if($redux_builder_amp['enbl-gol']){?>
989
  .s_gp:after {
990
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
991
  content: "\e931";
992
  <?php }
993
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
994
  content:"\f0d5";
995
  <?php } ?>
996
  }
997
  <?php }
998
  if($redux_builder_amp['enbl-lk']){?>
999
  .s_lk:after {
1000
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1001
  content: "\e934";
1002
  <?php }
1003
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1004
  content:"\f08c";
1005
  <?php } ?>
1006
  }
1007
  <?php }
1008
  if($redux_builder_amp['enbl-pt']){?>
1009
  .s_pt:after {
1010
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1011
  content:"\e937";
1012
  <?php }
1013
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1014
  content:"\f0d2";
1015
  <?php } ?>
1016
  }
1017
  <?php }
1018
  if($redux_builder_amp['enbl-yt']){?>
1019
  .s_yt:after {
1020
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1021
  content: "\e947";
1022
  <?php }
1023
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1024
  content:"\f167";
1025
  <?php } ?>
1026
  }
1027
  <?php }
1028
  if($redux_builder_amp['enbl-inst']){?>
1029
  .s_inst:after {
1030
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1031
  content: "\e932";
1032
  <?php }
1033
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1034
  content:"\f16d";
1035
  <?php } ?>
1036
  }
1037
  <?php }
1038
  if($redux_builder_amp['enbl-vk']){?>
1039
  .ss-ic .s_vk:after {
1040
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1041
  content: "\e944";
1042
  <?php }
1043
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1044
  content:"";
1045
  display:inline-block;
1046
  background-image:url(<?php echo AMPFORWP_IMAGE_DIR . '/vk-img.png' ?>);
@@ -1051,20 +1058,20 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1051
  <?php }
1052
  if($redux_builder_amp['enbl-rd']){?>
1053
  .s_rd:after {
1054
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1055
  content: "\e938";
1056
  <?php }
1057
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1058
  content:"\f281";
1059
  <?php } ?>;
1060
  }
1061
  <?php }
1062
  if($redux_builder_amp['enbl-tbl']){?>
1063
  .s_tbl:after {
1064
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1065
  content: "\e940";
1066
  <?php }
1067
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1068
  content:"\f173";
1069
  <?php } ?>
1070
  }
@@ -1401,10 +1408,10 @@ if(ampforwp_get_setting('ftr2-gapping')){
1401
  opacity: 0;
1402
  }
1403
  .w-bl .search-button:after{
1404
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1405
  content: "\e8b6";font-family: 'icomoon';font-size: 23px;
1406
  <?php }
1407
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1408
  content:"\f002";font-family: "Font Awesome 5 Free";font-weight:600;font-size:18px;
1409
  <?php } ?>
1410
  display:inline-block;
@@ -1547,10 +1554,10 @@ else{ // Default Footer CSS ?>
1547
  //Sticky Social Icons
1548
  if(is_single() || is_page() ){ ?>
1549
  .ss-ic ul li{
1550
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1551
  font-family: 'icomoon';
1552
  <?php }
1553
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1554
  font-family: "Font Awesome 5 Brands";
1555
  font-size:16px;
1556
  <?php } ?>
@@ -1559,10 +1566,10 @@ list-style-type:none;display:inline-block;}
1559
  <?php if($redux_builder_amp['enable-single-facebook-share'] || $redux_builder_amp['enbl-fb'] ){?>
1560
  .ss-ic ul li .s_fb{ color:#fff;background:#3b5998;}
1561
  .s_fb:after{
1562
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1563
  content: "\e92d";
1564
  <?php }
1565
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1566
  content:"\f09a";
1567
  <?php } ?>
1568
  }
@@ -1570,21 +1577,25 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1570
  if(ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
1571
  .s_fb_ms{color:#fff;background:#3b5998;}
1572
  .s_fb_ms:after{
1573
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1574
  content: "\e935";
1575
  <?php }
1576
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1577
  content:"\f39f";
1578
  <?php } ?>
1579
  }
1580
  <?php }
 
 
 
 
1581
  if($redux_builder_amp['enable-single-twitter-share'] || $redux_builder_amp['enbl-tw']){?>
1582
  .s_tw{background:#1da1f2;}
1583
  .s_tw:after{
1584
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1585
  content: "\e942";
1586
  <?php }
1587
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1588
  content:"\f099";
1589
  <?php } ?>
1590
  }
@@ -1592,10 +1603,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1592
  if($redux_builder_amp['enable-single-gplus-share'] || $redux_builder_amp['enbl-gol']){?>
1593
  .s_gp{background:#dd4b39;}
1594
  .s_gp:after{
1595
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1596
  content: "\e931";
1597
  <?php }
1598
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1599
  content:"\f0d5";
1600
  <?php } ?>
1601
  }
@@ -1603,10 +1614,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1603
  if($redux_builder_amp['enable-single-linkedin-share'] || $redux_builder_amp['enbl-lk']){?>
1604
  .s_lk{background:#0077b5;}
1605
  .s_lk:after{
1606
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1607
  content: "\e934";
1608
  <?php }
1609
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1610
  content:"\f08c";
1611
  <?php } ?>
1612
  }
@@ -1614,10 +1625,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1614
  if($redux_builder_amp['enable-single-pinterest-share'] || isset($redux_builder_amp['enbl-pt']) && $redux_builder_amp['enbl-pt']){?>
1615
  .s_pt{background:#bd081c;}
1616
  .s_pt:after{
1617
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1618
  content:"\e937";
1619
  <?php }
1620
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1621
  content:"\f0d2";
1622
  <?php } ?>
1623
  }
@@ -1625,10 +1636,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1625
  if($redux_builder_amp['enable-single-email-share']){?>
1626
  .s_em{background:#b7b7b7;}
1627
  .s_em:after{
1628
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1629
  content: "\e930";
1630
  <?php }
1631
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1632
  content:"\f0e0";
1633
  font-family: "Font Awesome 5 Free";
1634
  <?php } ?>
@@ -1637,10 +1648,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1637
  if($redux_builder_amp['enable-single-whatsapp-share']){?>
1638
  .s_wp{background:#075e54;}
1639
  .s_wp:after{
1640
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1641
  content: "\e946";
1642
  <?php }
1643
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1644
  content:"\f232";
1645
  <?php } ?>
1646
  }
@@ -1648,10 +1659,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1648
  if($redux_builder_amp['enable-single-odnoklassniki-share']){?>
1649
  .s_od{background:#ed812b;}
1650
  .s_od:after{
1651
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1652
  content: "\e936";
1653
  <?php }
1654
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1655
  content:"\f263";
1656
  <?php } ?>
1657
  }
@@ -1659,10 +1670,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1659
  if($redux_builder_amp['enable-single-vk-share']){?>
1660
  .s_vk{background:#45668e;}
1661
  .s_vk:after{
1662
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1663
  content: "\e944";
1664
  <?php }
1665
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1666
  content:"";
1667
  display:inline-block;
1668
  background-image:url(<?php echo AMPFORWP_IMAGE_DIR . '/vk-img.png' ?>);
@@ -1680,10 +1691,10 @@ if(ampforwp_get_setting('enable-single-mewe-share') == true) { ?>
1680
  if($redux_builder_amp['enable-single-reddit-share']){?>
1681
  .s_rd{background:#ff4500;}
1682
  .s_rd:after{
1683
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1684
  content: "\e938";
1685
  <?php }
1686
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1687
  content:"\f281";
1688
  <?php } ?>
1689
  }
@@ -1691,10 +1702,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1691
  if($redux_builder_amp['enable-single-tumblr-share']){?>
1692
  .s_tb{background:#35465c;}
1693
  .s_tb:after{
1694
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1695
  content: "\e940";
1696
  <?php }
1697
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1698
  content:"\f173";
1699
  <?php } ?>
1700
  }
@@ -1702,10 +1713,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1702
  if($redux_builder_amp['enable-single-telegram-share']){?>
1703
  .s_tg{background:#0088cc;}
1704
  .s_tg:after{
1705
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1706
  content: "\e93f";
1707
  <?php }
1708
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1709
  content:"\f3fe";
1710
  <?php } ?>
1711
  }
@@ -1713,10 +1724,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1713
  if($redux_builder_amp['enable-single-digg-share']){?>
1714
  .s_dg{background:#005be2;}
1715
  .s_dg:after{
1716
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1717
  content: "\e919";
1718
  <?php }
1719
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1720
  content:"\f1a6";
1721
  <?php } ?>
1722
  }
@@ -1724,10 +1735,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1724
  if($redux_builder_amp['enable-single-stumbleupon-share']){?>
1725
  .s_su{background:#eb4924;}
1726
  .s_su:after{
1727
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1728
  content: "\e93e";
1729
  <?php }
1730
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1731
  content:"\f1a3";
1732
  <?php } ?>
1733
  }
@@ -1735,10 +1746,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1735
  if($redux_builder_amp['enable-single-wechat-share']){?>
1736
  .s_wc{background:#7bb32e;}
1737
  .s_wc:after{
1738
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1739
  content: "\e945";
1740
  <?php }
1741
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1742
  content:"\f1d7";
1743
  <?php } ?>
1744
  }
@@ -1746,10 +1757,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1746
  if($redux_builder_amp['enable-single-viber-share']){?>
1747
  .s_vb{background:#59267c;}
1748
  .s_vb:after{
1749
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1750
  content: "\e943";
1751
  <?php }
1752
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1753
  content:"\f409";
1754
  <?php } ?>
1755
  }
@@ -1757,10 +1768,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1757
  if(isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
1758
  .s_ym{background:#e26426}
1759
  .s_ym:after{
1760
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1761
  content: "\e948";
1762
  <?php }
1763
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1764
  content:"\f39f";
1765
  <?php } ?>
1766
  }
@@ -1768,10 +1779,10 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1768
  if(isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
1769
  .s_hb{background:#00a4de}
1770
  .s_hb:after{
1771
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1772
  content: "\e948";
1773
  <?php }
1774
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1775
  content:"";
1776
  display:inline-block;
1777
  background-image:url(<?php echo AMPFORWP_IMAGE_DIR . '/hatena-img.png' ?>);
@@ -1783,26 +1794,43 @@ if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1783
  if(isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
1784
  .s_pk{background:#ef3f56}
1785
  .s_pk:after{
1786
- <?php if ( ampforwp_get_setting('ampforwp_font_icon') == 'swift-icons' ){ ?>
1787
  content: "\e949";
1788
  <?php }
1789
- if ( ampforwp_get_setting('ampforwp_font_icon') == 'fontawesome-icons' ){ ?>
1790
  content:"\f265";
1791
  <?php } ?>
1792
  }
1793
  <?php } ?>
 
1794
  .s_stk{background: #f1f1f1;display:inline-block;width: 100%;padding:0;position:fixed;bottom: 0;text-align: center;border: 0;}
1795
  .s_stk ul{width:100%;display:inline-flex;}
1796
- .s_stk ul li{flex-direction: column;flex-basis: 0;flex: 1 0 5%;max-width: calc(100% - 10px);display: flex;height:35px}
1797
  .s_stk li a{margin:0;border-radius: 0;padding:12px;}
1798
-
1799
- <?php } ?>
1800
  <?php } // levelup condition ends ?>
1801
- <?php if(is_single() && $redux_builder_amp['enable-single-social-icons'] ){?>
1802
  .body.single-post{
1803
  padding-bottom:40px;
1804
  }
1805
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1806
  <?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
1807
  .content-wrapper a, .breadcrumb ul li a, .srp ul li, .rr a{transition: all 0.3s ease-in-out 0s;}
1808
  [class^="icon-"], [class*=" icon-"] {font-family: 'icomoon';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
1
  <?php global $redux_builder_amp;
2
  $font_content = '';
3
  $font_content = ampforwp_get_setting('amp_font_selector_content_single');
4
+ $ampforwp_font_icon = ampforwp_get_setting('ampforwp_font_icon');
5
+ if ( empty($ampforwp_font_icon) ) {
6
+ $ampforwp_font_icon = 'swift-icons';
7
+ }
8
  ?>
9
  <?php if(!isset($redux_builder_amp['amp_font_selector']) || $redux_builder_amp['amp_font_selector'] == 1 || empty($redux_builder_amp['amp_font_selector'])){
10
  if(!ampforwp_levelup_compatibility('levelup_theme_and_elementor')){ // Level up Condition starts ?>
70
  if( class_exists('\Elementor\Plugin') && \Elementor\Plugin::$instance->db->is_built_with_elementor($post->ID) && (is_page() || ampforwp_is_front_page() ) && ( function_exists( 'amp_pagebuilder_compatibility_init' ) || class_exists('Elementor_For_Amp') ) ) { }
71
  else{ ?>.cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px} <?php } ?>
72
  <?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
73
+ if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
74
  @font-face {font-family: 'icomoon';font-display: swap;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf');}
75
  <?php } // Swift icomoon icons condition ends ?>
76
  header .cntr{
104
  <?php } // Sickt CSS Ends ?>
105
  .h_m_w{width:100%;clear:both;display: inline-flex;<?php if(ampforwp_get_setting('swift-height-control')){?>height:<?php echo esc_html(ampforwp_get_setting('swift-height-control'))?>;<?php } ?>}
106
  .icon-src:before{
107
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
108
  content: "\e8b6";font-family: 'icomoon';font-size: 23px;
109
  <?php }
110
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
111
  content:"\f002";font-family: "Font Awesome 5 Free";font-weight:600;font-size:18px;
112
  <?php } ?>
113
  }
114
  .isc:after{
115
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
116
  content: "\e8cc";font-family: 'icomoon';font-size: 20px;
117
  <?php }
118
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
119
  content:"\f07a";font-family: "Font Awesome 5 Free";font-weight:600;font-size:16px;
120
  <?php } ?>
121
  }
123
  <?php if(isset($redux_builder_amp['swift-element-color-control'] ['rgba']) && $redux_builder_amp['swift-element-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-color-control']['rgba'])?>;<?php } ?>}
124
  <?php if ( true == ampforwp_get_setting('ampforwp-callnow-button') ) { ?>
125
  .h-call a:after{
126
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
127
  content: "\e0cd";font-family: 'icomoon';
128
  <?php }
129
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
130
  content:"\f095";font-family: "Font Awesome 5 Free";font-weight:600;font-size:15px;
131
  <?php } ?>
132
  }
182
  .lb-t img {margin: auto;position: absolute;top: 0;left:0;right:0;bottom: 0;max-height: 0%;max-width: 0%;border: 3px solid white;box-shadow: 0px 0px 8px rgba(0,0,0,.3);box-sizing: border-box;-webkit-transition: .5s ease-in-out;transition: .5s ease-in-out;}
183
  a.lb-x {display: block;width:50px;height:50px;box-sizing: border-box;background: tranparent;color: black;text-decoration: none;position: absolute;top: -80px;right: 0;-webkit-transition: .5s ease-in-out;transition: .5s ease-in-out;}
184
  a.lb-x:after {
185
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
186
  content: "\e5cd";font-family: 'icomoon';font-size: 30px;
187
  <?php }
188
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
189
  content:"\f00d";font-family: "Font Awesome 5 Free";font-weight:600;font-size:22px;
190
  <?php } ?>
191
  line-height: 0;display: block;text-indent: 1px;
199
  .lb-btn #amp-search-submit{padding:10px;cursor:pointer;}
200
  .amp-search-wrapper{width: 80%;margin: 0 auto;position: relative;}
201
  .overlay-search:before {
202
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
203
  content: "\e8b6";font-family: 'icomoon';font-size: 24px;
204
  <?php }
205
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
206
  content:"\f002";font-family: "Font Awesome 5 Free";font-weight:600;font-size:18px;
207
  <?php } ?>
208
  position: absolute;right:0;cursor: pointer;top:4px;
232
  .tg:checked + .hamb-mnu > .fsc{display: block;background: rgba(0,0,0,.9);height:-webkit-fill-available;}
233
  .t-btn, .c-btn{cursor: pointer;}
234
  .t-btn:after{
235
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
236
  content:"\e5d2";font-family: "icomoon";font-size:28px;
237
  <?php }
238
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
239
  content:"\f0c9";font-family: "Font Awesome 5 Free";font-weight:600;font-size:22px;
240
  <?php } ?>
241
  display:inline-block;
242
  <?php if( isset($redux_builder_amp['swift-element-color-control']['rgba']) && $redux_builder_amp['swift-element-color-control']['rgba']){ ?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-color-control']['rgba'])?>;<?php } ?>}
243
  .c-btn:after{
244
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
245
  content: "\e5cd";font-family: "icomoon";font-size: 20px;
246
  <?php }
247
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
248
  content:"\f00d";font-family: "Font Awesome 5 Free";font-weight:600;font-size:18px;
249
  <?php } ?>
250
  <?php if(isset($redux_builder_amp['swift-element-overlay-color-control'] ['rgba']) && $redux_builder_amp['swift-element-overlay-color-control'] ['rgba']){?>color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;<?php } ?>line-height: 0;display: block;text-indent: 1px;}
254
  .m-menu{display: inline-block;width: 100%;padding: 2px 20px 10px 20px;}
255
  .m-scrl{overflow-y: auto;display: inline-block;width: 100%;overflow: scroll;max-height: 94vh;}
256
  .m-menu .amp-menu .toggle:after{
257
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
258
  content: "\e313";font-family: 'icomoon';font-size:25px;
259
  <?php }
260
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
261
  content:"\f107";font-family: "Font Awesome 5 Free";font-weight:600;font-size:20px;
262
  <?php } ?>
263
  display: inline-block;top: 1px;padding: 5px;transform: rotate(270deg);cursor: pointer;border-radius: 35px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;}
304
  .p-menu li ul li{display: block;position: relative;}
305
  .p-menu ul li.menu-item-has-children .sub-menu li a{padding:7px;}
306
  .p-menu ul li.menu-item-has-children > a:after{
307
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
308
  content: "\e313";font-family: 'icomoon';font-size: 16px;right:10px;top: 3px;
309
  <?php }
310
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
311
  content:"\f107";font-family: "Font Awesome 5 Free";font-weight:600;font-size:14px;right: 6px;top: 1px;
312
  <?php } ?>
313
  display: inline-block;top: 3px;font-size: 16px;color: rgba(0,41,96,1);position:relative;padding-left: 10px;line-height:0;right:10px;color:<?php echo ampforwp_sanitize_color($redux_builder_amp['primary-menu-text-scheme']['rgba'])?>;}
314
  .p-menu .amp-menu li.menu-item-has-children>ul>li {padding-left: 0px;margin-right:0;}
315
  .p-menu li.menu-item-has-children:hover > a:after{transform:rotate(180deg);
316
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
317
  right:0px;
318
+ <?php } if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
319
  right:-3px;
320
  <?php } ?>}
321
  <?php } else { ?>
470
  blockquote p:before {content: "";border-top: 8px solid #000;width: 115px;line-height: 40px;display: inline-block;position: absolute;top: 0;}
471
  .form-submit #submit{background-color: #005be2;font-size: 14px;text-align: center;border-radius: 3px;font-weight: 500;color: #fff;cursor: pointer;margin: 0;border: 0;padding: 11px 21px;}
472
  #respond p {margin: 12px 0;}
473
+ <?php if( !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) && ampforwp_get_comments_status() && true == ampforwp_get_setting('wordpress-comments-support') ){ ?>
474
  .amp-comment-button{background-color: <?php echo ampforwp_sanitize_color($swift_cs_color) ?>;font-size: 15px;float: none;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
475
  .amp-comment-button .nocomments{color: #fff;display: block;padding: 7px 0px 8px 0px;}
476
  .cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
547
  .sf-img figure{margin:0;}
548
  .sf-img .wp-caption-text{width: 1100px;text-align: left;margin: 0 auto;color: #a1a1a1;font-size: 14px;line-height:20px;font-weight: 500;border-bottom: 1px solid #ccc;padding: 15px 0px;}
549
  .sf-img .wp-caption-text:before{
550
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
551
  content:"\e412";font-family: 'icomoon';font-size:24px;
552
  <?php }
553
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
554
  content:"\f030";font-family: "Font Awesome 5 Free";font-weight:600;font-size: 20px;
555
  <?php } ?>
556
  position: relative;top: 4px;opacity: 0.4;margin-right: 5px;}
558
  .sp-cnt{margin-top: 40px;clear: both;width: 100%;display: inline-block; }
559
  .sp-rl{display:inline-flex;width:100%;}
560
  .sp-rt{width: 72%;margin-left: 60px;flex-direction: column;justify-content: space-around;order: 1;} <?php } ?>
561
+ <?php if(true == ampforwp_get_setting('enable-single-post-social-icons') || true == ampforwp_get_setting('amp-author-name') || true == ampforwp_get_setting('swift-date') || true == ampforwp_get_setting('ampforwp-single-related-posts-switch')){ ?>
562
  .sp-lt{display: flex;flex-direction: column;flex: 1 0 20%;order: 0;max-width:237px;}
563
+ <?php } ?>
564
  .ss-ic, .sp-athr, .amp-tags, .post-date{padding-bottom:20px;border-bottom:1px dotted #ccc;}
565
  .shr-txt, .athr-tx, .amp-tags > span:nth-child(1), .amp-related-posts-title, .related-title, .r-pf h3{margin-bottom: 12px;}
566
  .shr-txt, .athr-tx, .r-pf h3, .amp-tags > span:nth-child(1), .amp-related-posts-title, .post-date, .related-title{display: block;}
733
  .related_posts .related_link p{word-break: break-word;color: #444;font-size: 13px;line-height: 20px;
734
  letter-spacing: 0.10px;margin-top: 5px;font-weight: 400;}
735
  <?php } ?>
 
 
 
 
 
736
  <?php if( true == ampforwp_get_setting('amp-author-description') ) { ?>
737
  .sp-rt .amp-author {padding: 20px 20px;border-radius: 0;background: #f9f9f9;border: 1px solid #ececec;display: inline-block;width: 100%;}
738
  .sp-rt .amp-author-image{float:left;}
753
  .ampforwp_post_pagination{width:100%;text-align:center;display:inline-block;}
754
  .ampforwp_post_pagination p{margin: 0;font-size: 18px;color: #444;font-weight: 500;margin-bottom:10px;}
755
  .ampforwp_post_pagination p a{color:#005be2;padding:0px 10px;}
756
+ <?php if( true == ampforwp_get_setting('wordpress-comments-support')){ ?>
757
  .cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
758
  .amp-comment-button{background-color: <?php echo ampforwp_sanitize_color($swift_cs_color) ?>;font-size: 15px;float: none;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
759
  .form-submit #submit{background-color: #005be2;font-size: 14px;text-align: center;border-radius: 3px;font-weight: 500;color: #fff;cursor: pointer;margin: 0;border: 0;padding: 11px 21px;}
774
  .comment-content{margin-top:6px;width:100%;display:inline-block;}
775
  .comment-content p{font-size: 14px;color: #333;line-height: 22px;font-weight: 400;margin: 0;}
776
  .comment-meta amp-img{float:left;margin-right:10px;border-radius:50%;width:40px;}
777
+ <?php } ?>
778
  .sp-rt .amp-author {margin-top: 5px;}
779
  <?php } ?>
780
  .cntn-wrp a{margin:10px 0px;color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;}
820
  @media(max-width:768px){
821
  .tl-exc {font-size: 14px;margin-top: 3px;line-height: 22px;}
822
  .sp-rl {display: inline-block;width: 100%;}
823
+ <?php if(true == ampforwp_get_setting('enable-single-post-social-icons') || true == ampforwp_get_setting('amp-author-name') || true == ampforwp_get_setting('swift-date') || true == ampforwp_get_setting('ampforwp-single-related-posts-switch')){ ?>
824
  .sp-lt {width: 100%;margin-top: 20px;max-width:100%;}
825
+ <?php } ?>
826
  .sp-cnt{margin-top: 15px;}
827
  .r-pf h3{padding-top:20px;border-top:1px dotted #ccc; }
828
  .r-pf {margin-top:20px;}
829
+ <?php if(true == ampforwp_get_setting('wordpress-comments-support')){ ?>
830
  .cmts{margin:20px 0px 20px 0px;}
831
+ <?php } ?>
832
  .sp-rt {width: 100%;margin-left: 0;}
833
  .sp-rt .amp-author {padding: 20px 15px;}
834
  #pagination {margin: 20px 0px 20px 0px;border-top: none;}
952
  text-align: center;
953
  }
954
  .m-s-i li{
955
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
956
  font-family: 'icomoon';
957
  font-size: 20px;
958
  <?php }
959
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
960
  font-family: "Font Awesome 5 Brands";
961
  font-size:16px;
962
  <?php } ?>
974
  }
975
  <?php if($redux_builder_amp['enbl-fb']){?>
976
  .s_fb:after {
977
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
978
  content: "\e92d";
979
  <?php }
980
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
981
  content: "\f082";
982
  <?php } ?>
983
  }
984
  <?php }
985
  if($redux_builder_amp['enbl-tw']){ ?>
986
  .s_tw:after {
987
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
988
  content: "\e942";
989
  <?php }
990
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
991
  content:"\f099";
992
  <?php } ?>
993
  }
994
  <?php }
995
  if($redux_builder_amp['enbl-gol']){?>
996
  .s_gp:after {
997
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
998
  content: "\e931";
999
  <?php }
1000
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1001
  content:"\f0d5";
1002
  <?php } ?>
1003
  }
1004
  <?php }
1005
  if($redux_builder_amp['enbl-lk']){?>
1006
  .s_lk:after {
1007
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1008
  content: "\e934";
1009
  <?php }
1010
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1011
  content:"\f08c";
1012
  <?php } ?>
1013
  }
1014
  <?php }
1015
  if($redux_builder_amp['enbl-pt']){?>
1016
  .s_pt:after {
1017
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1018
  content:"\e937";
1019
  <?php }
1020
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1021
  content:"\f0d2";
1022
  <?php } ?>
1023
  }
1024
  <?php }
1025
  if($redux_builder_amp['enbl-yt']){?>
1026
  .s_yt:after {
1027
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1028
  content: "\e947";
1029
  <?php }
1030
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1031
  content:"\f167";
1032
  <?php } ?>
1033
  }
1034
  <?php }
1035
  if($redux_builder_amp['enbl-inst']){?>
1036
  .s_inst:after {
1037
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1038
  content: "\e932";
1039
  <?php }
1040
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1041
  content:"\f16d";
1042
  <?php } ?>
1043
  }
1044
  <?php }
1045
  if($redux_builder_amp['enbl-vk']){?>
1046
  .ss-ic .s_vk:after {
1047
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1048
  content: "\e944";
1049
  <?php }
1050
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1051
  content:"";
1052
  display:inline-block;
1053
  background-image:url(<?php echo AMPFORWP_IMAGE_DIR . '/vk-img.png' ?>);
1058
  <?php }
1059
  if($redux_builder_amp['enbl-rd']){?>
1060
  .s_rd:after {
1061
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1062
  content: "\e938";
1063
  <?php }
1064
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1065
  content:"\f281";
1066
  <?php } ?>;
1067
  }
1068
  <?php }
1069
  if($redux_builder_amp['enbl-tbl']){?>
1070
  .s_tbl:after {
1071
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1072
  content: "\e940";
1073
  <?php }
1074
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1075
  content:"\f173";
1076
  <?php } ?>
1077
  }
1408
  opacity: 0;
1409
  }
1410
  .w-bl .search-button:after{
1411
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1412
  content: "\e8b6";font-family: 'icomoon';font-size: 23px;
1413
  <?php }
1414
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1415
  content:"\f002";font-family: "Font Awesome 5 Free";font-weight:600;font-size:18px;
1416
  <?php } ?>
1417
  display:inline-block;
1554
  //Sticky Social Icons
1555
  if(is_single() || is_page() ){ ?>
1556
  .ss-ic ul li{
1557
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1558
  font-family: 'icomoon';
1559
  <?php }
1560
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1561
  font-family: "Font Awesome 5 Brands";
1562
  font-size:16px;
1563
  <?php } ?>
1566
  <?php if($redux_builder_amp['enable-single-facebook-share'] || $redux_builder_amp['enbl-fb'] ){?>
1567
  .ss-ic ul li .s_fb{ color:#fff;background:#3b5998;}
1568
  .s_fb:after{
1569
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1570
  content: "\e92d";
1571
  <?php }
1572
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1573
  content:"\f09a";
1574
  <?php } ?>
1575
  }
1577
  if(ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
1578
  .s_fb_ms{color:#fff;background:#3b5998;}
1579
  .s_fb_ms:after{
1580
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1581
  content: "\e935";
1582
  <?php }
1583
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1584
  content:"\f39f";
1585
  <?php } ?>
1586
  }
1587
  <?php }
1588
+ if(ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
1589
+ .s_fb_ms{color:#fff;background:#3b5998;}
1590
+ .s_fb_ms:after{content: "\e935";}
1591
+ <?php }
1592
  if($redux_builder_amp['enable-single-twitter-share'] || $redux_builder_amp['enbl-tw']){?>
1593
  .s_tw{background:#1da1f2;}
1594
  .s_tw:after{
1595
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1596
  content: "\e942";
1597
  <?php }
1598
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1599
  content:"\f099";
1600
  <?php } ?>
1601
  }
1603
  if($redux_builder_amp['enable-single-gplus-share'] || $redux_builder_amp['enbl-gol']){?>
1604
  .s_gp{background:#dd4b39;}
1605
  .s_gp:after{
1606
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1607
  content: "\e931";
1608
  <?php }
1609
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1610
  content:"\f0d5";
1611
  <?php } ?>
1612
  }
1614
  if($redux_builder_amp['enable-single-linkedin-share'] || $redux_builder_amp['enbl-lk']){?>
1615
  .s_lk{background:#0077b5;}
1616
  .s_lk:after{
1617
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1618
  content: "\e934";
1619
  <?php }
1620
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1621
  content:"\f08c";
1622
  <?php } ?>
1623
  }
1625
  if($redux_builder_amp['enable-single-pinterest-share'] || isset($redux_builder_amp['enbl-pt']) && $redux_builder_amp['enbl-pt']){?>
1626
  .s_pt{background:#bd081c;}
1627
  .s_pt:after{
1628
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1629
  content:"\e937";
1630
  <?php }
1631
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1632
  content:"\f0d2";
1633
  <?php } ?>
1634
  }
1636
  if($redux_builder_amp['enable-single-email-share']){?>
1637
  .s_em{background:#b7b7b7;}
1638
  .s_em:after{
1639
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1640
  content: "\e930";
1641
  <?php }
1642
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1643
  content:"\f0e0";
1644
  font-family: "Font Awesome 5 Free";
1645
  <?php } ?>
1648
  if($redux_builder_amp['enable-single-whatsapp-share']){?>
1649
  .s_wp{background:#075e54;}
1650
  .s_wp:after{
1651
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1652
  content: "\e946";
1653
  <?php }
1654
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1655
  content:"\f232";
1656
  <?php } ?>
1657
  }
1659
  if($redux_builder_amp['enable-single-odnoklassniki-share']){?>
1660
  .s_od{background:#ed812b;}
1661
  .s_od:after{
1662
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1663
  content: "\e936";
1664
  <?php }
1665
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1666
  content:"\f263";
1667
  <?php } ?>
1668
  }
1670
  if($redux_builder_amp['enable-single-vk-share']){?>
1671
  .s_vk{background:#45668e;}
1672
  .s_vk:after{
1673
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1674
  content: "\e944";
1675
  <?php }
1676
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1677
  content:"";
1678
  display:inline-block;
1679
  background-image:url(<?php echo AMPFORWP_IMAGE_DIR . '/vk-img.png' ?>);
1691
  if($redux_builder_amp['enable-single-reddit-share']){?>
1692
  .s_rd{background:#ff4500;}
1693
  .s_rd:after{
1694
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1695
  content: "\e938";
1696
  <?php }
1697
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1698
  content:"\f281";
1699
  <?php } ?>
1700
  }
1702
  if($redux_builder_amp['enable-single-tumblr-share']){?>
1703
  .s_tb{background:#35465c;}
1704
  .s_tb:after{
1705
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1706
  content: "\e940";
1707
  <?php }
1708
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1709
  content:"\f173";
1710
  <?php } ?>
1711
  }
1713
  if($redux_builder_amp['enable-single-telegram-share']){?>
1714
  .s_tg{background:#0088cc;}
1715
  .s_tg:after{
1716
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1717
  content: "\e93f";
1718
  <?php }
1719
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1720
  content:"\f3fe";
1721
  <?php } ?>
1722
  }
1724
  if($redux_builder_amp['enable-single-digg-share']){?>
1725
  .s_dg{background:#005be2;}
1726
  .s_dg:after{
1727
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1728
  content: "\e919";
1729
  <?php }
1730
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1731
  content:"\f1a6";
1732
  <?php } ?>
1733
  }
1735
  if($redux_builder_amp['enable-single-stumbleupon-share']){?>
1736
  .s_su{background:#eb4924;}
1737
  .s_su:after{
1738
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1739
  content: "\e93e";
1740
  <?php }
1741
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1742
  content:"\f1a3";
1743
  <?php } ?>
1744
  }
1746
  if($redux_builder_amp['enable-single-wechat-share']){?>
1747
  .s_wc{background:#7bb32e;}
1748
  .s_wc:after{
1749
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1750
  content: "\e945";
1751
  <?php }
1752
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1753
  content:"\f1d7";
1754
  <?php } ?>
1755
  }
1757
  if($redux_builder_amp['enable-single-viber-share']){?>
1758
  .s_vb{background:#59267c;}
1759
  .s_vb:after{
1760
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1761
  content: "\e943";
1762
  <?php }
1763
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1764
  content:"\f409";
1765
  <?php } ?>
1766
  }
1768
  if(isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
1769
  .s_ym{background:#e26426}
1770
  .s_ym:after{
1771
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1772
  content: "\e948";
1773
  <?php }
1774
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1775
  content:"\f39f";
1776
  <?php } ?>
1777
  }
1779
  if(isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
1780
  .s_hb{background:#00a4de}
1781
  .s_hb:after{
1782
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1783
  content: "\e948";
1784
  <?php }
1785
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1786
  content:"";
1787
  display:inline-block;
1788
  background-image:url(<?php echo AMPFORWP_IMAGE_DIR . '/hatena-img.png' ?>);
1794
  if(isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
1795
  .s_pk{background:#ef3f56}
1796
  .s_pk:after{
1797
+ <?php if ( $ampforwp_font_icon == 'swift-icons' ){ ?>
1798
  content: "\e949";
1799
  <?php }
1800
+ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
1801
  content:"\f265";
1802
  <?php } ?>
1803
  }
1804
  <?php } ?>
1805
+ <?php if( ampforwp_get_setting('enable-single-social-icons') ){ ?>
1806
  .s_stk{background: #f1f1f1;display:inline-block;width: 100%;padding:0;position:fixed;bottom: 0;text-align: center;border: 0;}
1807
  .s_stk ul{width:100%;display:inline-flex;}
1808
+ .s_stk ul li{flex-direction: column;flex-basis: 0;flex: 1 0 5%;max-width: calc(100% - 10px);display: flex;height:40px}
1809
  .s_stk li a{margin:0;border-radius: 0;padding:12px;}
1810
+ <?php } //Sticky CSS Condition ends
1811
+ } ?>
1812
  <?php } // levelup condition ends ?>
1813
+ <?php if( ampforwp_get_setting('enable-single-social-icons') && is_single() ) { ?>
1814
  .body.single-post{
1815
  padding-bottom:40px;
1816
  }
1817
+ .s_stk{
1818
+ z-index:99999;
1819
+ }
1820
+ .body.single-post .adsforwp-stick-ad, .body.single-post amp-sticky-ad{
1821
+ padding-bottom:45px;
1822
+ padding-top:5px;
1823
+ }
1824
+ .body.single-post .ampforwp-sticky-custom-ad{
1825
+ bottom: 40px;
1826
+ padding: 3px 0px 0px;
1827
+ }
1828
+ .body.single-post .afw a{line-height:0;}
1829
+ .body.single-post amp-sticky-ad amp-sticky-ad-top-padding{height:0px;}
1830
+ <?php } //Sticky CSS Condition ends?>
1831
+ <?php if( ampforwp_get_setting('ampforwp-advertisement-sticky-type') == 3) {?>
1832
+ .btt{z-index:9999;}
1833
+ <?php } // advanced ads type 3 ends here ?>
1834
  <?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
1835
  .content-wrapper a, .breadcrumb ul li a, .srp ul li, .rr a{transition: all 0.3s ease-in-out 0s;}
1836
  [class^="icon-"], [class*=" icon-"] {font-family: 'icomoon';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
templates/features.php CHANGED
@@ -265,6 +265,10 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
265
  if ( is_home() || is_front_page() || is_archive() ){
266
  global $wp;
267
  $current_archive_url = home_url( $wp->request );
 
 
 
 
268
  $amp_url = trailingslashit($current_archive_url);
269
  } else {
270
  $amp_url = AMPforWP\AMPVendor\amp_get_permalink( get_queried_object_id() );
@@ -584,13 +588,13 @@ function ampforwp_new_dir( $dir ) {
584
  if ( is_page() && isset($redux_builder_amp['ampforwp-page-social']) && $redux_builder_amp['ampforwp-page-social'] ) {
585
  $social_check_page = true;
586
  }
587
- if ( '4' === $redux_builder_amp['amp-design-selector'] ) {
588
  $social_check = true;
589
  }
590
- if ( '4' !== $redux_builder_amp['amp-design-selector'] && defined('AMPFORWP_DM_SOCIAL_CHECK') && 'true' === AMPFORWP_DM_SOCIAL_CHECK ) {
591
  $social_check = true;
592
  }
593
- if( $redux_builder_amp['enable-single-social-icons'] == true || defined('AMPFORWP_DM_SOCIAL_CHECK') && AMPFORWP_DM_SOCIAL_CHECK === 'true' ) {
594
  if( (is_singular() || $social_check_page ) && is_socialshare_or_socialsticky_enabled_in_ampforwp() ) {
595
  if ( empty( $data['amp_component_scripts']['amp-social-share'] ) ) {
596
  $data['amp_component_scripts']['amp-social-share'] = 'https://cdn.ampproject.org/v0/amp-social-share-0.1.js';
@@ -1165,7 +1169,7 @@ function ampforwp_remove_schema_data() {
1165
  unset( $wp_filter['rocket_buffer'] );
1166
  // this filter is documented in inc/front/protocol.php.
1167
  $do_rocket_protocol_rewrite = apply_filters( 'do_rocket_protocol_rewrite', false );
1168
- if ( ( get_rocket_option( 'do_cloudflare', 0 ) && get_rocket_option( 'cloudflare_protocol_rewrite', 0 ) || $do_rocket_protocol_rewrite ) ) {
1169
  remove_filter( 'rocket_buffer', 'rocket_protocol_rewrite', PHP_INT_MAX );
1170
  remove_filter( 'wp_calculate_image_srcset', 'rocket_protocol_rewrite_srcset', PHP_INT_MAX );
1171
  }
@@ -1202,13 +1206,17 @@ add_action('amp_post_template_footer','ampforwp_sticky_social_icons');
1202
  function ampforwp_sticky_social_icons(){
1203
  global $redux_builder_amp;
1204
  // Social share in AMP
1205
- $amp_permalink = "";
 
1206
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
1207
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
1208
  } else{
1209
  $amp_permalink = get_the_permalink();
1210
  }
1211
- if( ($redux_builder_amp['enable-single-social-icons'] == true && is_single()) || (is_page() && true == $redux_builder_amp['ampforwp-page-sticky-social'])) {
 
 
 
1212
  $image = '';
1213
  if ( ampforwp_has_post_thumbnail( ) ){
1214
  $image = ampforwp_get_post_thumbnail( 'url', 'full' );
@@ -1238,6 +1246,13 @@ function ampforwp_sticky_social_icons(){
1238
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28"></amp-social-share>
1239
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
1240
  <?php } ?>
 
 
 
 
 
 
 
1241
  <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
1242
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
1243
  <amp-social-share type="twitter"
@@ -1262,7 +1277,7 @@ function ampforwp_sticky_social_icons(){
1262
  <amp-social-share type="linkedin" width="50" height="28" aria-label="linkedin" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
1263
  <?php } ?>
1264
  <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
1265
- <a title="whatsapp share" <?php ampforwp_nofollow_social_links(); ?> href="whatsapp://send?text=<?php echo esc_url($amp_permalink);?>">
1266
  <div class="amp-social-icon">
1267
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluay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@@ -1390,9 +1405,7 @@ function ampforwp_add_proper_post_meta(){
1390
  }
1391
 
1392
  function ampforwp_custom_yoast_meta_homepage(){
1393
- global $redux_builder_amp;
1394
- if ($redux_builder_amp['ampforwp-seo-yoast-meta']) {
1395
- if(! class_exists('YoastSEO_AMP') ) {
1396
  if ( class_exists('WPSEO_Options')) {
1397
  if( method_exists('WPSEO_Options', 'get_option')){
1398
  $options = WPSEO_Options::get_option( 'wpseo_social' );
@@ -1405,10 +1418,8 @@ function ampforwp_custom_yoast_meta_homepage(){
1405
  }
1406
  }
1407
  do_action( 'wpseo_opengraph' );
1408
-
1409
- }//execute only if Glue is deactive
1410
- if(isset($redux_builder_amp['ampforwp-seo-custom-additional-meta']) && $redux_builder_amp['ampforwp-seo-custom-additional-meta']){
1411
- echo strip_tags($redux_builder_amp['ampforwp-seo-custom-additional-meta'], '<link><meta>' );
1412
  }
1413
  }
1414
  }
@@ -1582,6 +1593,13 @@ function ampforwp_replace_title_tags() {
1582
 
1583
  //* We can filter this later if needed:
1584
  $sep = ' | ';
 
 
 
 
 
 
 
1585
  $sep = apply_filters('ampforwp_title_seperator_type', $sep);
1586
 
1587
  if ( is_singular() ) {
@@ -1736,7 +1754,16 @@ function ampforwp_replace_title_tags() {
1736
  }
1737
  //Bridge Qode SEO Compatibility #2538
1738
  if ( function_exists('qode_wp_title') && 'bridge' == ampforwp_get_setting('ampforwp-seo-selection')){
1739
- $site_title = get_post_meta($post_id, "qode_seo_title", true);
 
 
 
 
 
 
 
 
 
1740
  }
1741
  return esc_html( convert_chars( wptexturize( trim( $site_title ) ) ) );
1742
  }
@@ -2551,7 +2578,7 @@ function ampforwp_sidebar_content_sanitizer($sidebar){
2551
  $blacklist_array = array();
2552
  // Remove some blacklist tags from sidebars only when search,archives and categories widgets are active #2835
2553
  if ( is_active_widget(false,false,'search') || is_active_widget(false,false,'archives') || is_active_widget(false,false,'categories') ) {
2554
- $blacklist_array['non-content'] = true;
2555
  }
2556
  ob_start();
2557
  dynamic_sidebar( $sidebar );
@@ -6156,6 +6183,10 @@ function ampforwp_totalplus_comp_admin() {
6156
  $screen = get_current_screen();
6157
  if ( 'toplevel_page_amp_options' == $screen->base ) {
6158
  remove_action('admin_enqueue_scripts', 'total_plus_admin_scripts', 100);
 
 
 
 
6159
  }
6160
  }
6161
  // uploading the images with SVG format #2431
@@ -6710,3 +6741,52 @@ function ampforwp_webp_featured_image() {
6710
  <?php
6711
  }
6712
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  if ( is_home() || is_front_page() || is_archive() ){
266
  global $wp;
267
  $current_archive_url = home_url( $wp->request );
268
+ // If its custom permalink with /index.php/ #3279
269
+ if ( is_archive() && false !== strpos($wp->matched_rule, 'index.php') && false === strpos($current_archive_url, 'index.php') ) {
270
+ $current_archive_url = home_url( 'index.php/' . $wp->request );
271
+ }
272
  $amp_url = trailingslashit($current_archive_url);
273
  } else {
274
  $amp_url = AMPforWP\AMPVendor\amp_get_permalink( get_queried_object_id() );
588
  if ( is_page() && isset($redux_builder_amp['ampforwp-page-social']) && $redux_builder_amp['ampforwp-page-social'] ) {
589
  $social_check_page = true;
590
  }
591
+ if ( '4' === ampforwp_get_setting('amp-design-selector') ) {
592
  $social_check = true;
593
  }
594
+ if ( '4' !== ampforwp_get_setting('amp-design-selector') && defined('AMPFORWP_DM_SOCIAL_CHECK') && 'true' === AMPFORWP_DM_SOCIAL_CHECK ) {
595
  $social_check = true;
596
  }
597
+ if( ampforwp_get_setting('enable-single-social-icons') == true || defined('AMPFORWP_DM_SOCIAL_CHECK') && AMPFORWP_DM_SOCIAL_CHECK === 'true' ) {
598
  if( (is_singular() || $social_check_page ) && is_socialshare_or_socialsticky_enabled_in_ampforwp() ) {
599
  if ( empty( $data['amp_component_scripts']['amp-social-share'] ) ) {
600
  $data['amp_component_scripts']['amp-social-share'] = 'https://cdn.ampproject.org/v0/amp-social-share-0.1.js';
1169
  unset( $wp_filter['rocket_buffer'] );
1170
  // this filter is documented in inc/front/protocol.php.
1171
  $do_rocket_protocol_rewrite = apply_filters( 'do_rocket_protocol_rewrite', false );
1172
+ if ( function_exists('get_rocket_option') && ( get_rocket_option( 'do_cloudflare', 0 ) && get_rocket_option( 'cloudflare_protocol_rewrite', 0 ) || $do_rocket_protocol_rewrite ) ) {
1173
  remove_filter( 'rocket_buffer', 'rocket_protocol_rewrite', PHP_INT_MAX );
1174
  remove_filter( 'wp_calculate_image_srcset', 'rocket_protocol_rewrite_srcset', PHP_INT_MAX );
1175
  }
1206
  function ampforwp_sticky_social_icons(){
1207
  global $redux_builder_amp;
1208
  // Social share in AMP
1209
+ $amp_permalink = $facebook_app_id = $amp_permalink_fb_messenger = "";
1210
+ $facebook_app_id = ampforwp_get_setting('amp-facebook-app-id-messenger');
1211
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
1212
  $amp_permalink = ampforwp_url_controller(get_the_permalink());
1213
  } else{
1214
  $amp_permalink = get_the_permalink();
1215
  }
1216
+ if($facebook_app_id){
1217
+ $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
1218
+ }
1219
+ if( (ampforwp_get_setting('enable-single-social-icons') == true && is_single()) || (is_page() && true == $redux_builder_amp['ampforwp-page-sticky-social'])) {
1220
  $image = '';
1221
  if ( ampforwp_has_post_thumbnail( ) ){
1222
  $image = ampforwp_get_post_thumbnail( 'url', 'full' );
1246
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28"></amp-social-share>
1247
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
1248
  <?php } ?>
1249
+ <?php if(true == ampforwp_get_setting('enable-single-facebook-share-messenger')){?>
1250
+ <a title="facebook share messenger" <?php ampforwp_nofollow_social_links(); ?> target="_blank" href="fb-messenger://share/?link=<?php echo esc_url($amp_permalink_fb_messenger); ?>">
1251
+ <div class="amp-social-icon amp-social-facebookmessenger">
1252
+ <amp-img src="<?php echo esc_url(AMPFORWP_IMAGE_DIR . '/messenger.png') ?>" width="20" height="20" />
1253
+ </div>
1254
+ </a>
1255
+ <?php } ?>
1256
  <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
1257
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
1258
  <amp-social-share type="twitter"
1277
  <amp-social-share type="linkedin" width="50" height="28" aria-label="linkedin" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
1278
  <?php } ?>
1279
  <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
1280
+ <a title="whatsapp share" <?php ampforwp_nofollow_social_links(); ?> href="https://api.whatsapp.com/send?text=<?php echo esc_url($amp_permalink);?>">
1281
  <div class="amp-social-icon">
1282
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMn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jM2NC02LjAyNS03LjQ0MWMtMC42MzEtMS4wNzUtMC4wNjYtMS42NTYsMC40NzUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" alt="whatsapp" />
1283
  </div>
1405
  }
1406
 
1407
  function ampforwp_custom_yoast_meta_homepage(){
1408
+ if ( ampforwp_get_setting('ampforwp-seo-yoast-meta') ) {
 
 
1409
  if ( class_exists('WPSEO_Options')) {
1410
  if( method_exists('WPSEO_Options', 'get_option')){
1411
  $options = WPSEO_Options::get_option( 'wpseo_social' );
1418
  }
1419
  }
1420
  do_action( 'wpseo_opengraph' );
1421
+ if( ampforwp_get_setting('ampforwp-seo-custom-additional-meta') ){
1422
+ echo strip_tags( ampforwp_get_setting('ampforwp-seo-custom-additional-meta'), '<link><meta>' );
 
 
1423
  }
1424
  }
1425
  }
1593
 
1594
  //* We can filter this later if needed:
1595
  $sep = ' | ';
1596
+ if( class_exists('WPSEO_Options') && 'yoast' == ampforwp_get_setting('ampforwp-seo-selection') ) {
1597
+ $sep = WPSEO_Options::get( 'separator' );
1598
+ }
1599
+ if( defined( 'RANK_MATH_FILE' ) && class_exists('RankMath\\Helper') && 'rank_math' == ampforwp_get_setting('ampforwp-seo-selection') ) {
1600
+ $sep = RankMath\Helper::get_settings( 'titles.title_separator' );
1601
+ $sep = ' '.htmlentities( $sep, ENT_COMPAT, 'UTF-8', false ).' ';
1602
+ }
1603
  $sep = apply_filters('ampforwp_title_seperator_type', $sep);
1604
 
1605
  if ( is_singular() ) {
1754
  }
1755
  //Bridge Qode SEO Compatibility #2538
1756
  if ( function_exists('qode_wp_title') && 'bridge' == ampforwp_get_setting('ampforwp-seo-selection')){
1757
+ $site_title = get_post_meta($post_id, "qode_seo_title", true);
1758
+ }
1759
+ // The SEO Framework Compatibility #2670
1760
+ if ( function_exists( 'the_seo_framework' ) && 'seo_framework' == ampforwp_get_setting('ampforwp-seo-selection') ) {
1761
+ $tsf_title = $ampforwp_tsf = '';
1762
+ $ampforwp_tsf = \the_seo_framework();
1763
+ $tsf_title = $ampforwp_tsf->get_title();
1764
+ if ( $tsf_title ) {
1765
+ $site_title = $tsf_title;
1766
+ }
1767
  }
1768
  return esc_html( convert_chars( wptexturize( trim( $site_title ) ) ) );
1769
  }
2578
  $blacklist_array = array();
2579
  // Remove some blacklist tags from sidebars only when search,archives and categories widgets are active #2835
2580
  if ( is_active_widget(false,false,'search') || is_active_widget(false,false,'archives') || is_active_widget(false,false,'categories') ) {
2581
+ $blacklist_array['non-content'] = 'non-content';
2582
  }
2583
  ob_start();
2584
  dynamic_sidebar( $sidebar );
6183
  $screen = get_current_screen();
6184
  if ( 'toplevel_page_amp_options' == $screen->base ) {
6185
  remove_action('admin_enqueue_scripts', 'total_plus_admin_scripts', 100);
6186
+ // Save option is not showing with a basix theme #3366
6187
+ if(function_exists('addPanelCSS')){
6188
+ remove_action( 'admin_enqueue_scripts', 'addPanelCSS');
6189
+ }
6190
  }
6191
  }
6192
  // uploading the images with SVG format #2431
6741
  <?php
6742
  }
6743
  }
6744
+
6745
+ // Keep the default WordPress form for AMP #3000
6746
+ add_filter('get_search_form', 'ampforwp_search_form');
6747
+ if ( ! function_exists('ampforwp_search_form') ) {
6748
+ function ampforwp_search_form($form){
6749
+ if ( ampforwp_is_amp_endpoint() ) {
6750
+ $form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
6751
+ <label>
6752
+ <span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
6753
+ <input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" />
6754
+ </label>
6755
+ <input type="submit" class="search-submit" value="' . esc_attr_x( 'Search', 'submit button' ) . '" />
6756
+ </form>';
6757
+ }
6758
+ return $form;
6759
+ }
6760
+ }
6761
+
6762
+ //Saving all taxonomies in Transient
6763
+ add_action('init','ampforwp_generate_taxonomies_transient');
6764
+ function ampforwp_generate_taxonomies_transient(){
6765
+ $taxonomies = get_transient('ampforwp_get_taxonomies');
6766
+ $tax_arr = array();
6767
+ $args = array(
6768
+ 'public' => true,
6769
+ '_builtin' => false,
6770
+ );
6771
+ $output = 'objects'; // or objects
6772
+ $operator = 'and'; // 'and' or 'or'
6773
+ $alltaxonomies = get_taxonomies( $args, $output, $operator );
6774
+ if ($alltaxonomies) {
6775
+ foreach ($alltaxonomies as $taxKey => $taxVal) {
6776
+ $tax_arr[$taxVal->name] = $taxVal->labels->singular_name;
6777
+ }
6778
+ }
6779
+ if ( false == $taxonomies ) {
6780
+ set_transient('ampforwp_get_taxonomies',$tax_arr);
6781
+ }else{
6782
+ if(count($tax_arr) > count($taxonomies)){
6783
+ $result = array_diff_assoc($tax_arr,$taxonomies);
6784
+ }elseif( count($taxonomies) > count($tax_arr)){
6785
+ $result = array_diff_assoc($taxonomies,$tax_arr);
6786
+ }
6787
+ if( !empty($result)){
6788
+ delete_transient('ampforwp_get_taxonomies');
6789
+ }
6790
+ }
6791
+ return $taxonomies;
6792
+ }
templates/template-mode/template-mode.php CHANGED
@@ -18,14 +18,28 @@ Class AMPforWP_theme_mode{
18
  add_filter( "the_content", array($this, 'amp_the_content') );
19
  add_action( "levelup_head", array($this, 'amp_head_content') );
20
  add_action( "levelup_css", array($this, 'amp_head_css') );
21
- add_filter( "get_search_form", array($this, 'search_form') );
22
  add_filter( "get_custom_logo", array($this, 'get_custom_logo'), 10, 2 );
23
  add_action( "levelup_footer", array($this, 'amp_footer_content') );
24
  add_action( "get_avatar", array($this,'get_avatar'), 11,6);
25
  add_filter( "the_author_description", array($this, 'author_meta_desctiption_amp'),10, 2 );
26
  add_filter("ampforwp_the_content_last_filter", array($this, "comment_form_conversion") );
27
- add_filter("amp_post_template_data", array($this, 'amp_comment_mustache_script') );
28
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }else{
30
  require_once AMPFORWP_PLUGIN_DIR.'/templates/template-mode/admin-settings.php';
31
  add_filter( 'plugin_action_links_accelerated-mobile-pages/accelerated-moblie-pages.php', array($this, 'ampforwp_plugin_settings_link'), 999, 4 );
@@ -84,6 +98,7 @@ Class AMPforWP_theme_mode{
84
  $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-latest.js';
85
  }
86
  }
 
87
  return $data;
88
  }
89
  function amp_theme_ajaxcomments(){
@@ -451,6 +466,12 @@ Class AMPforWP_theme_mode{
451
  do_action( 'amp_post_template_css', $ampforwpTemplate );
452
  do_action( 'amp_css', $ampforwpTemplate );
453
 
 
 
 
 
 
 
454
  $stylesheetCss = $this->ampforwp_get_remote_content($stylesheetUri);
455
  $stylesheetCss = str_replace(" img", 'amp-img', $stylesheetCss);
456
  $valuesrc = get_stylesheet_directory_uri();
@@ -463,7 +484,8 @@ Class AMPforWP_theme_mode{
463
  }
464
  }, $stylesheetCss);
465
  $css .= $stylesheetCss;
466
- $css .= $redux_builder_amp['css_editor'];
 
467
  echo $this->css_sanitizer($css);
468
  echo "</style>";
469
  }
@@ -475,10 +497,7 @@ Class AMPforWP_theme_mode{
475
  return $css;
476
  }
477
  public function search_form($form){
478
- $form = preg_replace_callback("/<form(.*?)action=[\"|'](.*?)[\"|'](.*?)>/", function($matches){
479
- $tag = '<form'.$matches[1].' target="_top" action="'.$matches[2].'"'.$matches[3].'>';
480
- return $tag;
481
- }, $form);
482
  return $form;
483
  }
484
  public function get_custom_logo($html, $blog_id){
@@ -532,9 +551,51 @@ Class AMPforWP_theme_mode{
532
  $data = preg_replace("/http?[s]?:/", "", $data);
533
  $data = str_replace(" action=", 'target="_top" action=', $data);
534
  }
 
535
  echo $this->ampforwp_template_mode_cnt_sanitizer($data);
536
  }
537
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
538
  /**
539
  * Remove Sanitize any content
540
  **/
@@ -585,6 +646,17 @@ Class AMPforWP_theme_mode{
585
  public function author_meta_desctiption_amp($field, $user_id){
586
  return $this->ampforwp_template_mode_cnt_sanitizer($field);
587
  }
 
 
 
 
 
 
 
 
 
 
 
588
  }//Class Closed
589
  add_action('after_setup_theme', 'ampforwp_template_mode_is_activate', 999);
590
  function ampforwp_template_mode_is_activate(){
18
  add_filter( "the_content", array($this, 'amp_the_content') );
19
  add_action( "levelup_head", array($this, 'amp_head_content') );
20
  add_action( "levelup_css", array($this, 'amp_head_css') );
21
+ add_filter( "get_search_form", array($this, 'search_form'), 99 );
22
  add_filter( "get_custom_logo", array($this, 'get_custom_logo'), 10, 2 );
23
  add_action( "levelup_footer", array($this, 'amp_footer_content') );
24
  add_action( "get_avatar", array($this,'get_avatar'), 11,6);
25
  add_filter( "the_author_description", array($this, 'author_meta_desctiption_amp'),10, 2 );
26
  add_filter("ampforwp_the_content_last_filter", array($this, "comment_form_conversion") );
27
+ add_filter("amp_post_template_data", array($this, 'amp_comment_mustache_script'), 11 );
28
+ //Remove admin bar
29
+ if( is_user_logged_in() ){
30
+ $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
31
+ if($pref==="true"){
32
+ add_action("wp_body_open", function(){
33
+ wp_admin_bar_render();
34
+ });
35
+ add_action( 'admin_bar_init', array($this,'init_admin_bar'));
36
+ add_action( 'wp_before_admin_bar_render', function(){
37
+ remove_action( 'wp_before_admin_bar_render', 'wp_customize_support_script' );
38
+ },9);
39
+ add_action( 'admin_bar_menu', array($this, 'remove_adminbar_search'));
40
+ }
41
+ }
42
+
43
  }else{
44
  require_once AMPFORWP_PLUGIN_DIR.'/templates/template-mode/admin-settings.php';
45
  add_filter( 'plugin_action_links_accelerated-mobile-pages/accelerated-moblie-pages.php', array($this, 'ampforwp_plugin_settings_link'), 999, 4 );
98
  $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-latest.js';
99
  }
100
  }
101
+ unset($data['amp_component_scripts']['amp-addthis']);
102
  return $data;
103
  }
104
  function amp_theme_ajaxcomments(){
466
  do_action( 'amp_post_template_css', $ampforwpTemplate );
467
  do_action( 'amp_css', $ampforwpTemplate );
468
 
469
+ if( is_user_logged_in() ){
470
+ $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
471
+ if($pref==="true"){
472
+ $css .= $this->ampforwp_get_remote_content(AMPFORWP_PLUGIN_DIR_URI."/templates/template-mode/admin-bar.css");
473
+ }
474
+ }
475
  $stylesheetCss = $this->ampforwp_get_remote_content($stylesheetUri);
476
  $stylesheetCss = str_replace(" img", 'amp-img', $stylesheetCss);
477
  $valuesrc = get_stylesheet_directory_uri();
484
  }
485
  }, $stylesheetCss);
486
  $css .= $stylesheetCss;
487
+ $css .= ampforwp_get_setting('css_editor');
488
+ $css = str_replace(array('.accordion-mod'), array('.apac'), $css);
489
  echo $this->css_sanitizer($css);
490
  echo "</style>";
491
  }
497
  return $css;
498
  }
499
  public function search_form($form){
500
+ $form = $this->amp_form_sanitization($form);
 
 
 
501
  return $form;
502
  }
503
  public function get_custom_logo($html, $blog_id){
551
  $data = preg_replace("/http?[s]?:/", "", $data);
552
  $data = str_replace(" action=", 'target="_top" action=', $data);
553
  }
554
+ $data = $this->amp_form_sanitization($data);
555
  echo $this->ampforwp_template_mode_cnt_sanitizer($data);
556
  }
557
  }
558
+ public function amp_form_sanitization($data){
559
+ if(strpos($data, "<form")!==false){
560
+ $dom = new DOMDocument;
561
+ @$dom->loadHTML($data);
562
+ $xp = new DOMXPath($dom);
563
+ $query = '//form';
564
+
565
+ $elements = array();
566
+ foreach ( $xp->query($query) as $element ) {
567
+ $elements[] = $element;
568
+ }
569
+ foreach ($elements as $key => $element) {
570
+ $node_name = strtolower( $element->nodeName );
571
+ if( $element->getAttribute('method')=='post' ){
572
+ if($node_name=='form'){
573
+ if($element->hasAttribute('action') && !$element->hasAttribute('action-xhr')){
574
+ $url = str_replace("http:", "https:", $element->getAttribute('action'));
575
+ $element->setAttribute('action-xhr', $url);
576
+ $element->removeAttribute('action');
577
+ }else{
578
+ $scheme = is_ssl() ? 'https://' : 'http://';
579
+
580
+ $path = "{$scheme}{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
581
+ $path = str_replace("http:", "https:", $path);
582
+ $element->setAttribute('action-xhr', esc_url($path) );
583
+ }
584
+ }
585
+ }elseif( $element->getAttribute('method')=='get' ){
586
+ if( !$element->hasAttribute('target') ){
587
+ $element->setAttribute('target', "_top");
588
+ }
589
+ $url = str_replace("http:", "https:", $element->getAttribute('action'));
590
+ $element->setAttribute('action', $url);
591
+ }
592
+ }
593
+ $changesData = $dom->savehtml();
594
+ preg_match('/<body>(.*?)<\/body>/s', $changesData, $matches);
595
+ $data = isset($matches[1])? $matches[1] : $data;
596
+ }
597
+ return $data;
598
+ }
599
  /**
600
  * Remove Sanitize any content
601
  **/
646
  public function author_meta_desctiption_amp($field, $user_id){
647
  return $this->ampforwp_template_mode_cnt_sanitizer($field);
648
  }
649
+
650
+ /*
651
+ * Admin bar
652
+ */
653
+ public function init_admin_bar(){
654
+ remove_action( 'wp_head', '_admin_bar_bump_cb' );
655
+ remove_action( 'wp_head', 'wp_admin_bar_header' );
656
+ }
657
+ public function remove_adminbar_search($wp){
658
+ $wp->remove_node('search');
659
+ }
660
  }//Class Closed
661
  add_action('after_setup_theme', 'ampforwp_template_mode_is_activate', 999);
662
  function ampforwp_template_mode_is_activate(){