On this page
wp_styles(): WP_Styles
Initialize $wp_styles if it has not been set.
Return
Source
File: wp-includes/functions.wp-styles.php. View all references
function wp_styles() {
global $wp_styles;
if ( ! ( $wp_styles instanceof WP_Styles ) ) {
$wp_styles = new WP_Styles();
}
return $wp_styles;
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Styles::__construct() wp-includes/class-wp-styles.php | Constructor. |
Used By
| Used By | Description |
|---|---|
| _wp_get_iframed_editor_assets() wp-includes/block-editor.php | Collect the block editor assets that need to be loaded into the editor’s iframe. |
| wp_maybe_inline_styles() wp-includes/script-loader.php | Allows small styles to be inlined. |
| wp_admin_css() wp-includes/general-template.php | Enqueues or directly prints a stylesheet link to the specified CSS file. |
| wp_print_styles() wp-includes/functions.wp-styles.php | Display styles that are in the $handles queue. |
| wp_add_inline_style() wp-includes/functions.wp-styles.php | Add extra CSS styles to a registered stylesheet. |
| wp_register_style() wp-includes/functions.wp-styles.php | Register a CSS stylesheet. |
| wp_deregister_style() wp-includes/functions.wp-styles.php | Remove a registered stylesheet. |
| wp_enqueue_style() wp-includes/functions.wp-styles.php | Enqueue a CSS stylesheet. |
| wp_dequeue_style() wp-includes/functions.wp-styles.php | Remove a previously enqueued CSS stylesheet. |
| wp_style_is() wp-includes/functions.wp-styles.php | Check whether a CSS stylesheet has been added to the queue. |
| wp_style_add_data() wp-includes/functions.wp-styles.php | Add metadata to a CSS stylesheet. |
| print_admin_styles() wp-includes/script-loader.php | Prints the styles queue in the HTML head on admin pages. |
Changelog
| Version | Description |
|---|---|
| 4.2.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_styles