wp_add_inline_style

SummerySummery

Add extra CSS styles to a registered stylesheet.

Syntax

wp_add_inline_style( string $handle, string $data )

DescriptionDescription

Styles will only be added if the stylesheet is already in the queue. Accepts a string $data containing the CSS. If two or more CSS code blocks are added to the same stylesheet $handle, they will be printed in the order they were added, i.e. the latter added styles can redeclare the previous.

ParametersParameters

$handle

(string) (Required) Name of the stylesheet to add the extra styles to.

$data

(string) (Required) String containing the CSS styles to be added.

ReturnReturn

(bool) True on success, false on failure.

SourceSource

File: wp-includes/functions.wp-styles.php


			

ChangelogChangelog

Changelog
Version Description
3.3.0 Introduced.

See alsoSee also

Scroll to Top