WordPress:Template Tags/the weekday date

来自站长百科
Fludlen讨论 | 贡献2008年7月2日 (三) 15:18的版本
跳转至: 导航、​ 搜索

模板:Deprecated

Description


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.


描述

Displays the weekday of the current post (e.g. Friday) only if it is different from the weekday of the previous post. This tag must be used within WordPress:The Loop.

当当前文章与前一篇文章不是在同一天发表的时候,显示当前文章是在星期几发表的(例如星期五)。必须在The Loop内使用这个标签。

Replace With

取代

There is one-to one correspondence with another template tag, so to replace, use the_date() as a trigger and the_time() with 'l' (lowercase letter L) as the format string, as shown in this PHP code block:

拥有另一个标签的对等标签,因此,要替换,使用the_日期()作为trigger,带有有'l'(L的小写字母)the_时间()作为格式字符串,就如这个PHP代码块中所显示的:

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

<?php if(the_date('','','', FALSE)) the_时间('l'); ?>

See WordPress:Formatting Date and Time for information on date and time format string use.

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

Usage

用法

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

%%% <?php the_星期几_日期('之前', '之后') ?> %%%

Example

例子

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

<p>文章来自 <?php the_weekday_date('<strong>', '</strong>') ?>:</p>

Parameters

参数

before
(string) Text placed before the tag's output. There is no default.
after
(string) Text placed after the tag's output. There is no default.
之前
(string) 标签内容前面的文本。没有默认设置。
之后
(string) 放在标签内容之后的文本。没有默认设置。

Related

模板:Tag Date Tags

模板:PHP Function Tag Footer

相关的

模板:标签 日期 标签