add_site_meta

SummerySummery

Adds metadata to a site.

Syntax

add_site_meta( int $site_id, string $meta_key, mixed $meta_value, bool $unique = false )

ParametersParameters

$site_id

(int) (Required) Site ID.

$meta_key

(string) (Required) Metadata name.

$meta_value

(mixed) (Required) Metadata value. Must be serializable if non-scalar.

$unique

(bool) (Optional) Whether the same key should not be added.

Default value: false

ReturnReturn

(int|false) Meta ID on success, false on failure.

SourceSource

File: wp-includes/ms-site.php


			

ChangelogChangelog

Changelog
Version Description
5.1.0 Introduced.
Scroll to Top