AMP for WP – Accelerated Mobile Pages - Version 0.9.97.39

Version Description

(5th March 2019) = * Added: Compatibility with the Author Simple Box Plugin #2268 * Added: Compatibility when short codes are added in AMP widgets #2552 * Added: Compatibility with the footnotes plugin #2447 * Added: ID Support on the AMP PageBuilder #2474 * Added: embedly oembed support in wordpress #1160 * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515 * Fixed: Debug Errors #2627 * Fixed: Custom Front page is breaking in 0.9.97.16 #2589 * Fixed: Date Archive not working with Swift Design #2514 * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727 * Fixed: Issue with pagebuilder when yoast plugin is active. #2933

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.39
Comparing to
See all releases

Code changes from version 0.9.97.38 to 0.9.97.39

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.1
7
- Stable tag: 0.9.97.38
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -185,6 +185,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  = 0.9.97.38 (28th February 2019) =
189
  * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
190
  * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.1
7
+ Stable tag: 0.9.97.39
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.39 (5th March 2019) =
189
+ * Added: Compatibility with the Author Simple Box Plugin #2268
190
+ * Added: Compatibility when short codes are added in AMP widgets #2552
191
+ * Added: Compatibility with the footnotes plugin #2447
192
+ * Added: ID Support on the AMP PageBuilder #2474
193
+ * Added: embedly oembed support in wordpress #1160
194
+ * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515
195
+ * Fixed: Debug Errors #2627
196
+ * Fixed: Custom Front page is breaking in 0.9.97.16 #2589
197
+ * Fixed: Date Archive not working with Swift Design #2514
198
+ * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727
199
+ * Fixed: Issue with pagebuilder when yoast plugin is active. #2933
200
+
201
  = 0.9.97.38 (28th February 2019) =
202
  * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
203
  * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
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.38
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.38');
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.39
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.39');
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,18 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 0.9.97.38 (28th February 2019) =
4
  * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
5
  * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
1
  == Changelog ==
2
 
3
+ = 0.9.97.39 (5th March 2019) =
4
+ * Added: Compatibility with the Author Simple Box Plugin #2268
5
+ * Added: Compatibility when short codes are added in AMP widgets #2552
6
+ * Added: Compatibility with the footnotes plugin #2447
7
+ * Added: ID Support on the AMP PageBuilder #2474
8
+ * Added: embedly oembed support in wordpress #1160
9
+ * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515
10
+ * Fixed: Debug Errors #2627
11
+ * Fixed: Custom Front page is breaking in 0.9.97.16 #2589
12
+ * Fixed: Date Archive not working with Swift Design #2514
13
+ * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727
14
+ * Fixed: Issue with pagebuilder when yoast plugin is active. #2933
15
+
16
  = 0.9.97.38 (28th February 2019) =
17
  * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
18
  * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
classes/class-ampforwp-embedly-sanitizer.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Converts embedly-cards to <amp-embedly-card>
4
+ */
5
+ class AMPforWP_Embedly_Sanitizer extends AMP_Base_Sanitizer {
6
+ private $embedly_cards = array();
7
+ private static $script_slug = 'amp-embedly-card';
8
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-embedly-card-0.1.js';
9
+ public function sanitize() {
10
+ $body = $this->get_body_node();
11
+ $xpath = new DOMXPath($this->dom);
12
+ $class_name = 'embedly-card';
13
+ $blockquotes = $xpath->query("//*[contains(@class,'$class_name')]");
14
+ foreach($blockquotes as $embedly_card){
15
+ $this->replace_with_amp_embedly_card($embedly_card);
16
+ }
17
+ if(count($this->embedly_cards) > 0){
18
+ $this->did_convert_elements = true;
19
+ }
20
+ }
21
+ function replace_with_amp_embedly_card ($embedly_card){
22
+ $medias = $embedly_card->getElementsByTagName('a');
23
+ if($medias->length > 0){
24
+ $media = $medias->item(0);
25
+ $href = $media->getAttribute('href');
26
+ $tag = $this->create_amp_embedly_card($href);
27
+ $this->embedly_cards[] = $tag; // add it to array
28
+ $embedly_card->parentNode->replaceChild( $tag, $embedly_card);
29
+ }
30
+ }
31
+ function create_amp_embedly_card($href){
32
+ $attrs = array(
33
+ 'data-url' => $href,
34
+ 'width' => 100,
35
+ 'height'=> 50,
36
+ 'layout' => 'responsive'
37
+ );
38
+ $attrs = ampforwp_amp_consent_check( $attrs );
39
+ return AMP_DOM_Utils::create_node($this->dom, 'amp-embedly-card', $attrs);
40
+ }
41
+ public function get_scripts() {
42
+ if ( ! $this->did_convert_elements ) {
43
+ return array();
44
+ }
45
+ return array( self::$script_slug => self::$script_src );
46
+ }
47
+ }
components/author-box/author-box.php CHANGED
@@ -1,5 +1,9 @@
1
  <?php
2
  function ampforwp_framework_get_author_box( $args=array() ) {
 
 
 
 
3
  global $post, $redux_builder_amp;
4
  $post_author = get_userdata($post->post_author);
5
  if ( ! is_array($args) ) {
1
  <?php
2
  function ampforwp_framework_get_author_box( $args=array() ) {
3
+ // Simple Author Box compatibility #2268
4
+ if( class_exists('Simple_Author_Box') ){
5
+ return;
6
+ }
7
  global $post, $redux_builder_amp;
8
  $post_author = get_userdata($post->post_author);
9
  if ( ! is_array($args) ) {
components/loop/loop.php CHANGED
@@ -87,10 +87,6 @@ function call_loops_standard($data=array()){
87
  if ( is_archive() ) {
88
  $exclude_ids = get_option('ampforwp_exclude_post');
89
  $qobj = get_queried_object();
90
- if ( $qobj ){
91
- $qobj_taxonomy = $qobj->taxonomy;
92
- $qobj_term_id = $qobj->term_id;
93
- }
94
  if( !is_date() ){
95
  $args = array(
96
  'post_type' => $post_type,
@@ -111,6 +107,23 @@ function call_loops_standard($data=array()){
111
  );
112
  }
113
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  }
115
  if ( is_home() ) {
116
  $exclude_ids = get_option('ampforwp_exclude_post');
87
  if ( is_archive() ) {
88
  $exclude_ids = get_option('ampforwp_exclude_post');
89
  $qobj = get_queried_object();
 
 
 
 
90
  if( !is_date() ){
91
  $args = array(
92
  'post_type' => $post_type,
107
  );
108
  }
109
  }
110
+ if(is_date()){
111
+ $year = get_query_var('year');
112
+ $monthnum = get_query_var('monthnum');
113
+ $week = get_query_var('week');
114
+ $day = get_query_var('day');
115
+ $args = array( 'date_query' => array(
116
+ array( 'year' => $year,
117
+ 'month' => $monthnum,
118
+ 'week' => $week,
119
+ 'day' => $day )
120
+ ),
121
+ 'paged' => esc_attr($paged),
122
+ 'post__not_in' => $exclude_ids,
123
+ 'has_password' => false ,
124
+ 'post_status'=> 'publish'
125
+ );
126
+ }
127
  }
128
  if ( is_home() ) {
129
  $exclude_ids = get_option('ampforwp_exclude_post');
includes/admin-script.js CHANGED
@@ -597,9 +597,9 @@ AmpForWpYoastAnalysis = function() {
597
  */
598
  AmpForWpYoastAnalysis.prototype.myContentModification = function(data) {
599
  if($('#amp-page-builder-ready').length){
600
- var pbdata = $('#amp-page-builder-ready').val();
601
  var takeover = redux_data['ampforwp-amp-takeover'];
602
- var pb2 = $('input[name="ampforwp_page_builder_enable"]').val();
603
  if ( takeover == 1 && 'yes' == pb2 ) {
604
  data = pbdata;
605
  }
597
  */
598
  AmpForWpYoastAnalysis.prototype.myContentModification = function(data) {
599
  if($('#amp-page-builder-ready').length){
600
+ var pbdata = $('#amp-page-builder-ready').html();
601
  var takeover = redux_data['ampforwp-amp-takeover'];
602
+ var pb2 = $('input[name="ampforwp_page_builder_enable"]:checked').val();
603
  if ( takeover == 1 && 'yes' == pb2 ) {
604
  data = pbdata;
605
  }
includes/options/admin-config.php CHANGED
@@ -5325,7 +5325,6 @@ Redux::setSection( $opt_name, array(
5325
  'order' => 'ASC',
5326
  'number' => 500
5327
  ) );
5328
- $categories_array = '';
5329
  $categories_array = array();
5330
  if ( $categories ) :
5331
  foreach ($categories as $cat ) {
5325
  'order' => 'ASC',
5326
  'number' => 500
5327
  ) );
 
5328
  $categories_array = array();
5329
  if ( $categories ) :
5330
  foreach ($categories as $cat ) {
includes/thirdparty-compatibility.php CHANGED
@@ -607,4 +607,24 @@ function ampforwp_levelup_compatibility($type='levelup_theme_and_elementor_check
607
  break;
608
  }
609
  return $returnVal;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
610
  }
607
  break;
608
  }
609
  return $returnVal;
610
+ }
611
+ //Compatibility with the footnotes plugin. #2447
612
+ add_action('amp_post_template_css','ampforwp_footnote_support');
613
+ if ( ! function_exists('ampforwp_footnote_support') ) {
614
+ function ampforwp_footnote_support(){
615
+ if(class_exists('MCI_Footnotes')){?>
616
+ .footnote_tooltip {
617
+ display: none;
618
+ }
619
+ <?php
620
+ }
621
+ }
622
+ }
623
+
624
+ // Simple Author Box Compatibility #2268
625
+ add_action('amp_post_template_css', 'ampforwp_simple_author_box');
626
+ function ampforwp_simple_author_box(){
627
+ if( class_exists('Simple_Author_Box') ){ ?>
628
+ .saboxplugin-wrap .saboxplugin-gravatar amp-img {max-width: 100px;height: auto;}
629
+ <?php }
630
  }
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -756,6 +756,71 @@ class AMP_Allowed_Tags_Generated {
756
  ),
757
  ),
758
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
759
  'amp-date-picker' => array(
760
  array(
761
  'attr_spec_list' => array(
756
  ),
757
  ),
758
  ),
759
+ 'amp-date-countdown' => array(
760
+ array(
761
+ 'attr_spec_list' => array(
762
+ 'biggest-unit' => array(
763
+ 'value_casei' => array(
764
+ 'days',
765
+ 'hours',
766
+ 'minutes',
767
+ 'seconds',
768
+ ),
769
+ ),
770
+ 'end-date' => array(
771
+ 'value_regex' => '\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?(Z|[+-][0-1][0-9]:[0-5][0-9])',
772
+ ),
773
+ 'locale' => array(
774
+ 'value_casei' => array(
775
+ 'de',
776
+ 'en',
777
+ 'es',
778
+ 'fr',
779
+ 'id',
780
+ 'it',
781
+ 'ja',
782
+ 'ko',
783
+ 'nl',
784
+ 'pt',
785
+ 'ru',
786
+ 'th',
787
+ 'tr',
788
+ 'vi',
789
+ 'zh-cn',
790
+ 'zh-tw',
791
+ ),
792
+ ),
793
+ 'media' => array(),
794
+ 'noloading' => array(
795
+ 'value' => '',
796
+ ),
797
+ 'offset-seconds' => array(
798
+ 'value_regex' => '-?\\d+',
799
+ ),
800
+ 'template' => array(),
801
+ 'timeleft-ms' => array(
802
+ 'value_regex' => '\\d+',
803
+ ),
804
+ 'timestamp-ms' => array(
805
+ 'value_regex' => '\\d{13}',
806
+ ),
807
+ 'timestamp-seconds' => array(
808
+ 'value_regex' => '\\d{10}',
809
+ ),
810
+ 'when-ended' => array(
811
+ 'value_casei' => array(
812
+ 'continue',
813
+ 'stop',
814
+ ),
815
+ ),
816
+ ),
817
+ 'tag_spec' => array(
818
+ 'requires_extension' => array(
819
+ 'amp-date-countdown',
820
+ ),
821
+ ),
822
+ ),
823
+ ),
824
  'amp-date-picker' => array(
825
  array(
826
  'attr_spec_list' => array(
pagebuilder/amp-page-builder.php CHANGED
@@ -132,7 +132,7 @@ function ampforwp_call_page_builder(){
132
  wp_nonce_field( basename( __FILE__) , 'amp_content_editor_nonce' );
133
 
134
  if(class_exists('WPSEO_Frontend')) { ?>
135
- <textarea class="hide" id="amp-page-builder-ready"><?php echo stripcslashes( amppb_post_content('') ); ?></textarea><?php } ?>
136
  <div id="ampForWpPageBuilder_container">
137
  <div id="start_amp_pb_post" class="start_amp_pb" data-postId="<?php echo esc_attr(get_the_ID()) ?>" v-if="startPagebuilder==0" @click="amppb_startFunction($event)"><?php echo esc_html__('Start the AMP Page Builder','accelerated-mobile-pages'); ?></div>
138
  <div class="enable_ampforwp_page_builder" v-if="startPagebuilder==1">
132
  wp_nonce_field( basename( __FILE__) , 'amp_content_editor_nonce' );
133
 
134
  if(class_exists('WPSEO_Frontend')) { ?>
135
+ <div class="hide" id="amp-page-builder-ready"><?php echo stripcslashes( amppb_post_content('') ); ?></div><?php } ?>
136
  <div id="ampForWpPageBuilder_container">
137
  <div id="start_amp_pb_post" class="start_amp_pb" data-postId="<?php echo esc_attr(get_the_ID()) ?>" v-if="startPagebuilder==0" @click="amppb_startFunction($event)"><?php echo esc_html__('Start the AMP Page Builder','accelerated-mobile-pages'); ?></div>
138
  <div class="enable_ampforwp_page_builder" v-if="startPagebuilder==1">
pagebuilder/inc/viewShowFrontData.php CHANGED
@@ -596,7 +596,7 @@ function amppb_post_content($content){
596
  if($field['content_type']=='html'){
597
  $replace ='';
598
  if($field['name'] == 'row_class'){
599
- $replace .= 'ap_r_'.$rowsData['id'];
600
  }
601
  if(isset($rowsData['data'][$field['name']]) && !is_array($rowsData['data'][$field['name']])){
602
  if($field['name']=='grid_type' && $rowsData['data'][$field['name']] == 'amppb-fluid' ){
@@ -604,7 +604,7 @@ function amppb_post_content($content){
604
  }elseif($field['name']=='grid_type' && $rowsData['data'][$field['name']]=='amppb-fixed'){
605
  $replace .= 'ap-fi';
606
  }else{
607
- $replace .= $rowsData['data'][$field['name']];
608
  }
609
  }else{
610
  $replace .= '';
@@ -621,7 +621,7 @@ function amppb_post_content($content){
621
  if(count($rowsData['cell_data'])>0){
622
  switch ($rowsData['cells']) {
623
  case '1':
624
- $html .= rowData($rowsData['cell_data'],$rowsData['cells'],$moduleTemplate);
625
  break;
626
  case '2':
627
  $colData = array();
@@ -630,7 +630,7 @@ function amppb_post_content($content){
630
  }
631
  $html .= '<div class="col-2-wrap">';
632
  foreach($colData as $data)
633
- $html .= rowData($data,$rowsData['cells'],$moduleTemplate);
634
  $html .= '</div>';
635
  break;
636
 
@@ -650,7 +650,7 @@ function amppb_post_content($content){
650
  return do_shortcode($content);
651
  }
652
 
653
- function rowData($container,$col,$moduleTemplate){
654
  $ampforwp_show_excerpt = true;
655
  $html = '';
656
  if(count($container)>0){
596
  if($field['content_type']=='html'){
597
  $replace ='';
598
  if($field['name'] == 'row_class'){
599
+ $replace .= 'ap_r_'.esc_attr($rowsData['id'])." ";
600
  }
601
  if(isset($rowsData['data'][$field['name']]) && !is_array($rowsData['data'][$field['name']])){
602
  if($field['name']=='grid_type' && $rowsData['data'][$field['name']] == 'amppb-fluid' ){
604
  }elseif($field['name']=='grid_type' && $rowsData['data'][$field['name']]=='amppb-fixed'){
605
  $replace .= 'ap-fi';
606
  }else{
607
+ $replace .= esc_html($rowsData['data'][$field['name']]);
608
  }
609
  }else{
610
  $replace .= '';
621
  if(count($rowsData['cell_data'])>0){
622
  switch ($rowsData['cells']) {
623
  case '1':
624
+ $html .= ampforwp_rowData($rowsData['cell_data'],$rowsData['cells'],$moduleTemplate);
625
  break;
626
  case '2':
627
  $colData = array();
630
  }
631
  $html .= '<div class="col-2-wrap">';
632
  foreach($colData as $data)
633
+ $html .= ampforwp_rowData($data,$rowsData['cells'],$moduleTemplate);
634
  $html .= '</div>';
635
  break;
636
 
650
  return do_shortcode($content);
651
  }
652
 
653
+ function ampforwp_rowData($container,$col,$moduleTemplate){
654
  $ampforwp_show_excerpt = true;
655
  $html = '';
656
  if(count($container)>0){
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.1
7
- Stable tag: 0.9.97.38
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -186,12 +186,17 @@ You can contact us from [here](https://ampforwp.com/contact/)
186
 
187
  == Changelog ==
188
 
189
- = 0.9.97.38 (28th February 2019) =
190
- * Added: The Subtitle in the Facebook Instant Artical(FBIA) using of the Jannah Theme #2746
191
- * Fixed: Space missing in categories list for breadcrumb [Design-3] #2817
192
- * Fixed: Issue with Post Pagination ( Single ) #2624
193
- * Fixed: No match for the query in amp search then it's renderring to non-amp template when amp-takeover is enabled #2681
194
- * Fixed: Full excerpt length in single posts [swift] #2712
195
- * Fixed: Undefined variable warning in class-amp-img-sanitizer.php #2848
 
 
 
 
 
196
 
197
  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.1
7
+ Stable tag: 0.9.97.39
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
186
 
187
  == Changelog ==
188
 
189
+ = 0.9.97.39 (5th March 2019) =
190
+ * Added: Compatibility with the Author Simple Box Plugin #2268
191
+ * Added: Compatibility when short codes are added in AMP widgets #2552
192
+ * Added: Compatibility with the footnotes plugin #2447
193
+ * Added: ID Support on the AMP PageBuilder #2474
194
+ * Added: embedly oembed support in wordpress #1160
195
+ * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515
196
+ * Fixed: Debug Errors #2627
197
+ * Fixed: Custom Front page is breaking in 0.9.97.16 #2589
198
+ * Fixed: Date Archive not working with Swift Design #2514
199
+ * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727
200
+ * Fixed: Issue with pagebuilder when yoast plugin is active. #2933
201
 
202
  Full changelog available in changelog.txt
templates/design-manager/design-1/elements/meta-taxonomy.php CHANGED
@@ -48,7 +48,7 @@
48
 
49
  <?php
50
 
51
- if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_single() ) {
52
  if( $redux_builder_amp['amp-author-description'] ) { ?>
53
  <div class="amp-wp-content amp_author_area ampforwp-meta-taxonomy">
54
  <div class="amp_author_area_wrapper">
48
 
49
  <?php
50
 
51
+ if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_single() && !class_exists('Simple_Author_Box') ) {
52
  if( $redux_builder_amp['amp-author-description'] ) { ?>
53
  <div class="amp-wp-content amp_author_area ampforwp-meta-taxonomy">
54
  <div class="amp_author_area_wrapper">
templates/design-manager/design-2/elements/meta-taxonomy.php CHANGED
@@ -31,7 +31,7 @@
31
 
32
  <?php
33
 
34
- if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_single() ) {
35
  if( $redux_builder_amp['amp-author-description'] ) { ?>
36
  <div class="amp-wp-content amp_author_area ampforwp-meta-taxonomy">
37
  <div class="amp_author_area_wrapper">
31
 
32
  <?php
33
 
34
+ if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_single() && !class_exists('Simple_Author_Box') ) {
35
  if( $redux_builder_amp['amp-author-description'] ) { ?>
36
  <div class="amp-wp-content amp_author_area ampforwp-meta-taxonomy">
37
  <div class="amp_author_area_wrapper">
templates/design-manager/design-3/elements/meta-taxonomy.php CHANGED
@@ -19,7 +19,7 @@
19
  </div> <?php } ?>
20
 
21
  <?php
22
- if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_single() ) {
23
  if( $redux_builder_amp['amp-author-description'] ) { ?>
24
  <div class="amp-wp-content amp_author_area ampforwp-meta-taxonomy">
25
  <div class="amp_author_area_wrapper">
19
  </div> <?php } ?>
20
 
21
  <?php
22
+ if( array_key_exists( 'amp-author-description' , $redux_builder_amp ) && is_single() && !class_exists('Simple_Author_Box') ) {
23
  if( $redux_builder_amp['amp-author-description'] ) { ?>
24
  <div class="amp-wp-content amp_author_area ampforwp-meta-taxonomy">
25
  <div class="amp_author_area_wrapper">
templates/design-manager/swift/footer.php CHANGED
@@ -16,7 +16,7 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
17
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
18
  }
19
- echo $sidebar_output; // amphtml content, no kses
20
  ?>
21
  </div>
22
  </div>
16
  $sidebar_output = $sanitized_sidebar->get_amp_content();
17
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
18
  }
19
+ echo do_shortcode($sidebar_output); // amphtml content, no kses
20
  ?>
21
  </div>
22
  </div>
templates/design-manager/swift/single.php CHANGED
@@ -428,7 +428,7 @@ do_action("ampforwp_single_design_type_handle");
428
  $sidebar_output = $sanitized_sidebar->get_amp_content();
429
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
430
  }
431
- echo $sidebar_output; // amphtml content, no kses
432
  ?>
433
  </div>
434
  <?php endif; ?>
428
  $sidebar_output = $sanitized_sidebar->get_amp_content();
429
  $sidebar_output = apply_filters('ampforwp_modify_sidebars_content',$sidebar_output);
430
  }
431
+ echo do_shortcode($sidebar_output); // amphtml content, no kses
432
  ?>
433
  </div>
434
  <?php endif; ?>
templates/features.php CHANGED
@@ -2598,7 +2598,11 @@ function ampforwp_modify_archive_title_in_amp() {
2598
  // xlink attribute causes Validatation Issues #1149
2599
  $content_buffer = preg_replace('/xlink="href"/','',$content_buffer);
2600
  $content_buffer = preg_replace('/!important/', '' , $content_buffer);
2601
-
 
 
 
 
2602
  $content_buffer = apply_filters('ampforwp_the_content_last_filter', $content_buffer);
2603
 
2604
  }
@@ -7609,7 +7613,7 @@ function ampforwp_sneak_peek_scripts($data) {
7609
  // #1575 Thrive Content Support
7610
  add_action('amp_init','ampforwp_thrive_architect_content');
7611
  function ampforwp_thrive_architect_content(){
7612
- if(function_exists('tve_wp_action')){
7613
  add_filter( 'ampforwp_modify_the_content','ampforwp_thrive_content');
7614
  }
7615
  }
@@ -7959,3 +7963,12 @@ if ( ! function_exists('ampforwp_rank_math') ) {
7959
  do_action( 'rank_math/head' );
7960
  }
7961
  }
 
 
 
 
 
 
 
 
 
2598
  // xlink attribute causes Validatation Issues #1149
2599
  $content_buffer = preg_replace('/xlink="href"/','',$content_buffer);
2600
  $content_buffer = preg_replace('/!important/', '' , $content_buffer);
2601
+ // Compatibility with the footnotes plugin. #2447
2602
+ if(class_exists('MCI_Footnotes')){
2603
+ $content_buffer = preg_replace( '/<sup(.*?)id="(.*?)"(.*?)class="footnote_plugin_tooltip_text"(.*?)>(.*?)<\/sup>/m', '
2604
+ <sup$1id="$2"$3class="footnote_plugin_tooltip_text"$4><a href="#$2">$5</a></sup>', $content_buffer);
2605
+ }
2606
  $content_buffer = apply_filters('ampforwp_the_content_last_filter', $content_buffer);
2607
 
2608
  }
7613
  // #1575 Thrive Content Support
7614
  add_action('amp_init','ampforwp_thrive_architect_content');
7615
  function ampforwp_thrive_architect_content(){
7616
+ if(function_exists('tve_wp_action') && !function_exists('et_setup_theme')){
7617
  add_filter( 'ampforwp_modify_the_content','ampforwp_thrive_content');
7618
  }
7619
  }
7963
  do_action( 'rank_math/head' );
7964
  }
7965
  }
7966
+ #1160 Embedly Sanitizer
7967
+ add_filter( 'amp_content_sanitizers', 'ampforwp_embedly_sanitizer', 10, 1 );
7968
+ function ampforwp_embedly_sanitizer( $sanitizer_classes ) {
7969
+ if ( class_exists('WP_Embedly') ) {
7970
+ require_once( AMPFORWP_PLUGIN_DIR. 'classes/class-ampforwp-embedly-sanitizer.php' );
7971
+ $sanitizer_classes[ 'AMPforWP_Embedly_Sanitizer' ] = array();
7972
+ }
7973
+ return $sanitizer_classes;
7974
+ }