Ressurect WP_Scripts::localize() and fix public function names, fixes #11520

git-svn-id: https://develop.svn.wordpress.org/trunk@19217 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2011-11-08 18:05:59 +00:00
parent 3db76467e8
commit 8e37911c0c
4 changed files with 94 additions and 86 deletions

View File

@@ -138,8 +138,8 @@ PubSub.prototype.publish = function( topic, args ) {
return;
// Settings can be added or changed by defining "wp_fullscreen_settings" JS object.
// This can be done by defining it as PHP array and passing it to JS with:
// add_script_data( 'wp-fullscreen', 'wp_fullscreen_settings', $settings_array )
// This can be done by defining it as PHP associative array, json encoding it and passing it to JS with:
// wp_add_script_before( 'wp-fullscreen', 'wp_fullscreen_settings = ' . $json_encoded_array . ';' );
if ( typeof(wp_fullscreen_settings) == 'object' )
$.extend( s, wp_fullscreen_settings );