WordPress: Function Reference/wpautop:修订间差异
来自站长百科
(新页面: == Description == Changes double line-breaks in the text into HTML paragraphs (<tt><nowiki><p>...</p></nowiki></tt>). Wordpress uses it to filter [[WordPress:Template_Tags/the_content|t...) |
无编辑摘要 |
||
(未显示另一用户的1个中间版本) | |||
第1行: | 第1行: | ||
== | == 描述== | ||
将文本中的两个行分隔符转变为HTML段落(<tt><nowiki><p>...</p></nowiki></tt>)。 | |||
WordPress使用这个来filter[[WordPress:Template_Tags/the_content|the content]] 和[[WordPress:Template_Tags/the_excerpt|the excerpt]]。 | |||
== | == 用法 == | ||
%%% <?php wpautop( $pee, $br = 1 ); ?> %%% | %%% <?php wpautop( $pee, $br = 1 ); ?> %%% | ||
== | == 参数 == | ||
; <var>pee</var> : (string) 需要安排格式的文本。 | |||
; <var> | ; <var>br</var> : (boolean)保存行分隔符。当设置为正确的,在段落转换为HTML时候,任何行分隔符仍然存在。<tt>script</tt> 和<tt>style</tt>部分的行分隔符不受影响。默认为<var>true</var>。 | ||
>>如果真实正确的,那么为什么ohhhhh为什么这麽多地方这麽多人谈论<tt><nowiki><br /></nowiki></tt>被去除了?Docs out of step w/reality...不是个好的征兆。<< --[[WordPress:User:Bentrem|bentrem]] 2007年12月27日,05:09 (UTC) | |||
== 参考 == | |||
http://photomatt.net/scripts/autop/ | http://photomatt.net/scripts/autop/ |
2008年7月28日 (一) 09:50的最新版本
描述[ ]
将文本中的两个行分隔符转变为HTML段落(<p>...</p>)。
WordPress使用这个来filterthe content 和the excerpt。
用法[ ]
%%% <?php wpautop( $pee, $br = 1 ); ?> %%%
参数[ ]
- pee
- (string) 需要安排格式的文本。
- br
- (boolean)保存行分隔符。当设置为正确的,在段落转换为HTML时候,任何行分隔符仍然存在。script 和style部分的行分隔符不受影响。默认为true。
>>如果真实正确的,那么为什么ohhhhh为什么这麽多地方这麽多人谈论<br />被去除了?Docs out of step w/reality...不是个好的征兆。<< --bentrem 2007年12月27日,05:09 (UTC)