WP_Navigation_Block_Renderer::get_stylesprivate staticWP 6.5.0

Get styles for the navigation block.

Method of the class: WP_Navigation_Block_Renderer{}

No Hooks.

Returns

String. Returns the styles for the navigation block.

Usage

$result = WP_Navigation_Block_Renderer::get_styles( $attributes );
$attributes(array) (required)
The block attributes.

Changelog

Since 6.5.0 Introduced.

WP_Navigation_Block_Renderer::get_styles() code WP 6.9.1

private static function get_styles( $attributes ) {
	$colors       = block_core_navigation_build_css_colors( $attributes );
	$font_sizes   = block_core_navigation_build_css_font_sizes( $attributes );
	$block_styles = isset( $attributes['styles'] ) ? $attributes['styles'] : '';
	return $block_styles . $colors['inline_styles'] . $font_sizes['inline_styles'];
}