Skip to content

Commit

Permalink
disable wpautop if lytes are found (can be overruled with a filter)
Browse files Browse the repository at this point in the history
  • Loading branch information
futtta committed Jan 15, 2018
1 parent 4a185a6 commit 14c5d74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wp-youtube-lyte.php
Expand Up @@ -121,6 +121,9 @@ function lyte_parse($the_content,$doExcerpt=false) {
}

if((strpos($the_content, "httpv")!==FALSE)||(strpos($the_content, "httpa")!==FALSE)) {
if (apply_filters('lyte_remove_wpautop',true)) {
remove_filter('the_content','wpautop');
}
$char_codes = array('×','–');
$replacements = array("x", "--");
$the_content=str_replace($char_codes, $replacements, $the_content);
Expand Down

0 comments on commit 14c5d74

Please sign in to comment.