WordPress at a glance

get_site_meta() WP 1.0

Retrieves metadata for a site.

No Hooks.

Return

Mixed. Will be an array if $single is false. Will be value of meta data field if $single is true.

Usage

get_site_meta( $site_id, $key, $single );
$site_id(int) (required)
Site ID.
$key(string)
The meta key to retrieve. By default, returns data for all keys.
Default: ''
$single(true/false)
Whether to return a single value.
Default: false

Changelog

Since 5.1.0 Introduced.

Code of get site meta: wp-includes/ms-site.php WP 5.2.2

<?php
function get_site_meta( $site_id, $key = '', $single = false ) {
	return get_metadata( 'blog', $site_id, $key, $single );
}

Related Functions

From tag: Metadatas (any)

More from category: Multisite

No comments
    Hello, !     Log In . Register