Retrieves metadata for a site.
Parameters
$site_id
intrequired- Site ID.
$key
stringoptional- The meta key to retrieve. By default, returns data for all keys.
Default:
''
$single
booloptional- Whether to return a single value.
This parameter has no effect if$key
is not specified.
Default:
false
Source
function get_site_meta( $site_id, $key = '', $single = false ) {
return get_metadata( 'blog', $site_id, $key, $single );
}
Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |
It should probably be noted that this function is only available on multisite blogs.