在 wordpress 加载时弹出消息

Messages popping up on wordpress load

我试图隐藏以下在我加载任何 wordpress 页面时不断显示的消息:

 Force Word Wrapping. For support / comments / whatever, visit the support forums. Version: 1.0.0 Author: Jim Wigginton Author URI: http://www.frostjedi.com/ */ function word_wrap_pass($message) { $wrapAt = 70; $tempText = ''; $finalText = ''; $curCount = $tempCount = 0; $longestAmp = 9; $inTag = false; $ampText = ''; $len = strlen($message); for ($num=0;$num<$len;$num++) { $curChar = $message{$num}; if ($curChar == '<') { for ($snum=0;$snum') { $tempText .= '>'; $inTag = false; } elseif ($inTag) { $tempText .= $curChar; } elseif ($curChar == '&') { for ($snum=0;$snum= $longestAmp || $curChar == ';') { for ($snum=0;$snum= $maxChars) { $finalText .= $tempText . ' '; $tempText = ''; $curCount = 1; } else { $tempText .= $curChar; $curCount++; } // the following code takes care of (unicode) characters prohibiting non-mandatory breaks directly before them. // $curChar isn't a " " or "\n" if ($tempText != '' && $curChar != '') { $tempCount++; } // $curChar is " " or "\n", but $nextChar prohibits wrapping. elseif ( ($curCount == 1 && strstr($wrapProhibitedChars,$curChar) !== false) || ($curCount == 0 && $nextChar != '' && $nextChar != ' ' && $nextChar != "\n" && strstr($wrapProhibitedChars,$nextChar) !== false)) { $tempCount++; } // $curChar and $nextChar aren't both either " " or "\n" elseif (!($curCount == 0 && ($nextChar == ' ' || $nextChar == "\n"))) { $tempCount = 0; } if ($tempCount >= $maxChars && $tempText == '') { $finalText .= ' '; $tempCount = 1; $curCount = 2; } if ($tempText == '' && $curCount > 0) { $finalText .= $curChar; } } add_filter('the_content', 'word_wrap_pass'); add_filter('comment_text', 'word_wrap_pass'); ?>

我尝试了很多不同的东西,包括这个How can I stop PHP notices from appearing in wordpress?

如有任何帮助,我们将不胜感激

仅凭您显示的代码很难判断...我们需要更多信息才能正确回答这个问题。但是,此消息似乎来自您的一个编码不正确的插件。我会禁用所有插件,然后一次启用一个,直到再次显示此消息。那将是你的错误插件。永久禁用 it/delete 它...或者联系作者要求他们修复它,如果你真的需要它。