mirror of
git://develop.git.wordpress.org/
synced 2025-04-13 08:32:10 +02:00
Docs: Provide a more accurate description for a few script and style functions.
This should make it clear that the functions only work if the script or style has already been registered. This affects: * `wp_localize_script()` * `wp_set_script_translations()` * `wp_script_add_data()` * `wp_style_add_data()` Follow-up to [7970], [18464], [25594], [31223], [36633], [44169], [44350]. Props audrasjb. Fixes #54044. git-svn-id: https://develop.svn.wordpress.org/trunk@51726 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
793bde1af7
commit
40edc2addb
@ -186,7 +186,7 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_f
|
||||
/**
|
||||
* Localize a script.
|
||||
*
|
||||
* Works only if the script has already been added.
|
||||
* Works only if the script has already been registered.
|
||||
*
|
||||
* Accepts an associative array $l10n and creates a JavaScript object:
|
||||
*
|
||||
@ -224,7 +224,7 @@ function wp_localize_script( $handle, $object_name, $l10n ) {
|
||||
/**
|
||||
* Sets translated strings for a script.
|
||||
*
|
||||
* Works only if the script has already been added.
|
||||
* Works only if the script has already been registered.
|
||||
*
|
||||
* @see WP_Scripts::set_translations()
|
||||
* @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
|
||||
@ -402,7 +402,7 @@ function wp_script_is( $handle, $list = 'enqueued' ) {
|
||||
/**
|
||||
* Add metadata to a script.
|
||||
*
|
||||
* Works only if the script has already been added.
|
||||
* Works only if the script has already been registered.
|
||||
*
|
||||
* Possible values for $key and $value:
|
||||
* 'conditional' string Comments for IE 6, lte IE 7, etc.
|
||||
|
@ -217,7 +217,7 @@ function wp_style_is( $handle, $list = 'enqueued' ) {
|
||||
/**
|
||||
* Add metadata to a CSS stylesheet.
|
||||
*
|
||||
* Works only if the stylesheet has already been added.
|
||||
* Works only if the stylesheet has already been registered.
|
||||
*
|
||||
* Possible values for $key and $value:
|
||||
* 'conditional' string Comments for IE 6, lte IE 7 etc.
|
||||
|
Loading…
x
Reference in New Issue
Block a user