Code Modernization: Remove conditional use of PHP realpath().
The `realpath()` function was introduced in PHP 4.0.0. There's no point in checking if the function exists in PHP 5.6+, in only 2 instances out of 29. Props jrf. Fixes #48075. Built from https://develop.svn.wordpress.org/trunk@46210 git-svn-id: http://core.svn.wordpress.org/trunk@46022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -491,9 +491,7 @@ final class _WP_Editors {
|
||||
$path = str_replace( content_url(), '', $plugurl );
|
||||
$path = WP_CONTENT_DIR . $path . '/langs/';
|
||||
|
||||
if ( function_exists( 'realpath' ) ) {
|
||||
$path = trailingslashit( realpath( $path ) );
|
||||
}
|
||||
$path = trailingslashit( realpath( $path ) );
|
||||
|
||||
if ( @is_file( $path . $mce_locale . '.js' ) ) {
|
||||
$strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n";
|
||||
|
||||
Reference in New Issue
Block a user