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
This commit is contained in:
Sergey Biryukov 2018-12-19 00:17:25 +00:00
parent 72405a0eba
commit 7f9e87054f

View File

@ -925,14 +925,11 @@ function load_script_textdomain( $handle, $domain, $path = null ) {
return load_script_translations( $path . '/' . $handle_filename, $handle, $domain ); 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 ) ) ) { if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $wp_scripts->content_url && 0 === strpos( $src, $wp_scripts->content_url ) ) ) {
$src = $wp_scripts->base_url . $src; $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; $relative = false;
$languages_path = WP_LANG_DIR; $languages_path = WP_LANG_DIR;