WP_Customize_Date_Time_Control::get_month_choices(): array
- Since
- 4.9.0
- Source
wp-includes/customize/class-wp-customize-date-time-control.php:227
Generate options for the month Select.
Description
Based on touch_time().
Return
array
Uses · 1
- __()Retrieves the translation of $text.
Used by · 1
- WP_Customize_Date_Time_Control::content_template()Renders a JS template for the content of date time control.
Source
public function get_month_choices() { global $wp_locale; $months = array(); for ( $i = 1; $i < 13; $i++ ) { $month_text = $wp_locale->get_month_abbrev( $wp_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, ); }History
Introduced in 4.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, from
src/wp-includes/customize/class-wp-customize-date-time-control.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.