WordPress at a glance
функция не описана

get_blog_status() WP 3.0.0

Get a blog details field.

Хуков нет.

Возвращает

true/false/String/null. $value

Использование

get_blog_status( $id, $pref );
$id(int) (required)
Blog ID.
$pref(string) (required)
Field name.

Заметки

  • Global. wpdb. $wpdb WordPress database abstraction object.

Changelog

Since 3.0.0 Introduced.

Код get_blog_status() WP 5.5.1

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