Load: Re-add locale.php.

`locale.php` is occasionally included directly by custom external code, so should continue to be available. This behaviour is deprecated.

Partial revert of [38364].
See #37827, #39027.



git-svn-id: https://develop.svn.wordpress.org/trunk@39455 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2016-12-03 04:06:15 +00:00
parent d7d48f6372
commit 7e2009642a
2 changed files with 28 additions and 1 deletions

View File

@ -708,7 +708,7 @@ $_old_files = array(
// 4.7
// Don't delete, yet: 'wp-admin/includes/class-wp-upgrader-skins.php',
// Don't delete, yet: 'wp-includes/class-feed.php',
'wp-includes/locale.php',
// Don't delete, yet: 'wp-includes/locale.php',
// Don't delete, yet: 'wp-includes/session.php',
'wp-includes/customize/class-wp-customize-themes-panel.php', // Removed in beta; when the feature comes back remember to remove it from this array. See #37661.
);

View File

@ -0,0 +1,27 @@
<?php
/**
* Locale API
*
* @package WordPress
* @subpackage i18n
* @since 1.2.0
*/
_deprecated_file( basename( __FILE__ ), '4.7.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();
}