wppaste
WordPress

WP_Styles

Since
2.6.0
Source
wp-includes/class-wp-styles.php:18
Core class used to register styles.

Compatibility

WordPress
since 2.6.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 5

Every hook that fires from inside WP_Styles, in the order it appears in the class, grouped by the method that fires it.

Properties · 10

$base_urlstring|nullpublic
Base URL for styles.
$content_urlstring|nullpublic
URL of the content directory.
$default_versionstring|nullpublic
Default version string for stylesheets.
$text_directionstringpublic
The current text direction.
$concatstringpublic
Holds a list of style handles which will be concatenated.
$concat_versionstringpublic
Holds a string which contains style handles and their version.
$do_concatboolpublic
Whether to perform concatenation.
$print_htmlstringpublic
Holds HTML markup of styles and additional data if concatenation is enabled.
$print_codestringpublic
Holds inline styles if concatenation is enabled.
$default_dirsstring[]|nullpublic
List of default directories.

Methods · 11

Source code

class WP_Styles extends WP_Dependencies {	/**	 * Base URL for styles.	 *	 * Full URL with trailing slash.	 *	 * @since 2.6.0	 * @see wp_default_styles()	 * @var string|null	 */	public $base_url; 	/**	 * URL of the content directory.	 *	 * @since 2.8.0	 * @see wp_default_styles()	 * @var string|null	 */	public $content_url; 	/**	 * Default version string for stylesheets.	 *	 * @since 2.6.0	 * @see wp_default_styles()	 * @var string|null	 */	public $default_version; 	/**	 * The current text direction.	 *	 * @since 2.6.0	 * @see wp_default_styles()	 * @var string	 */	public $text_direction = 'ltr'; 	/**	 * Holds a list of style handles which will be concatenated.	 *	 * @since 2.8.0	 * @var string	 */	public $concat = ''; 	/**	 * Holds a string which contains style handles and their version.	 *	 * @since 2.8.0	 * @deprecated 3.4.0	 * @var string	 */	public $concat_version = ''; 	/**	 * Whether to perform concatenation.	 *	 * @since 2.8.0	 * @var bool	 */	public $do_concat = false; 	/**	 * Holds HTML markup of styles and additional data if concatenation	 * is enabled.	 *	 * @since 2.8.0	 * @var string	 */	public $print_html = ''; 	/**	 * Holds inline styles if concatenation is enabled.	 *	 * @since 3.3.0	 * @var string	 */	public $print_code = '';

Changelog

Introduced in 2.6.0. 2 changes between 6.7.7 and 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

6.9.7
Method add_data() added.verified against source
6.9.7
Method get_dependency_warning_message() added.verified against source
2.6.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/class-wp-styles.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.