Make WordPress Core


Ignore:
Timestamp:
08/26/2016 10:19:26 AM (8 years ago)
Author:
wonderboymusic
Message:

i18n: move is_rtl() to l10n.php (which loads way earlier). Load WP_Locale file in wp-settings.php. Retire wp-includes/locale.php - it only loaded the class and the one function, is_rtl(). If someone loaded this file for fun somewhere else, it would be a fatal error.

See #37827.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/l10n.php

    r38360 r38364  
    11331133    return $output;
    11341134}
     1135
     1136/**
     1137 * Checks if current locale is RTL.
     1138 *
     1139 * @since 3.0.0
     1140 *
     1141 * @global WP_Locale $wp_locale
     1142 *
     1143 * @return bool Whether locale is RTL.
     1144 */
     1145function is_rtl() {
     1146    global $wp_locale;
     1147    return $wp_locale->is_rtl();
     1148}
Note: See TracChangeset for help on using the changeset viewer.