Unregisters a block bindings source.
Parameters
$source_name
stringrequired- Block bindings source name including namespace.
Source
public function unregister( string $source_name ) {
if ( ! $this->is_registered( $source_name ) ) {
_doing_it_wrong(
__METHOD__,
/* translators: %s: Block bindings source name. */
sprintf( __( 'Block binding "%s" not found.' ), $source_name ),
'6.5.0'
);
return false;
}
$unregistered_source = $this->sources[ $source_name ];
unset( $this->sources[ $source_name ] );
return $unregistered_source;
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.