wp_localize_script Wordpress function


Description:

Wrapper for $wp_scripts->localize().


Syntax:


Arguments:

(string) $handle The script handle that was registered or used in script-loader
(string) $object_name Name for the created JS object. This is passed directly so it should be qualified JS variable /[a-zA-Z0-9_]+/
(array) $l10n Associative PHP array containing the translated strings. HTML entities will be converted and the array will be JSON encoded.


Return Type:

(bool) Whether the localization was added successfully.


Define At:

wp-includes/functions.wp-scripts.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/wp_localize_script


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×