Uses
| Uses | Description |
|---|---|
| wp-includes/class-wp-site.php: WP_Site::get_details() | Retrieves the details for this site. |
| wp-includes/plugin.php: did_action() | Retrieve the number of times an action is fired. |
Isset-er.
Allows current multisite naming conventions when checking for properties. Checks for extended site properties.
(string) (Required) Property to check if set.
(bool) Whether the property is set.
File: wp-includes/class-wp-site.php
public function __isset( $key ) {
switch ( $key ) {
case 'id':
case 'network_id':
return true;
case 'blogname':
case 'siteurl':
case 'post_count':
case 'home':
if ( ! did_action( 'ms_loaded' ) ) {
return false;
}
return true;
default: // Custom properties added by 'site_details' filter.
if ( ! did_action( 'ms_loaded' ) ) {
return false;
}
$details = $this->get_details();
if ( isset( $details->$key ) ) {
return true;
}
}
return false;
} | Version | Description |
|---|---|
| 4.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site/__isset