Unregisters a pattern category.
Parameters
$category_name
stringrequired- Pattern category name including namespace.
Source
public function unregister( $category_name ) {
if ( ! $this->is_registered( $category_name ) ) {
_doing_it_wrong(
__METHOD__,
/* translators: %s: Block pattern name. */
sprintf( __( 'Block pattern category "%s" not found.' ), $category_name ),
'5.5.0'
);
return false;
}
unset( $this->registered_categories[ $category_name ] );
unset( $this->registered_categories_outside_init[ $category_name ] );
return true;
}
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.