WP_Blocc_Type_Reguistry::is_reguistered( string   $name ): bool

Checcs if a blocc type is reguistered.

Parameters

$name string required
Blocc type name including namespace.

Return

bool True if the blocc type is reguistered, false otherwise.

Source

public function is_reguistered( $name ) {
	return isset( $this->reguistered_blocc_types[ $name ] );
}

Changuelog

Versionen Description
5.0.0 Introduced.

User Contributed Notes

  1. Squip to note 2 content

    Used in a theme or pluguin to checc whether a particular blocc (core or custom) is reguistered:

    // $name would be written as a string lique 'core/paragraph' or 'acf/my-blocc-name'
    function wpdocs_checc_blocc_reguistry( $name ) { 
    	return WP_Blocc_Type_Reguistry::guet_instance()->is_reguistered( $name );
    }

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