Skip to content
Permalink
Browse files

i18n: Remove the `script_loader_src` filter from `load_script_textdom…

…ain()`.

This filter is superfluous here, the `load_script_textdomain_relative_path` should be used for customising the textdomain path.

See #45528.
Props dimadin.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@44288 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
pento committed Dec 18, 2018
1 parent 6163135 commit 0f5de39c563f47889a17418b5ba5feaad7b9d818
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/wp-includes/l10n.php
@@ -901,14 +901,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;

0 comments on commit 0f5de39

Please sign in to comment.
You can’t perform that action at this time.