0
我一直在嘗試連續3天沒有運氣,使檔案小部件顯示在其縮略形式包含在locale.php 到目前爲止,我是這件作品的代碼,其中的月份名稱在一般的template.php來源:在WordPress的月份縮寫檔案部件
if ($arcresults) {
$afterafter = $after;
foreach ((array) $arcresults as $arcresult) {
$url = get_month_link($arcresult->year, $arcresult->month);
/* translators: 1: month name, 2: 4-digit year */
$text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year);
if ($show_post_count)
$after = ' ('.$arcresult->posts.')' . $afterafter;
$output .= get_archives_link($url, $text, $format, $before, $after);
}
我確實發現在日曆組件發起的縮寫個月相同的文件。但隨着我有限的知識,我一直沒能適應它的檔案:
if ($previous) {
$calendar_output .= "\n\t\t".'<td colspan="3" id="prev"><a href="' . get_month_link($previous->year, $previous->month) . '" title="' . esc_attr(sprintf(__('View posts for %1$s %2$s'), $wp_locale->get_month($previous->month), date('Y', mktime(0, 0 , 0, $previous->month, 1, $previous->year)))) . '">« ' . $wp_locale->get_month_abbrev($wp_locale->get_month($previous->month)) . '</a></td>';
} else {
$calendar_output .= "\n\t\t".'<td colspan="3" id="prev" class="pad"> </td>';
}
任何人都可以請給我一些提示或幫助我用get_month_abbrev功能在檔案工作?
在此先感謝!