WP_Font_Library::unregister_font_collection( string $slug ): bool

In this article

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

VersionDescription
6.5.0Introduced.

User Contributed Notes

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