get_blog_status()
最后更新于:2021-11-26 06:30:16
get_blog_status( int$id, string$pref)Get a blog details field.
参数
- $id
-
(int) (Required) Blog ID.
- $pref
-
(string) (Required) Field name.
响应
(bool|string|null) $value
源文件
文件: gc-includes/ms-blogs.php
function get_blog_status( $id, $pref ) {
global $gcdb;
$details = get_site( $id );
if ( $details ) {
return $details->$pref;
}
return $gcdb->get_var( $gcdb->prepare( "SELECT %s FROM {$gcdb->blogs} WHERE blog_id = %d", $pref, $id ) );
}