L10n: Use an absolute path for the is_dir() check when looking for installed translations.

Avoids warnings when `open_basedir` restrictions are in effect.

Props Profforg.
Fixes #34526.

git-svn-id: https://develop.svn.wordpress.org/trunk@35856 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-12-10 23:08:46 +00:00
parent 56dc5b5b30
commit ab584ff499

View File

@ -891,7 +891,7 @@ function wp_get_installed_translations( $type ) {
$language_data = array();
foreach ( $files as $file ) {
if ( '.' === $file[0] || is_dir( $file ) ) {
if ( '.' === $file[0] || is_dir( WP_LANG_DIR . "$dir/$file" ) ) {
continue;
}
if ( substr( $file, -3 ) !== '.po' ) {