WordPress at a glance
function is not described

WP_Block_Pattern_Categories_Registry::unregister() public WP 5.5.0

Unregisters a pattern category.

{} It's a method of the class: WP_Block_Pattern_Categories_Registry{}

No Hooks.

Return

true/false. True if the pattern was unregistered with success and false otherwise.

Usage

$WP_Block_Pattern_Categories_Registry = new WP_Block_Pattern_Categories_Registry();
$WP_Block_Pattern_Categories_Registry->unregister( $category_name );
$category_name(string) (required)
Pattern name including namespace.

Changelog

Since 5.5.0 Introduced.

Code of WP_Block_Pattern_Categories_Registry::unregister() WP 5.5.1

<?php
public function unregister( $category_name ) {
	if ( ! $this->is_registered( $category_name ) ) {
		/* translators: 1: Block pattern name. */
		$message = sprintf( __( 'Block pattern category "%1$s" not found.' ), $category_name );
		_doing_it_wrong( __METHOD__, $message, '5.5.0' );
		return false;
	}

	unset( $this->registered_categories[ $category_name ] );

	return true;
}