AMP for WP – Accelerated Mobile Pages - Version 0.9.97.35

Version Description

(16th February 2019) = * Added: Levelup Compatability #2718 * Added: "Align Justify" Option in Page builder's text module #2665 * Added: Default value for Swift Color Scheme #2793 * Fixed: ampforwp prefix in the analytics function #2886 #2890 * Fixed: "Below the Footer" ads option showing above and below the footer #2778 * Fixed: Debug error undefined index comments #2887

Full changelog available in changelog.txt

Download this release

Release Info

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

Code changes from version 0.9.97.34 to 0.9.97.35

README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.0.3
7
- Stable tag: 0.9.97.34
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -184,6 +184,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
184
 
185
  == Changelog ==
186
 
 
 
 
 
 
 
 
 
187
  = 0.9.97.34 (14th February 2019) =
188
  * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
189
 
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.0.3
7
+ Stable tag: 0.9.97.35
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
184
 
185
  == Changelog ==
186
 
187
+ = 0.9.97.35 (16th February 2019) =
188
+ * Added: Levelup Compatability #2718
189
+ * Added: "Align Justify" Option in Page builder's text module #2665
190
+ * Added: Default value for Swift Color Scheme #2793
191
+ * Fixed: ampforwp prefix in the analytics function #2886 #2890
192
+ * Fixed: "Below the Footer" ads option showing above and below the footer #2778
193
+ * Fixed: Debug error undefined index comments #2887
194
+
195
  = 0.9.97.34 (14th February 2019) =
196
  * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
197
 
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.34
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.34');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
@@ -72,7 +72,10 @@ function ampforwp_get_the_page_id_blog_page(){
72
  $output = "";
73
  if ( ampforwp_name_blog_page() ) {
74
  $page = get_page_by_path( ampforwp_name_blog_page() );
75
- $output = $page->ID;
 
 
 
76
  }
77
 
78
  return $output;
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.35
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.35');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
72
  $output = "";
73
  if ( ampforwp_name_blog_page() ) {
74
  $page = get_page_by_path( ampforwp_name_blog_page() );
75
+ if( $page){
76
+ $output = $page->ID;
77
+ }
78
+
79
  }
80
 
81
  return $output;
changelog.txt CHANGED
@@ -1,5 +1,13 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
3
  = 0.9.97.34 (14th February 2019) =
4
  * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
5
 
1
  == Changelog ==
2
 
3
+ = 0.9.97.35 (16th February 2019) =
4
+ * Added: Levelup Compatability #2718
5
+ * Added: "Align Justify" Option in Page builder's text module #2665
6
+ * Added: Default value for Swift Color Scheme #2793
7
+ * Fixed: ampforwp prefix in the analytics function #2886 #2890
8
+ * Fixed: "Below the Footer" ads option showing above and below the footer #2778
9
+ * Fixed: Debug error undefined index comments #2887
10
+
11
  = 0.9.97.34 (14th February 2019) =
12
  * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
13
 
components/components-core.php CHANGED
@@ -364,7 +364,7 @@ function amp_header_core(){
364
  <?php do_action( 'amp_css', $thisTemplate ); ?>
365
  <?php echo $redux_builder_amp['css_editor']; ?>
366
  </style>
367
-
368
  </head>
369
  <body <?php ampforwp_body_class($bodyClass); ?>>
370
  <?php do_action('amp_start', $thisTemplate); ?>
364
  <?php do_action( 'amp_css', $thisTemplate ); ?>
365
  <?php echo $redux_builder_amp['css_editor']; ?>
366
  </style>
367
+ <?php do_action('ampforwp_before_head', $thisTemplate); ?>
368
  </head>
369
  <body <?php ampforwp_body_class($bodyClass); ?>>
370
  <?php do_action('amp_start', $thisTemplate); ?>
includes/options/admin-config.php CHANGED
@@ -4359,13 +4359,8 @@ Redux::setSection( $opt_name, array(
4359
  ) );
4360
  /*---------------------*/
4361
 
4362
- // Global Theme Settings
4363
- Redux::setSection($opt_name, array(
4364
- 'title' => esc_html__( 'Global', 'accelerated-mobile-pages' ),
4365
- 'id' => 'amp-theme-global-subsection',
4366
- 'subsection' => true,
4367
- 'fields' => array(
4368
- array(
4369
  'id' => 'colorscheme-section',
4370
  'type' => 'section',
4371
  'title' => esc_html__('Color Scheme', 'accelerated-mobile-pages'),
@@ -4397,7 +4392,7 @@ Redux::setSection( $opt_name, array(
4397
  'required' => array(
4398
  array('amp-design-selector', '=' , '4')
4399
  )
4400
- ),
4401
  array(
4402
  'id' => 'amp-opt-color-rgba-colorscheme',
4403
  'type' => 'color_rgba',
@@ -4468,18 +4463,39 @@ Redux::setSection( $opt_name, array(
4468
  )
4469
  ),
4470
 
4471
- array(
4472
- 'id' => 'typography-section',
4473
- 'type' => 'section',
4474
- 'title' => esc_html__('Typography', 'accelerated-mobile-pages'),
4475
- 'indent' => true,
4476
- 'required' => array(
4477
- array('amp-design-selector', '=' , '4')
4478
- ),
4479
- 'layout_type' => 'accordion',
4480
- 'accordion-open'=> 1,
4481
- ),
4482
- array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4483
  'id' =>'google_font_api_key',
4484
  'type' =>'text',
4485
  'title' =>esc_html__('Google Font API key','accelerated-mobile-pages'),
@@ -4487,10 +4503,8 @@ Redux::setSection( $opt_name, array(
4487
  'default' =>'',
4488
  'required' => array(
4489
  array('amp-design-selector', '=' , '4')
4490
- )
4491
-
4492
  ),
4493
-
4494
  array(
4495
  'id' => 'amp_font_selector',
4496
  'type' => 'select',
@@ -4506,7 +4520,6 @@ Redux::setSection( $opt_name, array(
4506
  )
4507
 
4508
  ),
4509
-
4510
  array(
4511
  'id' => 'amp_font_type',
4512
  'type' => 'select',
@@ -4523,7 +4536,7 @@ Redux::setSection( $opt_name, array(
4523
  )
4524
 
4525
  ),
4526
- array(
4527
  'id' =>'google_current_font_data',
4528
  'type' =>'text',
4529
  'class' => 'hide',
@@ -4533,20 +4546,20 @@ Redux::setSection( $opt_name, array(
4533
  array('amp-design-selector', '=' , '4')
4534
  )
4535
  ),
4536
- array(
4537
  'id' => 'content-font-family-enable',
4538
  'type' => 'switch',
4539
  'class' => 'ampforwp-google-font-class',
4540
  'title' => esc_html__('Content Font Selector', 'accelerated-mobile-pages'),
4541
  'required' => array(
4542
- array('amp-design-selector', '=' , '4')
4543
  ),
4544
  'default' => '0' ,
4545
  'required' => array(
4546
  array('amp-design-selector', '=' , '4')
4547
  )
4548
  ),
4549
- array(
4550
  'id' => 'amp_font_selector_content_single',
4551
  'type' => 'select',
4552
  'class' => 'ampforwp-google-font-class ampwp-font-families',
@@ -4562,7 +4575,6 @@ Redux::setSection( $opt_name, array(
4562
  )
4563
 
4564
  ),
4565
-
4566
  array(
4567
  'id' => 'amp_font_type_content_single',
4568
  'type' => 'select',
@@ -4580,7 +4592,7 @@ Redux::setSection( $opt_name, array(
4580
  )
4581
 
4582
  ),
4583
- array(
4584
  'id' =>'google_current_font_data_content_single',
4585
  'type' =>'text',
4586
  'class' => 'hide',
@@ -4589,97 +4601,111 @@ Redux::setSection( $opt_name, array(
4589
  'required' => array(
4590
  array('amp-design-selector', '=' , '4')
4591
  )
4592
- ),
4593
-
4594
- array(
4595
- 'id' => 'general_sdbar',
4596
- 'type' => 'section',
4597
- 'title' => esc_html__('General', 'accelerated-mobile-pages'),
4598
- 'indent' => true,
4599
- 'layout_type' => 'accordion',
4600
- 'accordion-open'=> 1,
4601
- 'required' => array( array('amp-design-selector', '=' , '4') ),
4602
- ),
4603
- array(
4604
- 'id' => 'gnrl-sidebar',
4605
- 'type' => 'switch',
4606
- 'title' => esc_html__('Sidebar', 'accelerated-mobile-pages'),
4607
- 'default' => 0,
4608
- 'required' => array( array('amp-design-selector', '=' , '4') ),
4609
- ),
4610
- array(
4611
- 'id' => 'gbl-sidebar',
4612
- 'class' => 'child_opt child_opt_arrow',
4613
- 'type' => 'switch',
4614
- 'title' => esc_html__('Homepage Sidebar', 'accelerated-mobile-pages'),
4615
- 'default' => 0,
4616
- 'required' => array( array('gnrl-sidebar', '=' , '1') ),
4617
- ),
4618
- array(
4619
- 'id' => 'sidebar-bgcolor',
4620
- 'class' => 'child_opt child_opt_arrow',
4621
- 'type' => 'color_rgba',
4622
- 'title' => esc_html__('Sidebar Background','accelerated-mobile-pages'),
4623
- 'default' => array(
4624
- 'color' => '#f7f7f7',
4625
- ),
4626
- 'required' => array( array('gbl-sidebar', '=',1) )
4627
- ),
4628
- array(
4629
- 'id' => 'sbr-heading-color',
4630
- 'type' => 'color_rgba',
4631
- 'class' => 'child_opt',
4632
- 'title' => esc_html__('Heading', 'accelerated-mobile-pages'),
4633
- 'default' => array(
4634
- 'color' => '#333',
4635
- ),
4636
- 'required' => array(
4637
- array('gbl-sidebar','=',1)
4638
- )
4639
- ),
4640
- array(
4641
- 'id' => 'sbr-text-color',
4642
- 'type' => 'color_rgba',
4643
- 'class' => 'child_opt',
4644
- 'title' => esc_html__('Text', 'accelerated-mobile-pages'),
4645
- 'default' => array(
4646
- 'color' => '#333',
4647
- ),
4648
- 'required' => array(
4649
- array('gbl-sidebar','=',1)
4650
- )
4651
- ),
4652
- array(
4653
- 'id' => 'swift-sidebar',
4654
- 'class' => 'child_opt child_opt_arrow',
4655
- 'type' => 'switch',
4656
- 'title' => esc_html__('Single Sidebar', 'accelerated-mobile-pages'),
4657
- 'default' => 1,
4658
- 'required' => array( array('single-design-type', '=' , '4'),
4659
- array('gnrl-sidebar', '=' , '1'),
4660
- ),
4661
- ),
4662
-
4663
- array(
4664
- 'id' => 'design-advanced',
4665
  'type' => 'section',
4666
- 'title' => esc_html__('Advanced', 'accelerated-mobile-pages'),
4667
  'indent' => true,
4668
  'layout_type' => 'accordion',
4669
  'accordion-open'=> 1,
4670
- ),
4671
- array(
4672
- 'id' => 'css_editor',
4673
- 'type' => 'ace_editor',
4674
- 'title' => esc_html__('Custom CSS', 'accelerated-mobile-pages'),
4675
- 'tooltip-subtitle' => esc_html__('You can customize the Stylesheet of the AMP version by using this option.', 'accelerated-mobile-pages'),
4676
- 'mode' => 'css',
4677
- 'theme' => 'monokai',
4678
- 'desc' => '',
4679
- 'default' => esc_html__('/******* Paste your Custom CSS in this Editor *******/','accelerated-mobile-pages')
4680
- ),
4681
-
4682
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4683
  ));
4684
 
4685
  // Header Elements default Color
@@ -7325,7 +7351,7 @@ if(!ampforwp_check_extensions()){
7325
  'id' => 'opt-choose',
7326
  'subsection' => false,
7327
  'desc' => $freepro_listing,
7328
- 'icon' => 'el el-gift',
7329
  ) );
7330
  }
7331
 
4359
  ) );
4360
  /*---------------------*/
4361
 
4362
+ $amp_fontparts = array(
4363
+ array(
 
 
 
 
 
4364
  'id' => 'colorscheme-section',
4365
  'type' => 'section',
4366
  'title' => esc_html__('Color Scheme', 'accelerated-mobile-pages'),
4392
  'required' => array(
4393
  array('amp-design-selector', '=' , '4')
4394
  )
4395
+ ),
4396
  array(
4397
  'id' => 'amp-opt-color-rgba-colorscheme',
4398
  'type' => 'color_rgba',
4463
  )
4464
  ),
4465
 
4466
+ array(
4467
+ 'id' => 'typography-section',
4468
+ 'type' => 'section',
4469
+ 'title' => esc_html__('Typography', 'accelerated-mobile-pages'),
4470
+ 'indent' => true,
4471
+ /*'required' => array(
4472
+ array('amp-design-selector', '=' , '4')
4473
+ ),*/
4474
+ 'layout_type' => 'accordion',
4475
+ 'accordion-open'=> 1,
4476
+ ));
4477
+ if(ampforwp_levelup_compatibility('levelup_theme')){
4478
+
4479
+ $fonts_settings[] = array(
4480
+ 'id' => 'ampforwp_page_levelup_manage_fonts',
4481
+ 'type' => 'raw',
4482
+ 'desc' => 'Levelup theme using default fonts. <a href="'.admin_url( '/customize.php?autofocus[section]=theme_field_settings' ).'">Manage fonts</a>'
4483
+ );
4484
+ $amp_fontparts = array_merge($amp_fontparts ,$fonts_settings);
4485
+
4486
+ }else{
4487
+ $selectedOption = get_option('redux_builder_amp',true);
4488
+ if(!isset($selectedOption['amp-design-selector'])){
4489
+ $selectedOption['amp-design-selector'] = '4';
4490
+ }
4491
+ $googleSupportFontEnabled = array('1','2','3','4');
4492
+ $googleSupportFontEnabled = apply_filters( 'amp_theme_font_support', $googleSupportFontEnabled);
4493
+ $enabledGoogleFonts = false;
4494
+ if(in_array($selectedOption['amp-design-selector'], $googleSupportFontEnabled) ){
4495
+ $enabledGoogleFonts = true;
4496
+ }
4497
+ $fonts_settings = array(
4498
+ array(
4499
  'id' =>'google_font_api_key',
4500
  'type' =>'text',
4501
  'title' =>esc_html__('Google Font API key','accelerated-mobile-pages'),
4503
  'default' =>'',
4504
  'required' => array(
4505
  array('amp-design-selector', '=' , '4')
4506
+ )
 
4507
  ),
 
4508
  array(
4509
  'id' => 'amp_font_selector',
4510
  'type' => 'select',
4520
  )
4521
 
4522
  ),
 
4523
  array(
4524
  'id' => 'amp_font_type',
4525
  'type' => 'select',
4536
  )
4537
 
4538
  ),
4539
+ array(
4540
  'id' =>'google_current_font_data',
4541
  'type' =>'text',
4542
  'class' => 'hide',
4546
  array('amp-design-selector', '=' , '4')
4547
  )
4548
  ),
4549
+ array(
4550
  'id' => 'content-font-family-enable',
4551
  'type' => 'switch',
4552
  'class' => 'ampforwp-google-font-class',
4553
  'title' => esc_html__('Content Font Selector', 'accelerated-mobile-pages'),
4554
  'required' => array(
4555
+ // array('amp-design-selector', '=' , '4')
4556
  ),
4557
  'default' => '0' ,
4558
  'required' => array(
4559
  array('amp-design-selector', '=' , '4')
4560
  )
4561
  ),
4562
+ array(
4563
  'id' => 'amp_font_selector_content_single',
4564
  'type' => 'select',
4565
  'class' => 'ampforwp-google-font-class ampwp-font-families',
4575
  )
4576
 
4577
  ),
 
4578
  array(
4579
  'id' => 'amp_font_type_content_single',
4580
  'type' => 'select',
4592
  )
4593
 
4594
  ),
4595
+ array(
4596
  'id' =>'google_current_font_data_content_single',
4597
  'type' =>'text',
4598
  'class' => 'hide',
4601
  'required' => array(
4602
  array('amp-design-selector', '=' , '4')
4603
  )
4604
+ )
4605
+ );
4606
+ $amp_fontparts = array_merge($amp_fontparts ,$fonts_settings);
4607
+ }
4608
+ $global_settings = array(
4609
+ array(
4610
+ 'id' => 'general_sdbar',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4611
  'type' => 'section',
4612
+ 'title' => esc_html__('General', 'accelerated-mobile-pages'),
4613
  'indent' => true,
4614
  'layout_type' => 'accordion',
4615
  'accordion-open'=> 1,
4616
+ 'required' => array( array('amp-design-selector', '=' , '4') ),
4617
+ ),
4618
+ array(
4619
+ 'id' => 'gnrl-sidebar',
4620
+ 'type' => 'switch',
4621
+ 'title' => esc_html__('Sidebar', 'accelerated-mobile-pages'),
4622
+ 'default' => 0,
4623
+ 'required' => array( array('amp-design-selector', '=' , '4') ),
4624
+ ),
4625
+ array(
4626
+ 'id' => 'gbl-sidebar',
4627
+ 'class' => 'child_opt child_opt_arrow',
4628
+ 'type' => 'switch',
4629
+ 'title' => esc_html__('Homepage Sidebar', 'accelerated-mobile-pages'),
4630
+ 'default' => 0,
4631
+ 'required' => array( array('gnrl-sidebar', '=' , '1') ),
4632
+ ),
4633
+ array(
4634
+ 'id' => 'sidebar-bgcolor',
4635
+ 'class' => 'child_opt child_opt_arrow',
4636
+ 'type' => 'color_rgba',
4637
+ 'title' => esc_html__('Sidebar Background','accelerated-mobile-pages'),
4638
+ 'default' => array(
4639
+ 'color' => '#f7f7f7',
4640
+ ),
4641
+ 'required' => array( array('gbl-sidebar', '=',1) )
4642
+ ),
4643
+ array(
4644
+ 'id' => 'sbr-heading-color',
4645
+ 'type' => 'color_rgba',
4646
+ 'class' => 'child_opt',
4647
+ 'title' => esc_html__('Heading', 'accelerated-mobile-pages'),
4648
+ 'default' => array(
4649
+ 'color' => '#333',
4650
+ ),
4651
+ 'required' => array(
4652
+ array('gbl-sidebar','=',1)
4653
+ )
4654
+ ),
4655
+ array(
4656
+ 'id' => 'sbr-text-color',
4657
+ 'type' => 'color_rgba',
4658
+ 'class' => 'child_opt',
4659
+ 'title' => esc_html__('Text', 'accelerated-mobile-pages'),
4660
+ 'default' => array(
4661
+ 'color' => '#333',
4662
+ ),
4663
+ 'required' => array(
4664
+ array('gbl-sidebar','=',1)
4665
+ )
4666
+ ),
4667
+ array(
4668
+ 'id' => 'swift-sidebar',
4669
+ 'class' => 'child_opt child_opt_arrow',
4670
+ 'type' => 'switch',
4671
+ 'title' => esc_html__('Single Sidebar', 'accelerated-mobile-pages'),
4672
+ 'default' => 0,
4673
+ 'required' => array('gnrl-sidebar', '=' , '1'),
4674
+
4675
+ ),
4676
+ array(
4677
+ 'id' => 'gnrl-dark-view',
4678
+ 'type' => 'switch',
4679
+ 'title' => esc_html__('Darkview', 'accelerated-mobile-pages'),
4680
+ 'default' => 0,
4681
+ 'required' => array( array('amp-design-selector', '=' , '4') ),
4682
+ ),
4683
+ array(
4684
+ 'id' => 'design-advanced',
4685
+ 'type' => 'section',
4686
+ 'title' => esc_html__('Advanced', 'accelerated-mobile-pages'),
4687
+ 'indent' => true,
4688
+ 'layout_type' => 'accordion',
4689
+ 'accordion-open'=> 1,
4690
+ ),
4691
+ array(
4692
+ 'id' => 'css_editor',
4693
+ 'type' => 'ace_editor',
4694
+ 'title' => esc_html__('Custom CSS', 'accelerated-mobile-pages'),
4695
+ 'tooltip-subtitle' => esc_html__('You can customize the Stylesheet of the AMP version by using this option.', 'accelerated-mobile-pages'),
4696
+ 'mode' => 'css',
4697
+ 'theme' => 'monokai',
4698
+ 'desc' => '',
4699
+ 'default' => esc_html__('/******* Paste your Custom CSS in this Editor *******/','accelerated-mobile-pages')
4700
+ ),
4701
+ );
4702
+ $amp_fontparts = array_merge($amp_fontparts ,$global_settings);
4703
+ // Global Theme Settings
4704
+ Redux::setSection($opt_name, array(
4705
+ 'title' => esc_html__( 'Global', 'accelerated-mobile-pages' ),
4706
+ 'id' => 'amp-theme-global-subsection',
4707
+ 'subsection' => true,
4708
+ 'fields' => $amp_fontparts
4709
  ));
4710
 
4711
  // Header Elements default Color
7351
  'id' => 'opt-choose',
7352
  'subsection' => false,
7353
  'desc' => $freepro_listing,
7354
+ 'icon' => 'el el-download',
7355
  ) );
7356
  }
7357
 
includes/thirdparty-compatibility.php CHANGED
@@ -573,4 +573,38 @@ function ampforwp_update_seo_options(){
573
  }
574
  update_option('redux_builder_amp',$selectedOption);
575
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
  }
573
  }
574
  update_option('redux_builder_amp',$selectedOption);
575
  }
576
+ }
577
+
578
+ //Levelup Compatibility
579
+ function ampforwp_levelup_compatibility($type='levelup_theme_and_elementor_check'){
580
+ //check theme
581
+ $returnVal = false;
582
+ switch($type){
583
+ case 'levelup_theme':
584
+ if(function_exists('levelup_theme_is_active')){
585
+ $returnVal = levelup_theme_is_active();
586
+ }
587
+ break;
588
+ case 'levelup_elementor':
589
+ if(function_exists('levelup_has_enable_elementor_builder')){
590
+ $returnVal = levelup_has_enable_elementor_builder();
591
+ }
592
+ break;
593
+ case 'levelup_theme_and_elementor':
594
+ if(function_exists('levelup_theme_is_active') && function_exists('levelup_has_enable_elementor_builder')){
595
+ $returnVal = levelup_theme_is_active() && levelup_has_enable_elementor_builder();
596
+ }
597
+ break;
598
+ case 'hf_builder_foot':
599
+ if(function_exists('levelup_check_hf_builder')){
600
+ $returnVal = levelup_check_hf_builder('foot');
601
+ }
602
+ break;
603
+ case 'hf_builder_head':
604
+ if(function_exists('levelup_check_hf_builder')){
605
+ $returnVal = levelup_check_hf_builder('head');
606
+ }
607
+ break;
608
+ }
609
+ return $returnVal;
610
  }
pagebuilder/modules/text-mod-module.php CHANGED
@@ -103,7 +103,9 @@ return array(
103
  'options_details'=>array(
104
  'center' =>'Center',
105
  'left' =>'Left',
106
- 'right' =>'Right', ),
 
 
107
  'content_type'=>'css',
108
  ),
109
  array(
103
  'options_details'=>array(
104
  'center' =>'Center',
105
  'left' =>'Left',
106
+ 'right' =>'Right',
107
+ 'justify' =>'Justify'
108
+ ),
109
  'content_type'=>'css',
110
  ),
111
  array(
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.0.3
7
- Stable tag: 0.9.97.34
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -185,7 +185,12 @@ You can contact us from [here](https://ampforwp.com/contact/)
185
 
186
  == Changelog ==
187
 
188
- = 0.9.97.34 (14th February 2019) =
189
- * Fixed: Backward Compatibility for Yoast and All in One SEO options #2894
 
 
 
 
 
190
 
191
  Full changelog available in changelog.txt
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.0.3
7
+ Stable tag: 0.9.97.35
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
185
 
186
  == Changelog ==
187
 
188
+ = 0.9.97.35 (16th February 2019) =
189
+ * Added: Levelup Compatability #2718
190
+ * Added: "Align Justify" Option in Page builder's text module #2665
191
+ * Added: Default value for Swift Color Scheme #2793
192
+ * Fixed: ampforwp prefix in the analytics function #2886 #2890
193
+ * Fixed: "Below the Footer" ads option showing above and below the footer #2778
194
+ * Fixed: Debug error undefined index comments #2887
195
 
196
  Full changelog available in changelog.txt
templates/design-manager/swift/footer.php CHANGED
@@ -1,6 +1,10 @@
1
  </div>
2
  <?php global $redux_builder_amp ?>
3
- <?php if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['footer-type'] ) { ?>
 
 
 
 
4
  <footer class="footer">
5
  <?php if ( is_active_sidebar( 'swift-footer-widget-area' ) ) : ?>
6
  <div class="f-w-f1">
@@ -45,6 +49,7 @@
45
  </div>
46
  </footer>
47
  <?php }
 
48
  // Social share in AMP
49
  $amp_permalink = "";
50
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
1
  </div>
2
  <?php global $redux_builder_amp ?>
3
+
4
+ <?php
5
+ do_action( 'levelup_foot');
6
+ if(!ampforwp_levelup_compatibility('hf_builder_foot') ){
7
+ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['footer-type'] ) { ?>
8
  <footer class="footer">
9
  <?php if ( is_active_sidebar( 'swift-footer-widget-area' ) ) : ?>
10
  <div class="f-w-f1">
49
  </div>
50
  </footer>
51
  <?php }
52
+ }
53
  // Social share in AMP
54
  $amp_permalink = "";
55
  if ( ampforwp_get_setting('ampforwp-social-share-amp') ) {
templates/design-manager/swift/header.php CHANGED
@@ -1,5 +1,9 @@
1
  <?php global $redux_builder_amp ?>
2
  <?php amp_header_core() ?>
 
 
 
 
3
  <?php if($redux_builder_amp['header-type'] == '1'){?>
4
  <header class="header h_m h_m_1">
5
  <?php do_action('ampforwp_header_top_design4'); ?>
@@ -367,9 +371,12 @@
367
  </header>
368
  <?php }
369
  do_action("ampforwp_advance_header_layout_options");
 
370
  ?>
371
  <div class="content-wrapper">
372
- <?php if($redux_builder_amp['primary-menu']){?>
 
 
373
  <div class="p-m-fl">
374
  <?php if ( amp_menu(false) ) : ?>
375
  <div class="p-menu">
@@ -378,5 +385,6 @@ do_action("ampforwp_advance_header_layout_options");
378
  <?php endif; ?>
379
  <?php do_action('ampforwp_after_primary_menu'); ?>
380
  </div>
381
- <?php } ?>
 
382
 
1
  <?php global $redux_builder_amp ?>
2
  <?php amp_header_core() ?>
3
+ <?php
4
+ do_action( 'levelup_head');
5
+ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
6
+ ?>
7
  <?php if($redux_builder_amp['header-type'] == '1'){?>
8
  <header class="header h_m h_m_1">
9
  <?php do_action('ampforwp_header_top_design4'); ?>
371
  </header>
372
  <?php }
373
  do_action("ampforwp_advance_header_layout_options");
374
+ }
375
  ?>
376
  <div class="content-wrapper">
377
+ <?php
378
+ if(!ampforwp_levelup_compatibility('hf_builder_head') ){
379
+ if($redux_builder_amp['primary-menu']){?>
380
  <div class="p-m-fl">
381
  <?php if ( amp_menu(false) ) : ?>
382
  <div class="p-menu">
385
  <?php endif; ?>
386
  <?php do_action('ampforwp_after_primary_menu'); ?>
387
  </div>
388
+ <?php }
389
+ }?>
390
 
templates/design-manager/swift/page.php CHANGED
@@ -2,12 +2,14 @@
2
  amp_header(); ?>
3
  <div class="sp">
4
  <div <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>class="cntr"<?php } ?>>
 
5
  <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
6
  <?php if ( true == $redux_builder_amp['ampforwp-bread-crumb'] ) {
7
  amp_breadcrumb();
8
  }?>
9
  <?php amp_title(); ?>
10
  <?php } ?>
 
11
  <?php if ( isset($redux_builder_amp['featured_image_swift_page']) && $redux_builder_amp['featured_image_swift_page'] && ampforwp_has_post_thumbnail() ) { ?>
12
  <div class="sf-img">
13
  <?php amp_featured_image();?>
@@ -167,9 +169,11 @@ amp_header(); ?>
167
  </ul>
168
  </div>
169
  <?php } ?>
 
170
  <div class="cmts">
171
  <?php amp_comments();?>
172
  </div>
 
173
  <?php } ?>
174
  </div>
175
  </div>
2
  amp_header(); ?>
3
  <div class="sp">
4
  <div <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>class="cntr"<?php } ?>>
5
+ <?php if( !ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
6
  <?php if(!checkAMPforPageBuilderStatus(get_the_ID())){ ?>
7
  <?php if ( true == $redux_builder_amp['ampforwp-bread-crumb'] ) {
8
  amp_breadcrumb();
9
  }?>
10
  <?php amp_title(); ?>
11
  <?php } ?>
12
+ <?php } // Level up Condition ends here?>
13
  <?php if ( isset($redux_builder_amp['featured_image_swift_page']) && $redux_builder_amp['featured_image_swift_page'] && ampforwp_has_post_thumbnail() ) { ?>
14
  <div class="sf-img">
15
  <?php amp_featured_image();?>
169
  </ul>
170
  </div>
171
  <?php } ?>
172
+ <?php if( !ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
173
  <div class="cmts">
174
  <?php amp_comments();?>
175
  </div>
176
+ <?php } // Level up Condition ends ?>
177
  <?php } ?>
178
  </div>
179
  </div>
templates/design-manager/swift/style.php CHANGED
@@ -1,11 +1,13 @@
1
  <?php global $redux_builder_amp; ?>
2
- <?php if(!isset($redux_builder_amp['amp_font_selector']) || $redux_builder_amp['amp_font_selector'] == 1 || empty($redux_builder_amp['amp_font_selector'])){?>
 
3
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 300;src: local('Poppins Light'), local('Poppins-Light'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Light.ttf');}
4
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 400;src: local('Poppins Regular'), local('Poppins-Regular'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Regular.ttf');}
5
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 500;src: local('Poppins Medium'), local('Poppins-Medium'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Medium.ttf');}
6
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 600;src: local('Poppins SemiBold'), local('Poppins-SemiBold'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-SemiBold.ttf'); }
7
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 700;src: local('Poppins Bold'), local('Poppins-Bold'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Bold.ttf'); }
8
- <?php } ?>
 
9
  body{<?php $fontFamily = "font-family: 'Poppins', sans-serif;";
10
  $hovercolor = '';
11
  $hovercolor = ampforwp_get_setting('swift-hover-color-scheme');
@@ -48,11 +50,12 @@ amp-carousel > amp-img > img {object-fit: contain;}
48
  .amp-carousel-container {position: relative;width: 100%;height: 100%;}
49
  .amp-carousel-img img {object-fit: contain;}
50
  amp-instagram{box-sizing: initial;}
51
- @font-face {font-family: 'icomoon';font-display: auto;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf');}
52
- .cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px}
53
- .wp-block-image.aligncenter amp-img {
54
- margin: 0 auto;
55
- }
 
56
  header .cntr{
57
  <?php if( isset($redux_builder_amp['swift-width-control']) && $redux_builder_amp['swift-width-control']){?>
58
  max-width:<?php echo $redux_builder_amp['swift-width-control']?>;
@@ -234,6 +237,8 @@ padding: <?php echo $redux_builder_amp['primary-menu-padding-control']['padding-
234
  .p-menu ul li.menu-item-has-children > a:after{display:none;}
235
  }
236
  <?php } ?>
 
 
237
  <?php //Home and Archive
238
 
239
  if( ampforwp_is_home() || is_archive() || is_search() || (function_exists('is_shop') && is_shop()) || ampforwp_is_blog() ) { ?>
@@ -272,7 +277,7 @@ if( ampforwp_is_home() || is_archive() || is_search() || (function_exists('is_sh
272
  .amp-sub-archives ul li{list-style-type: none;display: inline-block;font-size: 12px;margin-right: 10px;font-weight: 500;}
273
  .amp-sub-archives ul li a{color:#005be2;}
274
  .loop-pagination{margin:20px 0px 20px 0px;}
275
- .right a, .left a{background: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;padding: 8px 22px 12px 25px;color: #fff;line-height: 1;border-radius: 46px;font-size: 14px;display: inline-block;}
276
  .right a:after{content:"»";display: inline-block;padding-left: 6px;font-size: 20px;line-height: 20px;height: 20px;position: relative;top: 1px;}
277
  .left a:before{content:"«";display: inline-block;padding-right: 6px;font-size: 20px;line-height: 20px;height: 20px;position: relative;top: -1px;}
278
 
@@ -326,6 +331,7 @@ if( ampforwp_is_home() || is_archive() || is_search() || (function_exists('is_sh
326
  .right a, .left a {padding: 10px 30px 14px;}
327
  }
328
  <?php }?>
 
329
  <?php //page and frontpage
330
 
331
  if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
@@ -334,7 +340,7 @@ if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
334
  .breadcrumbs {padding-bottom: 10px;border-bottom: 1px solid #eee;display: inline-block;width: 100%;font-size: 10px;text-transform: uppercase;}
335
  #breadcrumbs li{list-style-type:none;}
336
  #breadcrumbs a {color: #999;}
337
- #breadcrumbs a:hover {color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;}
338
  .amp-post-title{font-size: 48px;line-height: 58px;color: #333;margin: 0;padding-top: 15px;}
339
  <?php if ('above-content' == ampforwp_get_setting('swift-social-position')){ ?>
340
  .pg .ss-ic{padding-bottom: 10px;margin-bottom: 10px;border-bottom: none;margin-top: 15px;}
@@ -354,10 +360,10 @@ if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
354
  .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;}
355
  #respond p {margin: 12px 0;}
356
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) && ampforwp_get_comments_status() ){ ?>
357
- .amp-comment-button{background-color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']) ?>;font-size: 15px;float: none;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
358
  .amp-comment-button .nocomments{color: #fff;display: block;padding: 7px 0px 8px 0px;}
359
  .cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
360
- .amp-comment-button{background-color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']) ?>;font-size: 15px;float: none;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
361
  .amp-comment-button a{color: #fff;display: block;padding: 7px 0px 8px 0px;}
362
  .comment-form-comment #comment {border-color: #ccc;width: 100%;padding: 20px;}
363
  .cmts h3{margin: 0;font-size: 12px;padding-bottom: 6px;border-bottom: 1px solid #eee;font-weight: 400;letter-spacing: 0.5px;text-transform: uppercase;color: #444;}
@@ -368,7 +374,7 @@ if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
368
  .cmts .comment-author.vcard .says{display:none;}
369
  .cmts .comment-author.vcard .fn{font-size: 12px;font-weight: 500;color: #333;}
370
  .cmts .comment-metadata{font-size: 11px;margin-top: 8px;}
371
- .amp-comments-wrapper ul li:hover .comment-meta .comment-metadata a{color:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']) ?>;;}
372
  .cmts .comment-metadata a{color: #999;}
373
  .comment-content{margin-top:6px;width:100%;display:inline-block;}
374
  .comment-content p{font-size: 14px;color: #333;line-height: 22px;font-weight: 400;margin: 0;}
@@ -379,6 +385,7 @@ if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
379
  blockquote p {font-size:20px;}
380
  }
381
  <?php } ?>
 
382
  <?php if($redux_builder_amp['single-design-type'] == '1' || $redux_builder_amp['single-design-type'] == '4'){?>
383
  <?php // Single
384
 
@@ -402,7 +409,7 @@ p.nocomments {padding: 10px;color: #fff;}
402
  <?php } // Underline CSS Ends?>
403
  .tl-exc{font-size: 16px;color: #444;margin-top: 10px;line-height:20px;}
404
  .amp-category span:nth-child(1) {display: none;}
405
- .amp-category span a, .amp-category span{color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;font-size: 12px;font-weight: 500;text-transform: uppercase;}
406
  .amp-category span a:hover {color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
407
  .amp-category span:after{content:"/";display:inline-block;margin:0px 5px 0px 5px;position:relative;top:1px;color:rgba(0, 0, 0, 0.25);}
408
  .amp-category span:last-child:after{display:none;}
@@ -422,10 +429,10 @@ p.nocomments {padding: 10px;color: #fff;}
422
  .shr-txt, .athr-tx, .r-pf h3, .amp-tags > span:nth-child(1), .amp-related-posts-title, .post-date, .related-title{display: block;}
423
  .shr-txt, .athr-tx, .r-pf h3, .amp-tags > span:nth-child(1), .amp-related-posts-title, .post-date, .related-title{text-transform: uppercase;font-size: 12px;color: #666;font-weight: 400;}
424
  .loop-date, .post-edit-link{display:inline-block;}
425
- .post-date .post-edit-link{color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;float: right;}
426
  .post-date .post-edit-link:hover{color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
427
  .sp-athr, .amp-tags, .post-date{margin-top:20px;}
428
- .sp-athr .author-details a, .sp-athr .author-details, .amp-tags span a, .amp-tag {font-size: 15px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;font-weight: 400;line-height: 1.5;}
429
  .amp-tags .amp-tag:after{content: "/";display: inline-block;padding: 0px 10px;position: relative;top: -1px;color: #ccc;font-size: 12px;}
430
  .amp-tags .amp-tag:last-child:after{display:none;}
431
  .ss-ic li:before{border-radius: 2px;text-align:center;padding: 4px 6px;}
@@ -434,7 +441,7 @@ p.nocomments {padding: 10px;color: #fff;}
434
  .sgl tr:nth-child(odd) td {background: #f7f7f7;}
435
 
436
  /** Pre tag Styling **/
437
- pre {padding: 30px 15px;background: #f7f7f7;white-space: pre-wrap;;font-size: 14px;color: #666666;border-left: 3px solid;border-color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color'])?>;margin-bottom: 20px;}
438
 
439
  <?php // Social Sharing Conditional CSS
440
  if($redux_builder_amp['swift-social-position'] == 'above-content'){?>
@@ -500,7 +507,7 @@ max-height: 94vh;
500
  .srp ul li{display: inline-block;line-height: 1.3;margin-bottom: 24px;list-style-type:none;width:100%;}
501
  .srp ul li:last-child{margin-bottom:0px;}
502
  .has_thumbnail:hover {opacity:0.7;}
503
- .has_thumbnail:hover .related_link a{color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;}
504
  <?php } // Related Posts Desing 1 Ends
505
  if($redux_builder_amp['rp_design_type'] == '2'){?>
506
  .srp{
@@ -525,7 +532,7 @@ if($redux_builder_amp['rp_design_type'] == '2'){?>
525
  font-weight: 500;
526
  }
527
  .has_thumbnail:hover .related_link a{
528
- color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;
529
  }
530
  .related_link a{color:#191919;}
531
  <?php } // Related Posts Desing 2 Ends
@@ -552,7 +559,7 @@ if($redux_builder_amp['rp_design_type'] == '3'){?>
552
  font-weight: 500;
553
  }
554
  .has_thumbnail:hover .related_link a{
555
- color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;
556
  }
557
  .related_link a{color:#191919;}
558
  <?php } // Related Posts Desing 3 Ends ?>
@@ -623,7 +630,7 @@ border-bottom: 1px solid #eee;
623
  .ampforwp_post_pagination p{margin: 0;font-size: 18px;color: #444;font-weight: 500;margin-bottom:10px;}
624
  .ampforwp_post_pagination p a{color:#005be2;padding:0px 10px;}
625
  .cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
626
- .amp-comment-button{background-color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']) ?>;font-size: 15px;float: none;margin: 30px auto 0px auto;text-align: center;border-radius: 3px;font-weight: 600;width:250px;}
627
  .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;}
628
  #respond p {margin: 12px 0;}
629
  .amp-comment-button a{color: #fff;display: block;padding: 7px 0px 8px 0px;}
@@ -636,13 +643,13 @@ border-bottom: 1px solid #eee;
636
  .cmts .comment-author.vcard .says{display:none;}
637
  .cmts .comment-author.vcard .fn{font-size: 12px;font-weight: 500;color: #333;}
638
  .cmts .comment-metadata{font-size: 11px;margin-top: 8px;}
639
- .amp-comments-wrapper ul li:hover .comment-meta .comment-metadata a{color:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']) ?>;;}
640
  .cmts .comment-metadata a{color: #999;}
641
  .comment-content{margin-top:6px;width:100%;display:inline-block;}
642
  .comment-content p{font-size: 14px;color: #333;line-height: 22px;font-weight: 400;margin: 0;}
643
  .comment-meta amp-img{float:left;margin-right:10px;border-radius:50%;width:40px;}
644
  .sp-rt .amp-author {margin-top: 5px;}
645
- .cntn-wrp a{margin:10px 0px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']); ?>;}
646
  .loop-wrapper{display: flex;flex-wrap: wrap;margin: -15px;}
647
  .loop-category li{display: inline-block;list-style-type: none;margin-right: 10px;font-size: 10px;font-weight: 600;letter-spacing: 1.5px;}
648
  .loop-category li a{color:#555;text-transform: uppercase;}
@@ -667,8 +674,8 @@ if( isset($redux_builder_amp['wordpress-comments-support']) && 1 == $redux_build
667
  .cmts .page-numbers{margin:0px 10px;}
668
  .cmts .prev, .cmts .next{margin:0 auto;}
669
  .cmts-wrap a{color:#333;}
670
- .cmts-wrap a:hover{color:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']) ?>;}
671
- .cmts-wrap .current{color:<?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']) ?>;}
672
  <?php } // Comments Pagination CSS Ends
673
  if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
674
  .amp-disqus-comments { text-align:center } <?php
@@ -758,6 +765,7 @@ if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_bui
758
  }
759
  <?php } //Drop Cap CSS ends
760
  // Menu Search CSS
 
761
  if ( isset($redux_builder_amp['menu-search']) && $redux_builder_amp['menu-search'] ) { ?>
762
  .m-srch #amp-search-submit {
763
  cursor: pointer;
@@ -869,6 +877,7 @@ a.btt:hover {
869
  cursor: pointer;
870
  }
871
  <?php } //Menu Copy Right CSS Ends
 
872
  if($redux_builder_amp['single-design-type'] == '4'){
873
  if(is_single() ) { ?>
874
  .sp-rt{
@@ -1022,7 +1031,7 @@ if ( ( true == ampforwp_get_setting('gbl-sidebar') && (ampforwp_is_front_page()
1022
  padding-left: 24px
1023
  }
1024
  .amp-sidebar ul li a:hover, .calendar_wrap a:hover{
1025
- box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-color-scheme']['color']) ?>;
1026
  }
1027
  .sgl .calendar_wrap td{
1028
  padding:10px;
@@ -1094,7 +1103,7 @@ thead th {
1094
  }
1095
  <?php } //Header and Archive Sidebar CSS Ends ?>
1096
  <?php
1097
-
1098
  //Footer
1099
  if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['footer-type'] ) { ?>
1100
  .footer{margin-top: 80px;}
@@ -1413,11 +1422,13 @@ if(isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp
1413
  .s_stk li a{margin:0;border-radius: 0;padding:12px;}
1414
 
1415
  <?php } ?>
 
1416
  <?php if(is_single() && $redux_builder_amp['enable-single-social-icons'] ){?>
1417
  .body.single-post{
1418
  padding-bottom:40px;
1419
  }
1420
  <?php } ?>
 
1421
  .content-wrapper a, .breadcrumb ul li a, .srp ul li, .rr a{transition: all 0.3s ease-in-out 0s;}
1422
  [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;}
1423
  <?php if(true == ampforwp_get_setting('enable-amp-ads-1')||true == ampforwp_get_setting('enable-amp-ads-2')||true == ampforwp_get_setting('enable-amp-ads-3')||true == ampforwp_get_setting('enable-amp-ads-4')||true == ampforwp_get_setting('enable-amp-ads-5')||true == ampforwp_get_setting('enable-amp-ads-6')){?>
@@ -1435,7 +1446,7 @@ if( isset($redux_builder_amp['enable-amp-ads-6'] ) && $redux_builder_amp['enable
1435
  #amp-user-notification1 p {display: inline-block;margin: 20px 0px;}
1436
  amp-user-notification button {padding: 8px 10px;background: #005be2;color: #fff;margin-left: 5px;border: 0;}
1437
  <?php } // Notice bar CSS Ends?>
1438
-
1439
  <?php
1440
 
1441
  //RTL Styles
@@ -1537,6 +1548,7 @@ a.lb-x{
1537
  .amp-ad-wrapper{direction:ltr;}
1538
  <?php } //RTL End ?>
1539
  <?php
 
1540
  if (ampforwp_get_setting('enable-amp-ads-resp-1')){?>
1541
  .amp-ad-1 {
1542
  max-width: 1000px;
@@ -1572,6 +1584,7 @@ if (ampforwp_get_setting('enable-amp-ads-resp-6')){?>
1572
  max-width: 1000px;
1573
  }
1574
  <?php } ?>
 
1575
  <?php if (checkAMPforPageBuilderStatus(get_the_ID())){ ?>
1576
  .sp-cnt .cntr {max-width: 100%;margin:0;width:100%;padding:0}
1577
  <?php } ?>
1
  <?php global $redux_builder_amp; ?>
2
+ <?php if(!isset($redux_builder_amp['amp_font_selector']) || $redux_builder_amp['amp_font_selector'] == 1 || empty($redux_builder_amp['amp_font_selector'])){
3
+ if(!ampforwp_levelup_compatibility('levelup_theme_and_elementor')){ // Level up Condition starts ?>
4
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 300;src: local('Poppins Light'), local('Poppins-Light'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Light.ttf');}
5
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 400;src: local('Poppins Regular'), local('Poppins-Regular'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Regular.ttf');}
6
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 500;src: local('Poppins Medium'), local('Poppins-Medium'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Medium.ttf');}
7
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 600;src: local('Poppins SemiBold'), local('Poppins-SemiBold'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-SemiBold.ttf'); }
8
  @font-face {font-family: 'Poppins';font-display: auto;font-style: normal;font-weight: 700;src: local('Poppins Bold'), local('Poppins-Bold'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/Poppins-Bold.ttf'); }
9
+ <?php } // Level up Condition ends
10
+ } ?>
11
  body{<?php $fontFamily = "font-family: 'Poppins', sans-serif;";
12
  $hovercolor = '';
13
  $hovercolor = ampforwp_get_setting('swift-hover-color-scheme');
50
  .amp-carousel-container {position: relative;width: 100%;height: 100%;}
51
  .amp-carousel-img img {object-fit: contain;}
52
  amp-instagram{box-sizing: initial;}
53
+ .wp-block-image.aligncenter amp-img {margin: 0 auto;}
54
+ <?php global $post;
55
+ if( class_exists('\Elementor\Plugin') && \Elementor\Plugin::$instance->db->is_built_with_elementor($post->ID) && (is_page() || ampforwp_is_front_page() ) ) {}
56
+ else{ ?>.cntr {max-width: 1100px;margin: 0 auto;width:100%;padding:0px 20px} <?php } ?>
57
+ <?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
58
+ @font-face {font-family: 'icomoon';font-display: auto;font-style: normal;font-weight: normal;src: local('icomoon'), local('icomoon'), url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf');}
59
  header .cntr{
60
  <?php if( isset($redux_builder_amp['swift-width-control']) && $redux_builder_amp['swift-width-control']){?>
61
  max-width:<?php echo $redux_builder_amp['swift-width-control']?>;
237
  .p-menu ul li.menu-item-has-children > a:after{display:none;}
238
  }
239
  <?php } ?>
240
+ <?php } // Levelup condition ends ?>
241
+
242
  <?php //Home and Archive
243
 
244
  if( ampforwp_is_home() || is_archive() || is_search() || (function_exists('is_shop') && is_shop()) || ampforwp_is_blog() ) { ?>
277
  .amp-sub-archives ul li{list-style-type: none;display: inline-block;font-size: 12px;margin-right: 10px;font-weight: 500;}
278
  .amp-sub-archives ul li a{color:#005be2;}
279
  .loop-pagination{margin:20px 0px 20px 0px;}
280
+ .right a, .left a{background: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;padding: 8px 22px 12px 25px;color: #fff;line-height: 1;border-radius: 46px;font-size: 14px;display: inline-block;}
281
  .right a:after{content:"»";display: inline-block;padding-left: 6px;font-size: 20px;line-height: 20px;height: 20px;position: relative;top: 1px;}
282
  .left a:before{content:"«";display: inline-block;padding-right: 6px;font-size: 20px;line-height: 20px;height: 20px;position: relative;top: -1px;}
283
 
331
  .right a, .left a {padding: 10px 30px 14px;}
332
  }
333
  <?php }?>
334
+ <?php if( !ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts?>
335
  <?php //page and frontpage
336
 
337
  if( is_page() || ampforwp_is_front_page() || ampforwp_polylang_front_page() ){?>
340
  .breadcrumbs {padding-bottom: 10px;border-bottom: 1px solid #eee;display: inline-block;width: 100%;font-size: 10px;text-transform: uppercase;}
341
  #breadcrumbs li{list-style-type:none;}
342
  #breadcrumbs a {color: #999;}
343
+ #breadcrumbs a:hover {color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;}
344
  .amp-post-title{font-size: 48px;line-height: 58px;color: #333;margin: 0;padding-top: 15px;}
345
  <?php if ('above-content' == ampforwp_get_setting('swift-social-position')){ ?>
346
  .pg .ss-ic{padding-bottom: 10px;margin-bottom: 10px;border-bottom: none;margin-top: 15px;}
360
  .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;}
361
  #respond p {margin: 12px 0;}
362
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) && ampforwp_get_comments_status() ){ ?>
363
+ .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;}
364
  .amp-comment-button .nocomments{color: #fff;display: block;padding: 7px 0px 8px 0px;}
365
  .cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
366
+ .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;}
367
  .amp-comment-button a{color: #fff;display: block;padding: 7px 0px 8px 0px;}
368
  .comment-form-comment #comment {border-color: #ccc;width: 100%;padding: 20px;}
369
  .cmts h3{margin: 0;font-size: 12px;padding-bottom: 6px;border-bottom: 1px solid #eee;font-weight: 400;letter-spacing: 0.5px;text-transform: uppercase;color: #444;}
374
  .cmts .comment-author.vcard .says{display:none;}
375
  .cmts .comment-author.vcard .fn{font-size: 12px;font-weight: 500;color: #333;}
376
  .cmts .comment-metadata{font-size: 11px;margin-top: 8px;}
377
+ .amp-comments-wrapper ul li:hover .comment-meta .comment-metadata a{color:<?php echo ampforwp_sanitize_color($swift_cs_color) ?>;;}
378
  .cmts .comment-metadata a{color: #999;}
379
  .comment-content{margin-top:6px;width:100%;display:inline-block;}
380
  .comment-content p{font-size: 14px;color: #333;line-height: 22px;font-weight: 400;margin: 0;}
385
  blockquote p {font-size:20px;}
386
  }
387
  <?php } ?>
388
+ <?php } // Level Condition Ends?>
389
  <?php if($redux_builder_amp['single-design-type'] == '1' || $redux_builder_amp['single-design-type'] == '4'){?>
390
  <?php // Single
391
 
409
  <?php } // Underline CSS Ends?>
410
  .tl-exc{font-size: 16px;color: #444;margin-top: 10px;line-height:20px;}
411
  .amp-category span:nth-child(1) {display: none;}
412
+ .amp-category span a, .amp-category span{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;font-size: 12px;font-weight: 500;text-transform: uppercase;}
413
  .amp-category span a:hover {color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
414
  .amp-category span:after{content:"/";display:inline-block;margin:0px 5px 0px 5px;position:relative;top:1px;color:rgba(0, 0, 0, 0.25);}
415
  .amp-category span:last-child:after{display:none;}
429
  .shr-txt, .athr-tx, .r-pf h3, .amp-tags > span:nth-child(1), .amp-related-posts-title, .post-date, .related-title{display: block;}
430
  .shr-txt, .athr-tx, .r-pf h3, .amp-tags > span:nth-child(1), .amp-related-posts-title, .post-date, .related-title{text-transform: uppercase;font-size: 12px;color: #666;font-weight: 400;}
431
  .loop-date, .post-edit-link{display:inline-block;}
432
+ .post-date .post-edit-link{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;float: right;}
433
  .post-date .post-edit-link:hover{color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
434
  .sp-athr, .amp-tags, .post-date{margin-top:20px;}
435
+ .sp-athr .author-details a, .sp-athr .author-details, .amp-tags span a, .amp-tag {font-size: 15px;color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;font-weight: 400;line-height: 1.5;}
436
  .amp-tags .amp-tag:after{content: "/";display: inline-block;padding: 0px 10px;position: relative;top: -1px;color: #ccc;font-size: 12px;}
437
  .amp-tags .amp-tag:last-child:after{display:none;}
438
  .ss-ic li:before{border-radius: 2px;text-align:center;padding: 4px 6px;}
441
  .sgl tr:nth-child(odd) td {background: #f7f7f7;}
442
 
443
  /** Pre tag Styling **/
444
+ pre {padding: 30px 15px;background: #f7f7f7;white-space: pre-wrap;;font-size: 14px;color: #666666;border-left: 3px solid;border-color: <?php echo ampforwp_sanitize_color($swift_cs_color)?>;margin-bottom: 20px;}
445
 
446
  <?php // Social Sharing Conditional CSS
447
  if($redux_builder_amp['swift-social-position'] == 'above-content'){?>
507
  .srp ul li{display: inline-block;line-height: 1.3;margin-bottom: 24px;list-style-type:none;width:100%;}
508
  .srp ul li:last-child{margin-bottom:0px;}
509
  .has_thumbnail:hover {opacity:0.7;}
510
+ .has_thumbnail:hover .related_link a{color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;}
511
  <?php } // Related Posts Desing 1 Ends
512
  if($redux_builder_amp['rp_design_type'] == '2'){?>
513
  .srp{
532
  font-weight: 500;
533
  }
534
  .has_thumbnail:hover .related_link a{
535
+ color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;
536
  }
537
  .related_link a{color:#191919;}
538
  <?php } // Related Posts Desing 2 Ends
559
  font-weight: 500;
560
  }
561
  .has_thumbnail:hover .related_link a{
562
+ color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;
563
  }
564
  .related_link a{color:#191919;}
565
  <?php } // Related Posts Desing 3 Ends ?>
630
  .ampforwp_post_pagination p{margin: 0;font-size: 18px;color: #444;font-weight: 500;margin-bottom:10px;}
631
  .ampforwp_post_pagination p a{color:#005be2;padding:0px 10px;}
632
  .cmts{width:100%;display:inline-block;clear:both;margin-top:40px;}
633
+ .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;}
634
  .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;}
635
  #respond p {margin: 12px 0;}
636
  .amp-comment-button a{color: #fff;display: block;padding: 7px 0px 8px 0px;}
643
  .cmts .comment-author.vcard .says{display:none;}
644
  .cmts .comment-author.vcard .fn{font-size: 12px;font-weight: 500;color: #333;}
645
  .cmts .comment-metadata{font-size: 11px;margin-top: 8px;}
646
+ .amp-comments-wrapper ul li:hover .comment-meta .comment-metadata a{color:<?php echo ampforwp_sanitize_color($swift_cs_color) ?>;;}
647
  .cmts .comment-metadata a{color: #999;}
648
  .comment-content{margin-top:6px;width:100%;display:inline-block;}
649
  .comment-content p{font-size: 14px;color: #333;line-height: 22px;font-weight: 400;margin: 0;}
650
  .comment-meta amp-img{float:left;margin-right:10px;border-radius:50%;width:40px;}
651
  .sp-rt .amp-author {margin-top: 5px;}
652
+ .cntn-wrp a{margin:10px 0px;color: <?php echo ampforwp_sanitize_color($swift_cs_color); ?>;}
653
  .loop-wrapper{display: flex;flex-wrap: wrap;margin: -15px;}
654
  .loop-category li{display: inline-block;list-style-type: none;margin-right: 10px;font-size: 10px;font-weight: 600;letter-spacing: 1.5px;}
655
  .loop-category li a{color:#555;text-transform: uppercase;}
674
  .cmts .page-numbers{margin:0px 10px;}
675
  .cmts .prev, .cmts .next{margin:0 auto;}
676
  .cmts-wrap a{color:#333;}
677
+ .cmts-wrap a:hover{color:<?php echo ampforwp_sanitize_color($swift_cs_color) ?>;}
678
+ .cmts-wrap .current{color:<?php echo ampforwp_sanitize_color($swift_cs_color) ?>;}
679
  <?php } // Comments Pagination CSS Ends
680
  if ( isset($redux_builder_amp['ampforwp-disqus-comments-support']) && $redux_builder_amp['ampforwp-disqus-comments-support'] ) {?>
681
  .amp-disqus-comments { text-align:center } <?php
765
  }
766
  <?php } //Drop Cap CSS ends
767
  // Menu Search CSS
768
+ if( !ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
769
  if ( isset($redux_builder_amp['menu-search']) && $redux_builder_amp['menu-search'] ) { ?>
770
  .m-srch #amp-search-submit {
771
  cursor: pointer;
877
  cursor: pointer;
878
  }
879
  <?php } //Menu Copy Right CSS Ends
880
+ } //level up CSS Ends
881
  if($redux_builder_amp['single-design-type'] == '4'){
882
  if(is_single() ) { ?>
883
  .sp-rt{
1031
  padding-left: 24px
1032
  }
1033
  .amp-sidebar ul li a:hover, .calendar_wrap a:hover{
1034
+ box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 <?php echo ampforwp_sanitize_color($swift_cs_color) ?>;
1035
  }
1036
  .sgl .calendar_wrap td{
1037
  padding:10px;
1103
  }
1104
  <?php } //Header and Archive Sidebar CSS Ends ?>
1105
  <?php
1106
+ if( !ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
1107
  //Footer
1108
  if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['footer-type'] ) { ?>
1109
  .footer{margin-top: 80px;}
1422
  .s_stk li a{margin:0;border-radius: 0;padding:12px;}
1423
 
1424
  <?php } ?>
1425
+ <?php } // levelup condition ends ?>
1426
  <?php if(is_single() && $redux_builder_amp['enable-single-social-icons'] ){?>
1427
  .body.single-post{
1428
  padding-bottom:40px;
1429
  }
1430
  <?php } ?>
1431
+ <?php if(!ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
1432
  .content-wrapper a, .breadcrumb ul li a, .srp ul li, .rr a{transition: all 0.3s ease-in-out 0s;}
1433
  [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;}
1434
  <?php if(true == ampforwp_get_setting('enable-amp-ads-1')||true == ampforwp_get_setting('enable-amp-ads-2')||true == ampforwp_get_setting('enable-amp-ads-3')||true == ampforwp_get_setting('enable-amp-ads-4')||true == ampforwp_get_setting('enable-amp-ads-5')||true == ampforwp_get_setting('enable-amp-ads-6')){?>
1446
  #amp-user-notification1 p {display: inline-block;margin: 20px 0px;}
1447
  amp-user-notification button {padding: 8px 10px;background: #005be2;color: #fff;margin-left: 5px;border: 0;}
1448
  <?php } // Notice bar CSS Ends?>
1449
+ <?php } // Levelup Condition ends?>
1450
  <?php
1451
 
1452
  //RTL Styles
1548
  .amp-ad-wrapper{direction:ltr;}
1549
  <?php } //RTL End ?>
1550
  <?php
1551
+ if( !ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts
1552
  if (ampforwp_get_setting('enable-amp-ads-resp-1')){?>
1553
  .amp-ad-1 {
1554
  max-width: 1000px;
1584
  max-width: 1000px;
1585
  }
1586
  <?php } ?>
1587
+ <?php } // levelup condition ends here?>
1588
  <?php if (checkAMPforPageBuilderStatus(get_the_ID())){ ?>
1589
  .sp-cnt .cntr {max-width: 100%;margin:0;width:100%;padding:0}
1590
  <?php } ?>
templates/features.php CHANGED
@@ -754,7 +754,7 @@ function ampforwp_new_dir( $dir ) {
754
  }
755
 
756
  // Above Footer Global
757
- add_action('amp_post_template_above_footer','ampforwp_footer_advert',10);
758
 
759
  function ampforwp_footer_advert() {
760
  global $redux_builder_amp;
@@ -2622,8 +2622,8 @@ function ampforwp_skip_amp_post( $skip, $post_id, $post ) {
2622
  }
2623
 
2624
  // 29. Remove analytics code if Already added by Glue or Yoast SEO (#370)
2625
- add_action('init','remove_analytics_code_if_available',20);
2626
- function remove_analytics_code_if_available(){
2627
  if ( class_exists('WPSEO_Options') && class_exists('YoastSEO_AMP') ) {
2628
  $yoast_glue_seo = get_option('wpseo_amp');
2629
 
@@ -7915,8 +7915,11 @@ function ampforwp_comments_sanitizer(){
7915
  add_filter('amp_post_template_data','ampforwp_add_global_scripts');
7916
  function ampforwp_add_global_scripts($data){
7917
  global $ampforwp_data;
 
7918
  // Add Comments Scripts #2827
7919
- $comments_scripts = $ampforwp_data['comments']['scripts'];
 
 
7920
  if ( !empty($comments_scripts) ) {
7921
  foreach ($comments_scripts as $key => $value ) {
7922
  if( empty( $data['amp_component_scripts'][$key] ) ){
@@ -7948,4 +7951,4 @@ if ( ! function_exists('ampforwp_rank_math') ) {
7948
  function ampforwp_rank_math(){
7949
  do_action( 'rank_math/head' );
7950
  }
7951
- }
754
  }
755
 
756
  // Above Footer Global
757
+ add_action('amp_post_template_footer','ampforwp_footer_advert',10);
758
 
759
  function ampforwp_footer_advert() {
760
  global $redux_builder_amp;
2622
  }
2623
 
2624
  // 29. Remove analytics code if Already added by Glue or Yoast SEO (#370)
2625
+ add_action('init','ampforwp_remove_analytics_code_if_available',20);
2626
+ function ampforwp_remove_analytics_code_if_available(){
2627
  if ( class_exists('WPSEO_Options') && class_exists('YoastSEO_AMP') ) {
2628
  $yoast_glue_seo = get_option('wpseo_amp');
2629
 
7915
  add_filter('amp_post_template_data','ampforwp_add_global_scripts');
7916
  function ampforwp_add_global_scripts($data){
7917
  global $ampforwp_data;
7918
+ $comments_scripts = array();
7919
  // Add Comments Scripts #2827
7920
+ if ( $comments_scripts ) {
7921
+ $comments_scripts = $ampforwp_data['comments']['scripts'];
7922
+ }
7923
  if ( !empty($comments_scripts) ) {
7924
  foreach ($comments_scripts as $key => $value ) {
7925
  if( empty( $data['amp_component_scripts'][$key] ) ){
7951
  function ampforwp_rank_math(){
7952
  do_action( 'rank_math/head' );
7953
  }
7954
+ }