wp_enqueue_block_support_styles() – Hooks inline styles in the proper place, depending on the active theme.

You appear to be a bot. Output may be restricted

Description

Hooks inline styles in the proper place, depending on the active theme.

Usage

wp_enqueue_block_support_styles( $style, $priority );

Parameters

$style
( string ) required – String containing the CSS styles to be added.
$priority
( int ) optional default: 10 – To set the priority for the add_action.

Returns

void

Source

File name: wordpress/wp-includes/script-loader.php
Lines:

1 to 13 of 13
function wp_enqueue_block_support_styles( $style, $priority = 10 ) {
  $action_hook_name = 'wp_footer';
  if ( wp_is_block_theme() ) {
    $action_hook_name = 'wp_head';
  }
  add_action(
    $action_hook_name,
    static function () use ( $style ) {
      echo "<style>$style</style>\n";
    },
    $priority
  );
}
 

 View on GitHub View on Trac