Un motore di ricerca WordPress per sviluppatori e autori di temi



get_blog_status ›

Da3.0.0
Deprecaton/a
get_blog_status ( $id, $pref )
Parametri: (2)
  • (int) $id Blog ID.
    Richiesto:
  • (string) $pref Field name.
    Richiesto:
Ritorna:
  • (bool|string|null) $value
Definito a:
Codex:
ChangeLog:
  • MU

Get a blog details field.



Sorgenti

function get_blog_status( $id, $pref ) {
	global $wpdb;

	$details = get_site( $id );
	if ( $details ) {
		return $details->$pref;
	}

	return $wpdb->get_var( $wpdb->prepare( "SELECT %s FROM {$wpdb->blogs} WHERE blog_id = %d", $pref, $id ) );
}