Functions

Remove a registered script.

wp_deregister_script($handle) 
package BackPress
since r16
see For parameter information.

Parameters

$handle

Remove a registered CSS file.

wp_deregister_style(string $handle) 
package BackPress
since r79
see For additional information.
global object $wp_styles The WP_Styles object for printing styles.

Parameters

$handle

string

Name of the stylesheet.

Enqueues script.

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.

Parameters

$handle

$src

$deps

$ver

$in_footer

Enqueue a CSS style file.

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.

Parameters

$handle

string

Name of the stylesheet.

$src

stringboolean

Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.

$deps

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.

$ver

stringboolean

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.

$media

string

The media for which this stylesheet has been defined.

Localizes a script.

wp_localize_script($handle, $object_name, $l10n) 

Localizes only if script has already been added.

package BackPress
since r16
see

Parameters

$handle

$object_name

$l10n

Prints script tags in document head.

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

Parameters

$handles

Display styles that are in the queue or part of $handles.

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.

Parameters

$handles

arrayboolean

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.

Returns

booleanTrue on success, false on failure.

Register new JavaScript file.

wp_register_script(string $handle, string $src, array $deps = array(), string|boolean $ver = false, boolean $in_footer = false) : null
package BackPress
since r16

Parameters

$handle

string

Script name

$src

string

Script url

$deps

array

(optional) Array of script names on which this script depends

$ver

stringboolean

(optional) Script version (used for cache busting), set to NULL to disable

$in_footer

boolean

(optional) Wether to enqueue the script before or before

Returns

null

Register CSS style file.

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.

Parameters

$handle

string

Name of the stylesheet.

$src

stringboolean

Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.

$deps

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.

$ver

stringboolean

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.

$media

string

The media for which this stylesheet has been defined.

Check whether script has been added to WordPress Scripts.

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

Parameters

$handle

string

Handle used to add script.

$list

string

Optional, defaults to 'queue'. Others values are 'registered', 'queue', 'done', 'to_do'

Returns

boolean

Check whether style has been added to WordPress Styles.

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.

Parameters

$handle

string

Name of the stylesheet.

$list

string

Values are 'registered', 'done', 'queue' and 'to_do'.

Returns

booleanTrue on success, false on failure.

Classes, interfaces, and traits

BP_Options_Interface

Interface for BP_Options;

« More »

BP_Transients_Interface

Interface for BP_Transients;

« More »

BP_Log

Provides easy and abstracted logging facilities

« More »

BP_SQL_Schema_Parser

Parses SQL schema statements for comparison to real table structures

« More »

WP_Dependencies

BackPress enqueued dependiences class.

« More »

WP_Scripts

BackPress Scripts enqueue class.

« More »

WP_Styles

BackPress Styles enqueue class.

« More »

_WP_Dependency

« More »

Classes, interfaces, and traits

BP_User

BackPress User class.

« More »