From c2dcaa35b374be6cedb47836dc05efa7b057c7f9 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Tue, 18 Dec 2018 11:08:45 +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. See #45528. Props dimadin. Built from https://develop.svn.wordpress.org/branches/5.0@44288 git-svn-id: http://core.svn.wordpress.org/branches/5.0@44118 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 5 +---- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 3df4898869..37cb0b980f 100644 --- a/wp-includes/l10n.php +++ b/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; diff --git a/wp-includes/version.php b/wp-includes/version.php index bdc6dcad63..057e9e3a38 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0.2-RC1-44287'; +$wp_version = '5.0.2-RC1-44288'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.