WordPress 月表示の変更
iPhone OS 4.0が発表されましたが
意表を突いてWordpressネタ。
日本語版のWPだと、月表示のタグで
the_time(‘M’);
としても、設定で変えようが何しようが4月なら「4月」 となってしまう。
4月なら Apr と表示したかったのでちょいと修正。
wp-includes/locale.php 155行目付近(ver2.9のlocale.phpの場合)
$this->month_abbrev[__(‘January’)] = __(‘Jan_January_abbreviation’);
$this->month_abbrev[__(‘February’)] = __(‘Feb_February_abbreviation’);
$this->month_abbrev[__(‘March’)] = __(‘Mar_March_abbreviation’);
$this->month_abbrev[__(‘April’)] = __(‘Apr_April_abbreviation’);
$this->month_abbrev[__(‘May’)] = __(‘May_May_abbreviation’);
$this->month_abbrev[__(‘June’)] = __(‘Jun_June_abbreviation’);
$this->month_abbrev[__(‘July’)] = __(‘Jul_July_abbreviation’);
$this->month_abbrev[__(‘August’)] = __(‘Aug_August_abbreviation’);
$this->month_abbrev[__(‘September’)] = __(‘Sep_September_abbreviation’);
$this->month_abbrev[__(‘October’)] = __(‘Oct_October_abbreviation’);
$this->month_abbrev[__(‘November’)] = __(‘Nov_November_abbreviation’);
$this->month_abbrev[__(‘December’)] = __(‘Dec_December_abbreviation’);
を
$this->month_abbrev[__(‘January’)] = __(‘Jan’);
$this->month_abbrev[__(‘February’)] = __(‘Feb’);
$this->month_abbrev[__(‘March’)] = __(‘Mar’);
$this->month_abbrev[__(‘April’)] = __(‘Apr’);
$this->month_abbrev[__(‘May’)] = __(‘May’);
$this->month_abbrev[__(‘June’)] = __(‘Jun’);
$this->month_abbrev[__(‘July’)] = __(‘Jul’);
$this->month_abbrev[__(‘August’)] = __(‘Aug’);
$this->month_abbrev[__(‘September’)] = __(‘Sep’);
$this->month_abbrev[__(‘October’)] = __(‘Oct’);
$this->month_abbrev[__(‘November’)] = __(‘Nov’);
$this->month_abbrev[__(‘December’)] = __(‘Dec’);
に変更。
以上覚え書き。
意表を突いてWordpressネタ。
日本語版のWPだと、月表示のタグで
the_time(‘M’);
としても、設定で変えようが何しようが4月なら「4月」 となってしまう。
4月なら Apr と表示したかったのでちょいと修正。
wp-includes/locale.php 155行目付近(ver2.9のlocale.phpの場合)
$this->month_abbrev[__(‘January’)] = __(‘Jan_January_abbreviation’);
$this->month_abbrev[__(‘February’)] = __(‘Feb_February_abbreviation’);
$this->month_abbrev[__(‘March’)] = __(‘Mar_March_abbreviation’);
$this->month_abbrev[__(‘April’)] = __(‘Apr_April_abbreviation’);
$this->month_abbrev[__(‘May’)] = __(‘May_May_abbreviation’);
$this->month_abbrev[__(‘June’)] = __(‘Jun_June_abbreviation’);
$this->month_abbrev[__(‘July’)] = __(‘Jul_July_abbreviation’);
$this->month_abbrev[__(‘August’)] = __(‘Aug_August_abbreviation’);
$this->month_abbrev[__(‘September’)] = __(‘Sep_September_abbreviation’);
$this->month_abbrev[__(‘October’)] = __(‘Oct_October_abbreviation’);
$this->month_abbrev[__(‘November’)] = __(‘Nov_November_abbreviation’);
$this->month_abbrev[__(‘December’)] = __(‘Dec_December_abbreviation’);
を
$this->month_abbrev[__(‘January’)] = __(‘Jan’);
$this->month_abbrev[__(‘February’)] = __(‘Feb’);
$this->month_abbrev[__(‘March’)] = __(‘Mar’);
$this->month_abbrev[__(‘April’)] = __(‘Apr’);
$this->month_abbrev[__(‘May’)] = __(‘May’);
$this->month_abbrev[__(‘June’)] = __(‘Jun’);
$this->month_abbrev[__(‘July’)] = __(‘Jul’);
$this->month_abbrev[__(‘August’)] = __(‘Aug’);
$this->month_abbrev[__(‘September’)] = __(‘Sep’);
$this->month_abbrev[__(‘October’)] = __(‘Oct’);
$this->month_abbrev[__(‘November’)] = __(‘Nov’);
$this->month_abbrev[__(‘December’)] = __(‘Dec’);
に変更。
以上覚え書き。