WP_Customize_Date_Time_Control::get_month_choices

Advertisement

Summery Summery

Generate options for the month Select.

Syntax Syntax

WP_Customize_Date_Time_Control::get_month_choices()

Description Description

Based on touch_time().

Return Return

(array)

Source Source

File: wp-includes/customize/class-wp-customize-date-time-control.php

	 */
	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,
		);

Advertisement

Changelog Changelog

Changelog
Version Description
4.9.0 Introduced.

See also See also

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.