Un motore di ricerca WordPress per sviluppatori e autori di temi



get_site_meta ›

Da5.0.0
Deprecaton/a
get_site_meta ( $site_id, $key = '', $single = false )
Parametri: (3)
  • (int) $site_id Site ID.
    Richiesto:
  • (string) $key Optional. The meta key to retrieve. By default, returns data for all keys. Default empty.
    Richiesto: No
    Default: (vuoto)
  • (bool) $single Optional. Whether to return a single value. Default false.
    Richiesto: No
    Default: false
Ritorna:
  • (mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
Definito a:
Codex:

Retrieves metadata for a site.



Sorgenti

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 );
}