WP_Font_Library::get_font_collection
Gets a font collection.
Method of the class: WP_Font_Library{}
No Hooks.
Returns
WP_Font_Collection|null. Font collection object, or null if the font collection doesn't exist.
Usage
$WP_Font_Library = new WP_Font_Library(); $WP_Font_Library->get_font_collection( $slug );
- $slug(string) (required)
- Font collection slug.
Changelog
| Since 6.5.0 | Introduced. |
WP_Font_Library::get_font_collection() WP Font Library::get font collection code WP 7.0
public function get_font_collection( string $slug ) {
if ( $this->is_collection_registered( $slug ) ) {
return $this->collections[ $slug ];
}
return null;
}