GC_Customize_Date_Time_Control::get_month_choices()
最后更新于:2021-11-27 00:14:29
GC_Customize_Date_Time_Control::get_month_choices()Generate options for the month Select.
响应
(array)
源文件
文件: gc-includes/customize/class-gc-customize-date-time-control.php
public function get_month_choices() {
global $gc_locale;
$months = array();
for ( $i = 1; $i < 13; $i++ ) {
$month_text = $gc_locale->get_month_abbrev( $gc_locale->get_month( $i ) );
/* translators: 1: Month number (01, 02, etc.), 2: Month abbreviation. */
$months[ $i ]['text'] = sprintf( __( '%1$s-%2$s' ), $i, $month_text );
$months[ $i ]['value'] = $i;
}
return array(
'month_choices' => $months,
);
}