wp_deregister_script
wp_deregister_style
wp_enqueue_script
wp_enqueue_style
wp_localize_script
wp_print_scripts
wp_print_styles
wp_register_script
wp_register_style
wp_script_is
wp_style_is
wp_deregister_script($handle)
wp_deregister_style(string $handle)
package | BackPress |
---|---|
since | r79 |
see | For additional information. |
global | object $wp_styles The WP_Styles object for printing styles. |
string
Name of the stylesheet.
wp_enqueue_script($handle, $src= false
, $deps= array()
, $ver= false
, $in_footer= false
)
Registers the script if src provided (does NOT overwrite) and enqueues.
package | BackPress |
---|---|
since | r16 |
see | For parameter information. |
wp_enqueue_style(string $handle, string|boolean $src= false
, array $deps= array()
, string|boolean $ver= false
, string $media= false
)
Registers the style if src provided (does NOT overwrite) and enqueues.
package | BackPress |
---|---|
since | r79 |
see | WP_Styles::enqueue() |
global | object $wp_styles The WP_Styles object for printing styles. |
link | List of CSS media types. |
string
Name of the stylesheet.
string
boolean
Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
array
Array of handles (names) of any stylesheet that this stylesheet depends on. (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies.
string
boolean
String specifying the stylesheet version number, if it has one. This parameter is used to ensure that the correct version is sent to the client regardless of caching, and so should be included if a version number is available and makes sense for the stylesheet.
string
The media for which this stylesheet has been defined.
wp_localize_script($handle, $object_name, $l10n)
Localizes only if script has already been added.
package | BackPress |
---|---|
since | r16 |
see |
wp_print_scripts($handles = false
)
Called by admin-header.php and by wp_head hook. Since it is called by wp_head on every page load, the function does not instantiate the WP_Scripts object unless script names are explicitly passed. Does make use of already instantiated $wp_scripts if present. Use provided wp_print_scripts hook to register/enqueue new scripts.
package | BackPress |
---|---|
since | r16 |
see |
wp_print_styles(array|boolean $handles = false
) : boolean
package | BackPress |
---|---|
since | r79 |
uses | Calls 'wp_print_styles' hook. |
global | object $wp_styles The WP_Styles object for printing styles. |
array
boolean
Styles to be printed. An empty array prints the queue, an array with one string prints that style, and an array of strings prints those styles.
boolean
True on success, false on failure.wp_register_script(string $handle, string $src, array $deps= array()
, string|boolean $ver= false
, boolean $in_footer= false
) : null
package | BackPress |
---|---|
since | r16 |
string
Script name
string
Script url
array
(optional) Array of script names on which this script depends
string
boolean
(optional) Script version (used for cache busting), set to NULL to disable
boolean
(optional) Wether to enqueue the script before or before
null
wp_register_style(string $handle, string|boolean $src, array $deps= array()
, string|boolean $ver= false
, string $media= 'all'
)
package | BackPress |
---|---|
since | r79 |
see | For additional information. |
global | object $wp_styles The WP_Styles object for printing styles. |
link | List of CSS media types. |
string
Name of the stylesheet.
string
boolean
Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
array
Array of handles of any stylesheet that this stylesheet depends on. (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies.
string
boolean
String specifying the stylesheet version number. Set to NULL to disable. Used to ensure that the correct version is sent to the client regardless of caching.
string
The media for which this stylesheet has been defined.
wp_script_is(string $handle, string $list = 'queue'
) : boolean
The values for list defaults to 'queue', which is the same as enqueue for scripts.
package | BackPress |
---|---|
since | WP unknown; BP unknown |
string
Handle used to add script.
string
Optional, defaults to 'queue'. Others values are 'registered', 'queue', 'done', 'to_do'
boolean
wp_style_is(string $handle, string $list = 'queue'
) : boolean
The values for list defaults to 'queue', which is the same as wp_enqueue_style().
package | BackPress |
---|---|
since | WP unknown; BP unknown |
global | object $wp_styles The WP_Styles object for printing styles. |
string
Name of the stylesheet.
string
Values are 'registered', 'done', 'queue' and 'to_do'.
boolean
True on success, false on failure.