Used By
| Used By | Description |
|---|---|
| wp-includes/functions.wp-styles.php: wp_add_inline_style() | Add extra CSS styles to a registered stylesheet. |
Adds extra CSS styles to a registered stylesheet.
(string) (Required) The style's registered handle.
(string) (Required) String containing the CSS styles to be added.
(bool) True on success, false on failure.
File: wp-includes/class.wp-styles.php
public function add_inline_style( $handle, $code ) {
if ( ! $code ) {
return false;
}
$after = $this->get_data( $handle, 'after' );
if ( ! $after ) {
$after = array();
}
$after[] = $code;
return $this->add_data( $handle, 'after', $after );
} | Version | Description |
|---|---|
| 3.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/WP_Styles/add_inline_style