AMP for WP – Accelerated Mobile Pages - Version 0.9.97.29

Version Description

(31st January 2019) = * Fixed: Validation error due to Search Widget #2858 * Fixed: Issue after upgrading analytics code #2859 * Fixed: amp-animation error in amp theme framework and tech blogging amp theme #2819 * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast - code updated #2816 * Fixed: Search Console Crawl Errors ?nonamp=1/ is listed in Access denied #2760

Full changelog available in changelog.txt

Download this release

Release Info

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

Code changes from version 0.9.97.28 to 0.9.97.29

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.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -184,6 +184,13 @@ You can contact us from [here](https://ampforwp.com/contact/)
184
 
185
  == Changelog ==
186
 
 
 
 
 
 
 
 
187
  = 0.9.97.28 (29th January 2019) =
188
  * Added: Lightbox feature for Carousel #2731
189
  * Added: Specific filters to modify the analytics code #2653
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.29
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.29 (31st January 2019) =
188
+ * Fixed: Validation error due to Search Widget #2858
189
+ * Fixed: Issue after upgrading analytics code #2859
190
+ * Fixed: amp-animation error in amp theme framework and tech blogging amp theme #2819
191
+ * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast - code updated #2816
192
+ * Fixed: Search Console Crawl Errors ?nonamp=1/ is listed in Access denied #2760
193
+
194
  = 0.9.97.28 (29th January 2019) =
195
  * Added: Lightbox feature for Carousel #2731
196
  * Added: Specific filters to modify the analytics code #2653
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.28
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.28');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.97.29
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.29');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
changelog.txt CHANGED
@@ -1,5 +1,12 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
3
  = 0.9.97.28 (29th January 2019) =
4
  * Added: Lightbox feature for Carousel #2731
5
  * Added: Specific filters to modify the analytics code #2653
1
  == Changelog ==
2
 
3
+ = 0.9.97.29 (31st January 2019) =
4
+ * Fixed: Validation error due to Search Widget #2858
5
+ * Fixed: Issue after upgrading analytics code #2859
6
+ * Fixed: amp-animation error in amp theme framework and tech blogging amp theme #2819
7
+ * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast - code updated #2816
8
+ * Fixed: Search Console Crawl Errors ?nonamp=1/ is listed in Access denied #2760
9
+
10
  = 0.9.97.28 (29th January 2019) =
11
  * Added: Lightbox feature for Carousel #2731
12
  * Added: Specific filters to modify the analytics code #2653
components/components-core.php CHANGED
@@ -410,6 +410,7 @@ function amp_footer_core(){
410
  do_action('ampforwp_global_after_footer');
411
  do_action('amp_end',$thisTemplate);
412
  }
 
413
  // Close the body and Html tags ?>
414
  </body>
415
  </html><?php
@@ -628,4 +629,35 @@ function amp_author_meta( $args ) {
628
  echo $amp_html; // amphtml content, no kses
629
  }
630
 
631
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  do_action('ampforwp_global_after_footer');
411
  do_action('amp_end',$thisTemplate);
412
  }
413
+ amp_back_to_top_link();
414
  // Close the body and Html tags ?>
415
  </body>
416
  </html><?php
629
  echo $amp_html; // amphtml content, no kses
630
  }
631
 
632
+ }
633
+
634
+ // amp-animation CSS #2819
635
+ add_action('amp_post_template_css','ampforwp_backtotop_global_css');
636
+ function ampforwp_backtotop_global_css(){
637
+ if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
638
+ .btt{
639
+ position: fixed;
640
+ <?php if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_page() && true == $redux_builder_amp['ampforwp-page-sticky-social']) ){ ?>
641
+ bottom: 55px;
642
+ <?php } else { ?>
643
+ bottom: 20px;
644
+ <?php } ?>
645
+ right: 20px;
646
+ background: rgba(71, 71, 71, 0.5);
647
+ color: #fff;
648
+ border-radius: 100%;
649
+ width: 50px;
650
+ height: 50px;
651
+ }
652
+ .btt:hover{color:#fff;background:#474747;}
653
+ .btt:before{
654
+ content: '\25be';
655
+ display: block;
656
+ font-size: 35px;
657
+ font-weight: 600;
658
+ color: #fff;
659
+ transform: rotate(180deg);
660
+ text-align: center;
661
+ line-height: 1.5;
662
+ }
663
+ <?php } } ?>
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.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -185,16 +185,11 @@ You can contact us from [here](https://ampforwp.com/contact/)
185
 
186
  == Changelog ==
187
 
188
- = 0.9.97.28 (29th January 2019) =
189
- * Added: Lightbox feature for Carousel #2731
190
- * Added: Specific filters to modify the analytics code #2653
191
- * Fixed: Homepage Blog CSS is loading on the custom frontpage in swift theme #2754
192
- * Fixed: Reset all & Reset section issue for redux framework #2722
193
- * Fixed: Transable redux fields for other plugins like wpml #2737
194
- * Fixed: Proper condition for Ads css #2758
195
- * Fixed: Jetpack stats pixel inserted twice since Jetpack v6.9 #2812
196
- * Fixed: AMP pagebuilder full width for posts #2765
197
- * Fixed: Undefined “non-content” in blacklist-sanitizer #2842
198
- * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast #2816
199
 
200
  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.29
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.29 (31st January 2019) =
189
+ * Fixed: Validation error due to Search Widget #2858
190
+ * Fixed: Issue after upgrading analytics code #2859
191
+ * Fixed: amp-animation error in amp theme framework and tech blogging amp theme #2819
192
+ * Fixed: Blog title is displaying on Homepage when static front page is selected in All in one SEO & Yoast - code updated #2816
193
+ * Fixed: Search Console Crawl Errors ?nonamp=1/ is listed in Access denied #2760
 
 
 
 
 
194
 
195
  Full changelog available in changelog.txt
templates/design-manager/swift/footer.php CHANGED
@@ -39,7 +39,6 @@
39
  <?php } }?>
40
  <div class="rr">
41
  <?php amp_non_amp_link(); ?>
42
- <?php amp_back_to_top_link(); ?>
43
  <?php do_action('amp_footer_link'); ?>
44
  </div>
45
  </div>
39
  <?php } }?>
40
  <div class="rr">
41
  <?php amp_non_amp_link(); ?>
 
42
  <?php do_action('amp_footer_link'); ?>
43
  </div>
44
  </div>
templates/design-manager/swift/style.php CHANGED
@@ -1558,37 +1558,6 @@ if (ampforwp_get_setting('enable-amp-ads-resp-6')){?>
1558
  max-width: 1000px;
1559
  }
1560
  <?php } ?>
1561
- <?php // Back to Top CSS //
1562
- if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
1563
-
1564
- .btt{
1565
- position: fixed;
1566
- <?php if( (is_single() && true == ampforwp_get_setting('enable-single-social-icons') ) || (is_page() && true == ampforwp_get_setting('ampforwp-page-sticky-social') ) ){ ?>
1567
- bottom: 55px;
1568
- <?php } else { ?>
1569
- bottom: 20px;
1570
- <?php } ?>
1571
- right: 20px;
1572
- padding: 10px;
1573
- background: rgba(71, 71, 71, 0.5);
1574
- color: #fff;
1575
- border-radius: 100%;
1576
- width: 50px;
1577
- height: 50px;
1578
- }
1579
- .btt:hover{color:#fff;background:#474747;}
1580
- .btt:before{
1581
- content: "\e316";
1582
- font-family: 'icomoon';
1583
- display:block;
1584
- font-size: 30px;
1585
- font-weight: 600;
1586
- color:#fff;
1587
- text-align: center;
1588
- line-height: 1;
1589
- }
1590
- .rr a#scrollToTopButton{color:#fff;}
1591
- <?php } ?>
1592
  <?php if (checkAMPforPageBuilderStatus(get_the_ID())){ ?>
1593
  .sp-cnt .cntr {max-width: 100%;margin:0;width:100%;padding:0}
1594
  <?php } ?>
1558
  max-width: 1000px;
1559
  }
1560
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1561
  <?php if (checkAMPforPageBuilderStatus(get_the_ID())){ ?>
1562
  .sp-cnt .cntr {max-width: 100%;margin:0;width:100%;padding:0}
1563
  <?php } ?>
templates/features.php CHANGED
@@ -1215,7 +1215,7 @@ function ampforwp_new_dir( $dir ) {
1215
  $quantcast_fields = array(
1216
  'vars'=>array(
1217
  'pcode'=>$quantcast,
1218
- 'labels'=>[ "AMPProject" ]
1219
  ),
1220
  );
1221
  $ampforwp_quantcast_fields = apply_filters('ampforwp_quantcast_analytics', $ampforwp_quantcast_fields );
@@ -2405,7 +2405,7 @@ function ampforwp_remove_title_tags() {
2405
  }
2406
  function ampforwp_replace_title_tags() {
2407
 
2408
- add_filter( 'pre_get_document_title', 'ampforwp_add_custom_title_tag', 10 );
2409
  add_filter( 'wp_title', 'ampforwp_add_custom_title_tag', 10, 3 );
2410
 
2411
  function ampforwp_add_custom_title_tag( $title = '', $sep = '', $seplocation = '' ) {
@@ -2520,7 +2520,6 @@ function ampforwp_replace_title_tags() {
2520
  }
2521
  }
2522
 
2523
- add_filter('aioseop_title','ampforwp_aioseop_front_page_title');
2524
  // All in One SEO #2816
2525
  if ( class_exists('All_in_One_SEO_Pack') && ampforwp_is_front_page() ) {
2526
  $aiseop_title = $post = '';
@@ -3331,7 +3330,7 @@ function ampforwp_sidebar_blacklist_tags($tags) {
3331
  return $tags;
3332
  }
3333
  // Sidebar Scripts
3334
- add_filter( 'amp_post_template_data', 'ampforwp_add_sidebar_data' );
3335
  function ampforwp_add_sidebar_data( $data ) {
3336
  $sanitized_data_above_loop = '';
3337
  $sanitized_data_below_loop = '';
@@ -3355,13 +3354,13 @@ function ampforwp_add_sidebar_data( $data ) {
3355
  $data['amp_component_scripts'][$key] = $value;
3356
  }
3357
  }
3358
- // Form script #1400
3359
- $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_above_loop->get_amp_content());
3360
- if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3361
- if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3362
- $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3363
- }
3364
- }
3365
  }
3366
  // Add Styles
3367
  if ( $sanitized_data_above_loop->get_amp_styles() ) {
@@ -3380,13 +3379,13 @@ function ampforwp_add_sidebar_data( $data ) {
3380
  $data['amp_component_scripts'][$key] = $value;
3381
  }
3382
  }
3383
- // Form script #1400
3384
- $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_below_loop->get_amp_content());
3385
- if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3386
- if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3387
- $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3388
- }
3389
- }
3390
  }
3391
  // Add Styles
3392
  if ( $sanitized_data_below_loop->get_amp_styles() ) {
@@ -3405,13 +3404,13 @@ function ampforwp_add_sidebar_data( $data ) {
3405
  $data['amp_component_scripts'][$key] = $value;
3406
  }
3407
  }
3408
- // Form script #1400
3409
- $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_below_header->get_amp_content());
3410
- if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3411
- if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3412
- $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3413
- }
3414
- }
3415
  }
3416
  // Add Styles
3417
  if ( $sanitized_data_below_header->get_amp_styles() ) {
@@ -3430,13 +3429,13 @@ function ampforwp_add_sidebar_data( $data ) {
3430
  $data['amp_component_scripts'][$key] = $value;
3431
  }
3432
  }
3433
- // Form script #1400
3434
- $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_above_footer->get_amp_content());
3435
- if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3436
- if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3437
- $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3438
- }
3439
- }
3440
  }
3441
  // Add Styles
3442
  if ( $sanitized_data_above_footer->get_amp_styles() ) {
@@ -3455,13 +3454,13 @@ function ampforwp_add_sidebar_data( $data ) {
3455
  $data['amp_component_scripts'][$key] = $value;
3456
  }
3457
  }
3458
- // Form script #1400
3459
- $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_swift_sidebar->get_amp_content());
3460
- if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3461
- if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3462
- $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3463
- }
3464
- }
3465
  }
3466
  // Add Styles
3467
  if ( $sanitized_data_swift_sidebar->get_amp_styles() ) {
@@ -3480,13 +3479,13 @@ function ampforwp_add_sidebar_data( $data ) {
3480
  $data['amp_component_scripts'][$key] = $value;
3481
  }
3482
  }
3483
- // Form script #1400
3484
- $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_swift_footer->get_amp_content());
3485
- if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3486
- if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3487
- $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3488
- }
3489
- }
3490
  }
3491
  // Add Styles
3492
  if ( $sanitized_data_swift_footer->get_amp_styles() ) {
@@ -4394,7 +4393,7 @@ function ampforwp_view_nonamp(){
4394
  }
4395
 
4396
  if( true == $redux_builder_amp['ampforwp-nofollow-view-nonamp'] ){
4397
- $nofollow = 'rel="nofollow"';
4398
  }
4399
  if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && $redux_builder_amp['ampforwp-amp-takeover'] ) {
4400
  $ampforwp_backto_nonamp = '';
1215
  $quantcast_fields = array(
1216
  'vars'=>array(
1217
  'pcode'=>$quantcast,
1218
+ 'labels'=> array("AMPProject")
1219
  ),
1220
  );
1221
  $ampforwp_quantcast_fields = apply_filters('ampforwp_quantcast_analytics', $ampforwp_quantcast_fields );
2405
  }
2406
  function ampforwp_replace_title_tags() {
2407
 
2408
+ add_filter( 'pre_get_document_title', 'ampforwp_add_custom_title_tag', 20 );
2409
  add_filter( 'wp_title', 'ampforwp_add_custom_title_tag', 10, 3 );
2410
 
2411
  function ampforwp_add_custom_title_tag( $title = '', $sep = '', $seplocation = '' ) {
2520
  }
2521
  }
2522
 
 
2523
  // All in One SEO #2816
2524
  if ( class_exists('All_in_One_SEO_Pack') && ampforwp_is_front_page() ) {
2525
  $aiseop_title = $post = '';
3330
  return $tags;
3331
  }
3332
  // Sidebar Scripts
3333
+ add_filter( 'amp_post_template_data', 'ampforwp_add_sidebar_data', 25 );
3334
  function ampforwp_add_sidebar_data( $data ) {
3335
  $sanitized_data_above_loop = '';
3336
  $sanitized_data_below_loop = '';
3354
  $data['amp_component_scripts'][$key] = $value;
3355
  }
3356
  }
3357
+ }
3358
+ // Form script #1400
3359
+ $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_above_loop->get_amp_content());
3360
+ if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3361
+ if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3362
+ $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3363
+ }
3364
  }
3365
  // Add Styles
3366
  if ( $sanitized_data_above_loop->get_amp_styles() ) {
3379
  $data['amp_component_scripts'][$key] = $value;
3380
  }
3381
  }
3382
+ }
3383
+ // Form script #1400
3384
+ $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_below_loop->get_amp_content());
3385
+ if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3386
+ if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3387
+ $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3388
+ }
3389
  }
3390
  // Add Styles
3391
  if ( $sanitized_data_below_loop->get_amp_styles() ) {
3404
  $data['amp_component_scripts'][$key] = $value;
3405
  }
3406
  }
3407
+ }
3408
+ // Form script #1400
3409
+ $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_below_header->get_amp_content());
3410
+ if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3411
+ if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3412
+ $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3413
+ }
3414
  }
3415
  // Add Styles
3416
  if ( $sanitized_data_below_header->get_amp_styles() ) {
3429
  $data['amp_component_scripts'][$key] = $value;
3430
  }
3431
  }
3432
+ }
3433
+ // Form script #1400
3434
+ $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_above_footer->get_amp_content());
3435
+ if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3436
+ if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3437
+ $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3438
+ }
3439
  }
3440
  // Add Styles
3441
  if ( $sanitized_data_above_footer->get_amp_styles() ) {
3454
  $data['amp_component_scripts'][$key] = $value;
3455
  }
3456
  }
3457
+ }
3458
+ // Form script #1400
3459
+ $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_swift_sidebar->get_amp_content());
3460
+ if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3461
+ if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3462
+ $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3463
+ }
3464
  }
3465
  // Add Styles
3466
  if ( $sanitized_data_swift_sidebar->get_amp_styles() ) {
3479
  $data['amp_component_scripts'][$key] = $value;
3480
  }
3481
  }
3482
+ }
3483
+ // Form script #1400
3484
+ $dom = AMP_DOM_Utils::get_dom_from_content($sanitized_data_swift_footer->get_amp_content());
3485
+ if ( 0 !== $dom->getElementsByTagName( 'form' )->length ) {
3486
+ if( empty( $data['amp_component_scripts']['amp-form'] ) ){
3487
+ $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
3488
+ }
3489
  }
3490
  // Add Styles
3491
  if ( $sanitized_data_swift_footer->get_amp_styles() ) {
4393
  }
4394
 
4395
  if( true == $redux_builder_amp['ampforwp-nofollow-view-nonamp'] ){
4396
+ $nofollow = 'rel=nofollow';
4397
  }
4398
  if ( isset($redux_builder_amp['ampforwp-amp-takeover']) && $redux_builder_amp['ampforwp-amp-takeover'] ) {
4399
  $ampforwp_backto_nonamp = '';