From 7f9e87054fa6a0e07040aac32c53f7e167e50477 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 19 Dec 2018 00:17:25 +0000 Subject: [PATCH] i18n: Remove the `script_loader_src` filter from `load_script_textdomain()`. This filter is superfluous here, the `load_script_textdomain_relative_path` should be used for customising the textdomain path. Props dimadin. Merges [44288] to trunk. See #45528. git-svn-id: https://develop.svn.wordpress.org/trunk@44318 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/l10n.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index b7d9d24af0..7dd86607ec 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -925,14 +925,11 @@ function load_script_textdomain( $handle, $domain, $path = null ) { return load_script_translations( $path . '/' . $handle_filename, $handle, $domain ); } - $obj = $wp_scripts->registered[ $handle ]; + $src = $wp_scripts->registered[ $handle ]->src; - $src = $obj->src; if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $wp_scripts->content_url && 0 === strpos( $src, $wp_scripts->content_url ) ) ) { $src = $wp_scripts->base_url . $src; } - /** This filter is documented in wp-includes/class.wp-scripts.php */ - $src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) ); $relative = false; $languages_path = WP_LANG_DIR;