WordPress:Template Tags/the weekday date

来自站长百科
Xxf3325讨论 | 贡献2008年7月12日 (六) 17:26的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航、​ 搜索

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_date()作为trigger,带有'l'(L的小写字母)the_time()作为格式字符串,就如这个PHP代码块中所显示的:

<?php if(the_date('','','', FALSE)) the_time('l'); ?>

请看看日期和时间格式关于格式字符串使用的日期和时间的信息。

用法[ ]

%%% <?php the_weekday_date('before', 'after') ?> %%%

例子[ ]

<p>Posts from <?php the_weekday_date('<strong>', '</strong>') ?>:</p>

参数[ ]

before
(string) 标签内容前面的文本。没有默认设置。
after
(string) 放在标签内容之后的文本。没有默认设置。

相关的[ ]

模板:标签 日期 标签