diff --git a/wp-includes/class-wp-site.php b/wp-includes/class-wp-site.php index c16f498e90..4bca299ef3 100644 --- a/wp-includes/class-wp-site.php +++ b/wp-includes/class-wp-site.php @@ -240,11 +240,15 @@ final class WP_Site { case 'siteurl': case 'post_count': case 'home': + default: // Custom properties added by 'site_details' filter. if ( ! did_action( 'ms_loaded' ) ) { return null; } + $details = $this->get_details(); - return $details->$key; + if ( isset( $details->$key ) ) { + return $details->$key; + } } return null; @@ -275,6 +279,15 @@ final class WP_Site { 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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 298b94d37e..85933eab86 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40477'; +$wp_version = '4.8-alpha-40478'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.