diff --git a/wp-includes/class-wp-locale.php b/wp-includes/class-wp-locale.php index 87af36a2a4..a78617b5e3 100644 --- a/wp-includes/class-wp-locale.php +++ b/wp-includes/class-wp-locale.php @@ -336,6 +336,26 @@ class WP_Locale { return $this->month_abbrev[ $month_name ]; } + /** + * Retrieves translated version of month genitive string. + * + * The $month_number parameter has to be a string + * because it must have the '0' in front of any number + * that is less than 10. Starts from '01' and ends at + * '12'. + * + * You can use an integer instead and it will add the + * '0' before the numbers less than 10 for you. + * + * @since 6.8.0 + * + * @param string|int $month_number '01' through '12'. + * @return string Translated genitive month name. + */ + public function get_month_genitive( $month_number ) { + return $this->month_genitive[ zeroise( $month_number, 2 ) ]; + } + /** * Retrieves translated version of meridiem string. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 7c413fafab..a115eeaa39 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59493'; +$wp_version = '6.8-alpha-59494'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.