WP_Font_Library::get_font_collection( string $slug ): WP_Font_Collection|null

In this article

Gets a font collection.

Parameters

$slugstringrequired
Font collection slug.

Return

WP_Font_Collection|null Font collection object, or null if the font collection doesn’t exist.

Source

public function get_font_collection( string $slug ) {
	if ( $this->is_collection_registered( $slug ) ) {
		return $this->collections[ $slug ];
	}
	return null;
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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