WP_Font_Library::get_font_collection()publicWP 6.5.0

Gets a font collection.

Метод класса: WP_Font_Library{}

Хуков нет.

Возвращает

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

Использование

$WP_Font_Library = new WP_Font_Library();
$WP_Font_Library->get_font_collection( $slug );
$slug(строка) (обязательный)
Font collection slug.

Список изменений

С версии 6.5.0 Введена.

Код WP_Font_Library::get_font_collection() WP 6.7.1

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