delete_site_meta_by_key( string $meta_key ): bool

In this article

Deletes everything from site meta matching meta key.

Parameters

$meta_keystringrequired
Metadata key to search for when deleting.

Return

bool Whether the site meta key was deleted from the database.

Source

function delete_site_meta_by_key( $meta_key ) {
	return delete_metadata( 'blog', null, $meta_key, '', true );
}

Changelog

VersionDescription
5.1.0Introduced.

User Contributed Notes

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