我只是遇到了这种情况。这里有一个我用来撤消wpautop的函数。我可能错过了什么,但这是一个好的开始:
function reverse_wpautop($s)
{
//remove any new lines already in there
$s = str_replace("\\n", "", $s);
//remove all <p>
$s = str_replace("<p>", "", $s);
//replace <br /> with \\n
$s = str_replace(array("<br />", "<br>", "<br/>"), "\\n", $s);
//replace </p> with \\n\\n
$s = str_replace("</p>", "\\n\\n", $s);
return $s;
}