Multisite: Revert property type changes in `WP_Site`.

Partial revert of [37657]. Moving existing properties in `WP_Site` from public to private broke backwards compatibility in a pretty severe way. We made an initial attempt to work around this, but due to the variety of possible issues, moving forward does not seem wise.

Fixes #36717.

Built from https://develop.svn.wordpress.org/trunk@37923


git-svn-id: http://core.svn.wordpress.org/trunk@37864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2016-06-29 22:08:28 +00:00
parent 6c10cda818
commit 0358e2f4b8
2 changed files with 5 additions and 17 deletions

View File

@ -26,12 +26,10 @@ final class WP_Site {
* A numeric string, for compatibility reasons.
*
* @since 4.5.0
* @since 4.6.0 Converted from public to private to explicitly enable more intuitive
* access via magic methods.
* @access private
* @access public
* @var string
*/
private $blog_id;
public $blog_id;
/**
* Domain of the site.
@ -60,12 +58,10 @@ final class WP_Site {
* A numeric string, for compatibility reasons.
*
* @since 4.5.0
* @since 4.6.0 Converted from public to private to explicitly enable more intuitive
* access via magic methods.
* @access private
* @access public
* @var string
*/
private $site_id = '0';
public $site_id = '0';
/**
* The date on which the site was created or registered.
@ -234,10 +230,6 @@ final class WP_Site {
switch ( $key ) {
case 'id':
return (int) $this->blog_id;
case 'blog_id':
return $this->blog_id;
case 'site_id':
return $this->site_id;
case 'network_id':
return (int) $this->site_id;
case 'blogname':
@ -269,8 +261,6 @@ final class WP_Site {
public function __isset( $key ) {
switch ( $key ) {
case 'id':
case 'blog_id':
case 'site_id':
case 'network_id':
return true;
case 'blogname':
@ -300,10 +290,8 @@ final class WP_Site {
public function __set( $key, $value ) {
switch ( $key ) {
case 'id':
case 'blog_id':
$this->blog_id = (string) $value;
break;
case 'site_id':
case 'network_id':
$this->site_id = (string) $value;
break;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37922';
$wp_version = '4.6-alpha-37923';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.