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.
Built from https://develop.svn.wordpress.org/trunk@44318


git-svn-id: http://core.svn.wordpress.org/trunk@44148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-12-19 03:34:44 +00:00
parent c2c5d30410
commit 11c11199d9
2 changed files with 2 additions and 5 deletions

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;

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.1-alpha-44317'; $wp_version = '5.1-alpha-44318';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.