WordPress:Function Reference/wpautop
来自站长百科
Description
描述
Changes double line-breaks in the text into HTML paragraphs (<p>...</p>).
将文本中的两个行分隔符转变为HTML段落(<p>...</p>)。
Wordpress uses it to filter the content and the excerpt.
WordPress使用这个来filterthe content 和the excerpt。
Usage
用法
%%% <?php wpautop( $pee, $br = 1 ); ?> %%%
%%% <?php wpautop( $pee, $br = 1 ); ?> %%%
Parameters
参数
- pee
- (string) The text to be formatted.
- pee
- (string) 需要安排格式的文本。
- br
- (boolean) Preserve line breaks. When set to true, any line breaks remaining after paragraph conversion are converted to HTML <br />. Line breaks within script and style sections are not affected. Default true.
- br
- (boolean)保存行分隔符。当设置为正确的,在段落转换为HTML时候,任何行分隔符仍然存在。script 和style部分的行分隔符不受影响。默认为正确的。
>> It this is accurate, then why ohhhhh why are so many folk in so many places talking about <br /> being stripped? Docs out of step w/reality ... not a good sign. << --bentrem 05:09, 27 December 2007 (UTC)
>>如果真实正确的,那么为什么ohhhhh为什么这麽多地方这麽多人谈论<br />被去除了?Docs out of step w/reality...不是个好的征兆。<< --bentrem 2007年12月27日,05:09 (UTC)
References
参考
http://photomatt.net/scripts/autop/ http://photomatt.net/scripts/autop/