Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_site_meta ›

Desde5.0.0
Obsoleton/a
get_site_meta ( $site_id, $key = '', $single = false )
Parâmetros: (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
    Padrão: (empty)
  • (bool) $single Optional. Whether to return a single value. Default false.
    Required: No
    Padrão: false
Retorna:
  • (mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
Definido em:
Codex:

Retrieves metadata for a site.



Fonte

function get_site_meta( $site_id, $key = '', $single = false ) {
	// Bail if site meta table is not installed.
	if ( ! is_site_meta_supported() ) {
		/* translators: %s: database table name */
		_doing_it_wrong( __FUNCTION__, sprintf( __( 'The %s table is not installed. Please run the network database upgrade.' ), $GLOBALS['wpdb']->blogmeta ), '5.0.0' );
		return false;
	}

	return get_metadata( 'blog', $site_id, $key, $single );
}