WordPress: Template Tags/the weekday:修订间差异
来自站长百科
(新页面: {{Deprecated}} == Description == Displays the day of the week (e.g. Friday). This tag must be used within WordPress:The Loop. == Replace With == To replace this tag, use [[WordPres...) |
无编辑摘要 |
||
(未显示另一用户的1个中间版本) | |||
第1行: | 第1行: | ||
{{取消的}} | |||
== 描述 == | |||
显示星期几(例如,星期五)。必须在[[WordPress:The Loop|The Loop]]内使用这个标签。 | |||
== 取代 == | |||
要取代这个标签,请使用[[WordPress:Template_Tags/the_time|the_time()]],用<tt>'l'</tt>作为格式字符串: | |||
<?php the_time('l'); ?> | <?php the_time('l'); ?> | ||
请看看[[WordPress:Formatting Date and Time|日期和时间格式]]关于日期和时间字符串的使用的信息。 | |||
== | == 用法 == | ||
%%% <?php the_weekday() ?> %%% | %%% <?php the_weekday() ?> %%% | ||
== | == 例子 == | ||
<p>This was posted on a <?php the_weekday() ?>.</p> | <p>This was posted on a <?php the_weekday() ?>.</p> | ||
== | == 参数== | ||
这个标签不接受任何参数。 | |||
== | == 相关的 == | ||
{{ | {{标签 日期标签}} | ||
{{ | {{没有 Param 标签 页底文字}} |
2008年7月12日 (六) 17:14的最新版本
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists.
描述[ ]
显示星期几(例如,星期五)。必须在The Loop内使用这个标签。
取代[ ]
要取代这个标签,请使用the_time(),用'l'作为格式字符串:
<?php the_time('l'); ?>
请看看日期和时间格式关于日期和时间字符串的使用的信息。
用法[ ]
%%% <?php the_weekday() ?> %%%
例子[ ]
<p>This was posted on a <?php the_weekday() ?>.</p>
参数[ ]
这个标签不接受任何参数。