From 5db95f22d08119c44f83e593d8d8b8245d74c60f Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 3 Jan 2015 05:12:56 +0000 Subject: [PATCH] After [31030]: if a `callable` is passed as the 3rd arg to `wp_localize_script()/WP_Scripts->localize()`, pass `$handle` and `$object_name` to the user func when invoking it. Props jtsternberg. Fixes #26111. git-svn-id: https://develop.svn.wordpress.org/trunk@31033 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class.wp-scripts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class.wp-scripts.php b/src/wp-includes/class.wp-scripts.php index 05cde56170..97c49d30dc 100644 --- a/src/wp-includes/class.wp-scripts.php +++ b/src/wp-includes/class.wp-scripts.php @@ -178,7 +178,7 @@ class WP_Scripts extends WP_Dependencies { $handle = 'jquery-core'; if ( is_callable( $l10n ) ) { - $l10n = call_user_func( $l10n ); + $l10n = call_user_func( $l10n, $handle, $object_name ); } if ( is_array($l10n) && isset($l10n['l10n_print_after']) ) { // back compat, preserve the code in 'l10n_print_after' if present