W3cubDocs

/WordPress

WP_Font_Library::is_collection_registered( string $slug ): bool

Checks if a font collection is registered.

Parameters

$slugstringrequired
Font collection slug.

Return

bool True if the font collection is registered and false otherwise.

Source

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

Changelog

Version Description
6.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_font_library/is_collection_registered