add_site_meta

Advertisement

Summery Summery

Adds metadata to a site.

Syntax Syntax

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

Parameters Parameters

$site_id

(Required) Site ID.

$meta_key

(Required) Metadata name.

$meta_value

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

$unique

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

Default value: false

Return Return

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

Source Source

File: wp-includes/ms-site.php

 * @param int    $site_id    Site ID.
 * @param string $meta_key   Metadata name.
 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.

Advertisement

Changelog Changelog

Changelog
Version Description
5.1.0 Introduced.

Advertisement

Leave a Reply