Skip to content

Instantly share code, notes, and snippets.

@GreatPotato
Created May 20, 2013 13:58
Show Gist options
  • Save GreatPotato/5612396 to your computer and use it in GitHub Desktop.
Save GreatPotato/5612396 to your computer and use it in GitHub Desktop.
<?php
function gp_empty_paragraph_fix($content) {
$array = array (
'<p>[' => '[',
']</p>' => ']',
']<br />' => ']'
);
$content = strtr($content, $array);
return $content;
}
add_filter('the_content', 'gp_empty_paragraph_fix');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment