wp_add_inline_style


wp_add_inline_style ( $handle, $data )

Parameters:
  • (string) $handle Name of the stylesheet to add the extra styles to.
  • (string) $data String containing the CSS styles to be added.
See:
  • WP_Styles::add_inline_style()
Returns:
  • (bool) True on success, false on failure.
Defined at:

Description

Add extra CSS styles to a registered stylesheet.

Styles will only be added if the stylesheet in 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.

Related Functions

wp_add_inline_script, wp_ajax_inline_save, wp_ajax_inline_save_tax, wp_print_styles, print_admin_styles

Top Google Results

User discussions

wpseek mobile