wppaste
WordPress

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

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.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 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.