wp/wp-includes/class-wp-locale.php
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
--- a/wp/wp-includes/class-wp-locale.php	Mon Oct 14 18:06:33 2019 +0200
+++ b/wp/wp-includes/class-wp-locale.php	Mon Oct 14 18:28:13 2019 +0200
@@ -44,14 +44,6 @@
 	public $weekday_abbrev;
 
 	/**
-	 * Stores the default start of the week.
-	 *
-	 * @since 4.4.0
-	 * @var string
-	 */
-	public $start_of_week;
-
-	/**
 	 * Stores the translated strings for the full month names.
 	 *
 	 * @since 2.1.0
@@ -123,16 +115,17 @@
 	 * @since 2.1.0
 	 *
 	 * @global string $text_direction
+	 * @global string $wp_version
 	 */
 	public function init() {
 		// The Weekdays
-		$this->weekday[0] = /* translators: weekday */ __('Sunday');
-		$this->weekday[1] = /* translators: weekday */ __('Monday');
-		$this->weekday[2] = /* translators: weekday */ __('Tuesday');
-		$this->weekday[3] = /* translators: weekday */ __('Wednesday');
-		$this->weekday[4] = /* translators: weekday */ __('Thursday');
-		$this->weekday[5] = /* translators: weekday */ __('Friday');
-		$this->weekday[6] = /* translators: weekday */ __('Saturday');
+		$this->weekday[0] = /* translators: weekday */ __( 'Sunday' );
+		$this->weekday[1] = /* translators: weekday */ __( 'Monday' );
+		$this->weekday[2] = /* translators: weekday */ __( 'Tuesday' );
+		$this->weekday[3] = /* translators: weekday */ __( 'Wednesday' );
+		$this->weekday[4] = /* translators: weekday */ __( 'Thursday' );
+		$this->weekday[5] = /* translators: weekday */ __( 'Friday' );
+		$this->weekday[6] = /* translators: weekday */ __( 'Saturday' );
 
 		// The first letter of each day.
 		$this->weekday_initial[ __( 'Sunday' ) ]    = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Sunday initial' );
@@ -144,13 +137,13 @@
 		$this->weekday_initial[ __( 'Saturday' ) ]  = /* translators: one-letter abbreviation of the weekday */ _x( 'S', 'Saturday initial' );
 
 		// Abbreviations for each day.
-		$this->weekday_abbrev[__('Sunday')]    = /* translators: three-letter abbreviation of the weekday */ __('Sun');
-		$this->weekday_abbrev[__('Monday')]    = /* translators: three-letter abbreviation of the weekday */ __('Mon');
-		$this->weekday_abbrev[__('Tuesday')]   = /* translators: three-letter abbreviation of the weekday */ __('Tue');
-		$this->weekday_abbrev[__('Wednesday')] = /* translators: three-letter abbreviation of the weekday */ __('Wed');
-		$this->weekday_abbrev[__('Thursday')]  = /* translators: three-letter abbreviation of the weekday */ __('Thu');
-		$this->weekday_abbrev[__('Friday')]    = /* translators: three-letter abbreviation of the weekday */ __('Fri');
-		$this->weekday_abbrev[__('Saturday')]  = /* translators: three-letter abbreviation of the weekday */ __('Sat');
+		$this->weekday_abbrev[ __( 'Sunday' ) ]    = /* translators: three-letter abbreviation of the weekday */ __( 'Sun' );
+		$this->weekday_abbrev[ __( 'Monday' ) ]    = /* translators: three-letter abbreviation of the weekday */ __( 'Mon' );
+		$this->weekday_abbrev[ __( 'Tuesday' ) ]   = /* translators: three-letter abbreviation of the weekday */ __( 'Tue' );
+		$this->weekday_abbrev[ __( 'Wednesday' ) ] = /* translators: three-letter abbreviation of the weekday */ __( 'Wed' );
+		$this->weekday_abbrev[ __( 'Thursday' ) ]  = /* translators: three-letter abbreviation of the weekday */ __( 'Thu' );
+		$this->weekday_abbrev[ __( 'Friday' ) ]    = /* translators: three-letter abbreviation of the weekday */ __( 'Fri' );
+		$this->weekday_abbrev[ __( 'Saturday' ) ]  = /* translators: three-letter abbreviation of the weekday */ __( 'Sat' );
 
 		// The Months
 		$this->month['01'] = /* translators: month name */ __( 'January' );
@@ -195,10 +188,10 @@
 		$this->month_abbrev[ __( 'December' ) ]  = /* translators: three-letter abbreviation of the month */ _x( 'Dec', 'December abbreviation' );
 
 		// The Meridiems
-		$this->meridiem['am'] = __('am');
-		$this->meridiem['pm'] = __('pm');
-		$this->meridiem['AM'] = __('AM');
-		$this->meridiem['PM'] = __('PM');
+		$this->meridiem['am'] = __( 'am' );
+		$this->meridiem['pm'] = __( 'pm' );
+		$this->meridiem['AM'] = __( 'AM' );
+		$this->meridiem['PM'] = __( 'PM' );
 
 		// Numbers formatting
 		// See https://secure.php.net/number_format
@@ -222,13 +215,15 @@
 		$this->number_format['decimal_point'] = ( 'number_format_decimal_point' === $decimal_point ) ? '.' : $decimal_point;
 
 		// Set text direction.
-		if ( isset( $GLOBALS['text_direction'] ) )
+		if ( isset( $GLOBALS['text_direction'] ) ) {
 			$this->text_direction = $GLOBALS['text_direction'];
-		/* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
-		elseif ( 'rtl' == _x( 'ltr', 'text direction' ) )
+
+			/* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
+		} elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) {
 			$this->text_direction = 'rtl';
+		}
 
-		if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) {
+		if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) {
 			$this->text_direction = 'ltr';
 			add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) );
 		}
@@ -253,11 +248,11 @@
 	 *
 	 * @since 2.1.0
 	 *
-	 * @param int $weekday_number 0 for Sunday through 6 Saturday
-	 * @return string Full translated weekday
+	 * @param int $weekday_number 0 for Sunday through 6 Saturday.
+	 * @return string Full translated weekday.
 	 */
-	public function get_weekday($weekday_number) {
-		return $this->weekday[$weekday_number];
+	public function get_weekday( $weekday_number ) {
+		return $this->weekday[ $weekday_number ];
 	}
 
 	/**
@@ -270,11 +265,11 @@
 	 *
 	 * @since 2.1.0
 	 *
-	 * @param string $weekday_name
-	 * @return string
+	 * @param string $weekday_name Full translated weekday word.
+	 * @return string Translated weekday initial.
 	 */
-	public function get_weekday_initial($weekday_name) {
-		return $this->weekday_initial[$weekday_name];
+	public function get_weekday_initial( $weekday_name ) {
+		return $this->weekday_initial[ $weekday_name ];
 	}
 
 	/**
@@ -285,11 +280,11 @@
 	 *
 	 * @since 2.1.0
 	 *
-	 * @param string $weekday_name Full translated weekday word
-	 * @return string Translated weekday abbreviation
+	 * @param string $weekday_name Full translated weekday word.
+	 * @return string Translated weekday abbreviation.
 	 */
-	public function get_weekday_abbrev($weekday_name) {
-		return $this->weekday_abbrev[$weekday_name];
+	public function get_weekday_abbrev( $weekday_name ) {
+		return $this->weekday_abbrev[ $weekday_name ];
 	}
 
 	/**
@@ -305,11 +300,11 @@
 	 *
 	 * @since 2.1.0
 	 *
-	 * @param string|int $month_number '01' through '12'
-	 * @return string Translated full month name
+	 * @param string|int $month_number '01' through '12'.
+	 * @return string Translated full month name.
 	 */
-	public function get_month($month_number) {
-		return $this->month[zeroise($month_number, 2)];
+	public function get_month( $month_number ) {
+		return $this->month[ zeroise( $month_number, 2 ) ];
 	}
 
 	/**
@@ -320,11 +315,11 @@
 	 *
 	 * @since 2.1.0
 	 *
-	 * @param string $month_name Translated month to get abbreviated version
-	 * @return string Translated abbreviated month
+	 * @param string $month_name Translated month to get abbreviated version.
+	 * @return string Translated abbreviated month.
 	 */
-	public function get_month_abbrev($month_name) {
-		return $this->month_abbrev[$month_name];
+	public function get_month_abbrev( $month_name ) {
+		return $this->month_abbrev[ $month_name ];
 	}
 
 	/**
@@ -337,8 +332,8 @@
 	 * @param string $meridiem Either 'am', 'pm', 'AM', or 'PM'. Not translated version.
 	 * @return string Translated version
 	 */
-	public function get_meridiem($meridiem) {
-		return $this->meridiem[$meridiem];
+	public function get_meridiem( $meridiem ) {
+		return $this->meridiem[ $meridiem ];
 	}
 
 	/**