Retrieves metadata for a site.
Parameters
$site_idintrequired- Site ID.
$keystringoptional- The meta key to retrieve. By default, returns data for all keys.
Default:
'' $singlebooloptional- Whether to return a single value.
This parameter has no effect if$keyis 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.