WP_Block_Styles_Registry::is_registered( string $block_name, string $block_style_name )

Checks if a block style is registered.


Parameters Parameters

$block_name

(string) (Required) Block type name including namespace.

$block_style_name

(string) (Required) Block style name.


Top ↑

Return Return

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



Top ↑

Source Source

File: wp-includes/class-wp-block-styles-registry.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
5.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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