WordPress开发者和主题制作者的搜索引擎



get_site_meta ›

Since5.1.0
已弃用n/a
get_site_meta ( $site_id, $key = '', $single = false )
参数: (3)
  • (int) $site_id Site ID.
    Required: Yes
  • (string) $key Optional. The meta key to retrieve. By default, returns data for all keys. Default empty.
    Required: No
    默认: (empty)
  • (bool) $single Optional. Whether to return a single value. Default false.
    Required: No
    默认: false
返回:
  • (mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
定义在:
文档:

Retrieves metadata for a site.



源码

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