WP_Block_Styles_Registry::is_registered( string|null $block_name, string|null $block_style_name ): bool

In this article

Checks if a block style is registered for the given block type.

Parameters

$block_namestring|nullrequired
Block type name including namespace.
$block_style_namestring|nullrequired
Block style name.

Return

bool True if the block style is registered, false otherwise.

Source

public function is_registered( $block_name, $block_style_name ) {
	return isset( $block_name, $block_style_name, $this->registered_block_styles[ $block_name ][ $block_style_name ] );
}

Changelog

VersionDescription
5.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.