get_blog_status( int $id, string $pref )

Get a blog details field.


Description Description


Parameters Parameters

$id

(int) (Required) Blog ID.

$pref

(string) (Required) Field name.


Top ↑

Return Return

(bool|string|null) $value


Top ↑

Source Source

File: wp-includes/ms-blogs.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
MU (3.0.0) Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.