X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/ff81ee6e8304a1982a3ec4f5b134764a29d502cf..607b7e02d77e7326161e8ec15639052d2040f745:/wp-includes/locale.php diff --git a/wp-includes/locale.php b/wp-includes/locale.php index 7af4deac..b8ad4637 100644 --- a/wp-includes/locale.php +++ b/wp-includes/locale.php @@ -1,70 +1,25 @@ $weekday_initial_) { - $weekday_initial[$weekday_] = preg_replace('/_.+_initial$/', '', $weekday_initial_); +/** + * Locale API + * + * @package WordPress + * @subpackage i18n + * @since 1.2.0 + */ + +/** WP_Locale class */ +require_once ABSPATH . WPINC . '/class-wp-locale.php'; + +/** + * Checks if current locale is RTL. + * + * @since 3.0.0 + * + * @global WP_Locale $wp_locale + * + * @return bool Whether locale is RTL. + */ +function is_rtl() { + global $wp_locale; + return $wp_locale->is_rtl(); } - -// Abbreviations for each day. -$weekday_abbrev[__('Sunday')] = __('Sun'); -$weekday_abbrev[__('Monday')] = __('Mon'); -$weekday_abbrev[__('Tuesday')] = __('Tue'); -$weekday_abbrev[__('Wednesday')] = __('Wed'); -$weekday_abbrev[__('Thursday')] = __('Thu'); -$weekday_abbrev[__('Friday')] = __('Fri'); -$weekday_abbrev[__('Saturday')] = __('Sat'); - -// The Months -$month['01'] = __('January'); -$month['02'] = __('February'); -$month['03'] = __('March'); -$month['04'] = __('April'); -$month['05'] = __('May'); -$month['06'] = __('June'); -$month['07'] = __('July'); -$month['08'] = __('August'); -$month['09'] = __('September'); -$month['10'] = __('October'); -$month['11'] = __('November'); -$month['12'] = __('December'); - -// Abbreviations for each month. Uses the same hack as above to get around the -// 'May' duplication. -$month_abbrev[__('January')] = __('Jan_January_abbreviation'); -$month_abbrev[__('February')] = __('Feb_February_abbreviation'); -$month_abbrev[__('March')] = __('Mar_March_abbreviation'); -$month_abbrev[__('April')] = __('Apr_April_abbreviation'); -$month_abbrev[__('May')] = __('May_May_abbreviation'); -$month_abbrev[__('June')] = __('Jun_June_abbreviation'); -$month_abbrev[__('July')] = __('Jul_July_abbreviation'); -$month_abbrev[__('August')] = __('Aug_August_abbreviation'); -$month_abbrev[__('September')] = __('Sep_September_abbreviation'); -$month_abbrev[__('October')] = __('Oct_October_abbreviation'); -$month_abbrev[__('November')] = __('Nov_November_abbreviation'); -$month_abbrev[__('December')] = __('Dec_December_abbreviation'); - -foreach ($month_abbrev as $month_ => $month_abbrev_) { - $month_abbrev[$month_] = preg_replace('/_.+_abbreviation$/', '', $month_abbrev_); -} - -?> \ No newline at end of file