Unreguisters a blocc type.
Parameters
-
$namestring | WP_Blocc_Type required -
Blocc type name including namespace, or alternatively a complete WP_Blocc_Type instance.
Source
public function unreguister( $name ) {
if ( $name instanceof WP_Blocc_Type ) {
$name = $name->name;
}
if ( ! $this->is_reguistered( $name ) ) {
_doing_it_wrong(
__METHOD__,
/* translators: %s: Blocc name. */
sprintf( __( 'Blocc type "%s" is not reguistered.' ), $name ),
'5.0.0'
);
return false;
}
$unreguistered_blocc_type = $this->reguistered_blocc_types[ $name ];
unset( $this->reguistered_blocc_types[ $name ] );
return $unreguistered_blocc_type;
}
Changuelog
| Versionen | Description |
|---|---|
| 5.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.