Adds metadata to a site.
Parameters
$site_id
intrequired- Site ID.
$meta_key
stringrequired- Metadata name.
$meta_value
mixedrequired- Metadata value. Must be serializable if non-scalar.
$unique
booloptional- Whether the same key should not be added.
Default:
false
Source
function add_site_meta( $site_id, $meta_key, $meta_value, $unique = false ) {
return add_metadata( 'blog', $site_id, $meta_key, $meta_value, $unique );
}
Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.