Revert [28840]; wp_localize_script() must be called on a registered handle.

see #24724.


git-svn-id: https://develop.svn.wordpress.org/trunk@29677 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-09-02 19:34:42 +00:00
parent cb298d8341
commit 9c82e2854e
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,8 @@ function wp_localize_script( $handle, $object_name, $l10n ) {
if ( ! did_action( 'init' ) )
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
'<code>wp_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );
$wp_scripts = new WP_Scripts();
return false;
}
return $wp_scripts->localize( $handle, $object_name, $l10n );