Skip to content

Commit

Permalink
#2447 Added in master
Browse files Browse the repository at this point in the history
  • Loading branch information
Zabi09 committed Mar 2, 2019
1 parent aa00a08 commit 4668e18
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 13 additions & 1 deletion includes/thirdparty-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,4 +607,16 @@ function ampforwp_levelup_compatibility($type='levelup_theme_and_elementor_check
break;
}
return $returnVal;
}
}
//Compatibility with the footnotes plugin. #2447
add_action('amp_post_template_css','ampforwp_footnote_support');
if ( ! function_exists('ampforwp_footnote_support') ) {
function ampforwp_footnote_support(){
if(class_exists('MCI_Footnotes')){?>
.footnote_tooltip {
display: none;
}
<?php
}
}
}
6 changes: 5 additions & 1 deletion templates/features.php
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,11 @@ function ampforwp_the_content_filter_full( $content_buffer ) {
// xlink attribute causes Validatation Issues #1149
$content_buffer = preg_replace('/xlink="href"/','',$content_buffer);
$content_buffer = preg_replace('/!important/', '' , $content_buffer);

// Compatibility with the footnotes plugin. #2447
if(class_exists('MCI_Footnotes')){
$content_buffer = preg_replace( '/<sup(.*?)id="(.*?)"(.*?)class="footnote_plugin_tooltip_text"(.*?)>(.*?)<\/sup>/m', '
<sup$1id="$2"$3class="footnote_plugin_tooltip_text"$4><a href="#$2">$5</a></sup>', $content_buffer);
}
$content_buffer = apply_filters('ampforwp_the_content_last_filter', $content_buffer);

}
Expand Down

0 comments on commit 4668e18

Please sign in to comment.