【发布时间】:2009-08-29 07:19:04
【问题描述】:
我正在使用由 Scott Wallick 创建的 WordPress 博客主题。 Here 是他的网站。仅供参考,我使用的是“Barthelme”主题。
无论如何,这个主题打印出日期如下:2009年8月5日显示为“2009 08 05”。我想将显示更改为以下格式:2009 年 8 月 5 日。
我该怎么做?
我在 WordPress 代码中找到了下面的函数。我可以以某种方式更改下面的代码以使其按照我上面的要求进行吗?如果是这样,我应该进行哪些更改?
function barthelme_date_classes($t, &$c, $p = '') {
$t = $t + (get_option('gmt_offset') * 3600);
$c[] = $p . 'y' . gmdate('Y', $t);
$c[] = $p . 'm' . gmdate('m', $t);
$c[] = $p . 'd' . gmdate('d', $t);
$c[] = $p . 'h' . gmdate('h', $t);
}
【问题讨论】: