wpseek.com
A WordPress-centric search engine for devs and theme authors



get_blog_status › WordPress Function

Since
Deprecatedn/a
get_blog_status ( $id, $pref )
Parameters: (2)
  • (int) $id Blog ID.
    Required: Yes
  • (string) $pref Field name.
    Required: Yes
Returns:
  • (bool|string|null) $value
Defined at:
Codex:
Change Log:
  • MU

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