WP_Locale::get_month_abbrev() WordPress Method

The WP_Locale::get_month_abbrev() method is used to get the abbreviated month for a given month number. This is useful for date/time displays where space is limited, such as in the sidebar of a WordPress site.

WP_Locale::get_month_abbrev( string $month_name ) #

Retrieves translated version of month abbreviation string.


Description

The $month_name parameter is expected to be the translated or translatable version of the month.


Top ↑

Parameters

$month_name

(string)(Required)Translated month to get abbreviated version.


Top ↑

Return

(string) Translated abbreviated month.


Top ↑

Source

File: wp-includes/class-wp-locale.php

	public function get_month_abbrev( $month_name ) {
		return $this->month_abbrev[ $month_name ];
	}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.