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. Built from https://develop.svn.wordpress.org/trunk@31033 git-svn-id: http://core.svn.wordpress.org/trunk@31014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
650a6d1062
commit
b39c37ff89
|
@ -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
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31032';
|
||||
$wp_version = '4.2-alpha-31033';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue