Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



get_site_meta ›

Seit5.0.0
Veraltetn/v
get_site_meta ( $site_id, $key = '', $single = false )
Parameter: (3)
  • (int) $site_id Site ID.
    Erforderlich: Ja
  • (string) $key Optional. The meta key to retrieve. By default, returns data for all keys. Default empty.
    Erforderlich: Nein
    Standard: (leer)
  • (bool) $single Optional. Whether to return a single value. Default false.
    Erforderlich: Nein
    Standard: false
Gibt zurück:
  • (mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
Definiert in:
Codex:

Retrieves metadata for a site.



Quellcode

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