WordPress at Your Fingertips
function is not described

add_site_meta() WP 5.1.0

Adds metadata to a site.

No Hooks.


Int|false. Meta ID on success, false on failure.


add_site_meta( $site_id, $meta_key, $meta_value, $unique );
$site_id(int) (required)
Site ID.
$meta_key(string) (required)
Metadata name.
$meta_value(mixed) (required)
Metadata value. Must be serializable if non-scalar.
Whether the same key should not be added.
Default: false


Since 5.1.0 Introduced.

Code of add_site_meta() WP 5.8

function add_site_meta( $site_id, $meta_key, $meta_value, $unique = false ) {
	return add_metadata( 'blog', $site_id, $meta_key, $meta_value, $unique );