W3cubDocs

/WordPress

WP_Font_Library::unregister_font_collection( string $slug ): bool

Unregisters a previously registered font collection.

Parameters

$slugstringrequired
Font collection slug.

Return

bool True if the font collection was unregistered successfully and false otherwise.

Source

public function unregister_font_collection( string $slug ) {
	if ( ! $this->is_collection_registered( $slug ) ) {
		_doing_it_wrong(
			__METHOD__,
			/* translators: %s: Font collection slug. */
			sprintf( __( 'Font collection "%s" not found.' ), $slug ),
			'6.5.0'
		);
		return false;
	}
	unset( $this->collections[ $slug ] );
	return true;
}

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/unregister_font_collection