Permalink
Browse files

disable wpautop if lytes are found (can be overruled with a filter)

  • Loading branch information...
futtta committed Jan 15, 2018
1 parent 4a185a6 commit 14c5d74b45f9beaf3ffad33ae2b1d140ee041122
Showing with 3 additions and 0 deletions.
  1. +3 −0 wp-youtube-lyte.php
View
@@ -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);

0 comments on commit 14c5d74

Please sign in to comment.