summaryrefslogtreecommitdiffstats
path: root/wp-includes/functions.wp-scripts.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-19 12:16:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-19 12:16:54 +0000
commitc790e928a86aaeed6bae63d80c583554ce8e3b7c (patch)
tree41a9fd929e2e1c6c833c00b8be762b68053e77f4 /wp-includes/functions.wp-scripts.php
parentAdding upstream version 6.5.2+dfsg1. (diff)
downloadwordpress-c790e928a86aaeed6bae63d80c583554ce8e3b7c.tar.xz
wordpress-c790e928a86aaeed6bae63d80c583554ce8e3b7c.zip
Adding upstream version 6.5.3+dfsg1.upstream/6.5.3+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wp-includes/functions.wp-scripts.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/wp-includes/functions.wp-scripts.php b/wp-includes/functions.wp-scripts.php
index 1207502..de13496 100644
--- a/wp-includes/functions.wp-scripts.php
+++ b/wp-includes/functions.wp-scripts.php
@@ -211,7 +211,6 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $args
*
* @see WP_Scripts::localize()
* @link https://core.trac.wordpress.org/ticket/11520
- * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
*
* @since 2.2.0
*
@@ -224,12 +223,7 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $args
* @return bool True if the script was successfully localized, false otherwise.
*/
function wp_localize_script( $handle, $object_name, $l10n ) {
- global $wp_scripts;
-
- if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
- _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
- return false;
- }
+ $wp_scripts = wp_scripts();
return $wp_scripts->localize( $handle, $object_name, $l10n );
}