Uses
Uses | Description |
---|---|
wp-includes/formatting.php: esc_attr() | Escaping for HTML attributes. |
Prints extra CSS styles of a registered stylesheet.
(string) (Required) The style's registered handle.
(bool) (Optional) Whether to echo the inline style instead of just returning it.
Default value: true
(string|bool) False if no data exists, inline styles if $echo
is true, true otherwise.
File: wp-includes/class.wp-styles.php
public function print_inline_style( $handle, $echo = true ) { $output = $this->get_data( $handle, 'after' ); if ( empty( $output ) ) { return false; } $output = implode( "\n", $output ); if ( ! $echo ) { return $output; } printf( "<style id='%s-inline-css'%s>\n%s\n</style>\n", esc_attr( $handle ), $this->type_attr, $output ); return true; }
Version | Description |
---|---|
3.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_styles/print_inline_style