wp_add_inline_style ( $handle, $data )

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


Adds extra CSS styles to a registered stylesheet.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.

Related Functions

wp_maybe_inline_styles, wp_add_inline_script, wp_ajax_inline_save, wp_ajax_inline_save_tax, wp_print_styles

Top Google Results

User discussions

wpseek mobile