WP_Font_Library::is_collection_registeredprivateWP 6.5.0

Checks if a font collection is registered.

Method of the class: WP_Font_Library{}

No Hooks.

Returns

true|false. True if the font collection is registered and false otherwise.

Usage

// private - for code of main (parent) class only
$result = $this->is_collection_registered( $slug );
$slug(string) (required)
Font collection slug.

Changelog

Since 6.5.0 Introduced.

WP_Font_Library::is_collection_registered() code WP 6.8.1

private function is_collection_registered( string $slug ) {
	return array_key_exists( $slug, $this->collections );
}