A WordPress-centric search engine for devs and theme authors



get_blog_status ›

Since3.0.0
Deprecatedn/a
get_blog_status ( $id, $pref )
Parameters: (2)
  • (int) $id The blog id
    Required: Yes
  • (string) $pref A field name
    Required: Yes
Returns:
  • (bool|string|null) $value
Defined at:
Codex:
Change Log:
  • MU

Get a blog details field.



Source

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