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

(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

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.