WordPress 1.5.1.3 and Linebreaks

On my test install of WordPress 1.5.1.3, I wanted to get rid of that damned annoying “autop” function that feels like inserting “p” tags willy-nilly. Generally speaking to do this you bust open /wp-includes/functions-formatting.php and find

function wpautop($pee, $br = 1)

Change the 1 to a 0 and you’re in business. But apparently this is not the case in my install. Not sure if this is a bug in 1.5.1.3 or my install is just acting wacky. In my case, I had to kill the line:

$pee = preg_replace('/n?(.+?)(?:ns*n|z)/s', “t

$1

n”, $pee); // make paragraphs, including one at the end

Might have to double check that once I get home, but I’m pretty sure that’s the right one. Happy WordPress hacking.

Leave a Reply

Your email address will not be published. Required fields are marked *