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:
parent
6c10cda818
commit
0358e2f4b8
|
@ -26,12 +26,10 @@ final class WP_Site {
|
||||||
* A numeric string, for compatibility reasons.
|
* A numeric string, for compatibility reasons.
|
||||||
*
|
*
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
* @since 4.6.0 Converted from public to private to explicitly enable more intuitive
|
* @access public
|
||||||
* access via magic methods.
|
|
||||||
* @access private
|
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $blog_id;
|
public $blog_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Domain of the site.
|
* Domain of the site.
|
||||||
|
@ -60,12 +58,10 @@ final class WP_Site {
|
||||||
* A numeric string, for compatibility reasons.
|
* A numeric string, for compatibility reasons.
|
||||||
*
|
*
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
* @since 4.6.0 Converted from public to private to explicitly enable more intuitive
|
* @access public
|
||||||
* access via magic methods.
|
|
||||||
* @access private
|
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $site_id = '0';
|
public $site_id = '0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The date on which the site was created or registered.
|
* The date on which the site was created or registered.
|
||||||
|
@ -234,10 +230,6 @@ final class WP_Site {
|
||||||
switch ( $key ) {
|
switch ( $key ) {
|
||||||
case 'id':
|
case 'id':
|
||||||
return (int) $this->blog_id;
|
return (int) $this->blog_id;
|
||||||
case 'blog_id':
|
|
||||||
return $this->blog_id;
|
|
||||||
case 'site_id':
|
|
||||||
return $this->site_id;
|
|
||||||
case 'network_id':
|
case 'network_id':
|
||||||
return (int) $this->site_id;
|
return (int) $this->site_id;
|
||||||
case 'blogname':
|
case 'blogname':
|
||||||
|
@ -269,8 +261,6 @@ final class WP_Site {
|
||||||
public function __isset( $key ) {
|
public function __isset( $key ) {
|
||||||
switch ( $key ) {
|
switch ( $key ) {
|
||||||
case 'id':
|
case 'id':
|
||||||
case 'blog_id':
|
|
||||||
case 'site_id':
|
|
||||||
case 'network_id':
|
case 'network_id':
|
||||||
return true;
|
return true;
|
||||||
case 'blogname':
|
case 'blogname':
|
||||||
|
@ -300,10 +290,8 @@ final class WP_Site {
|
||||||
public function __set( $key, $value ) {
|
public function __set( $key, $value ) {
|
||||||
switch ( $key ) {
|
switch ( $key ) {
|
||||||
case 'id':
|
case 'id':
|
||||||
case 'blog_id':
|
|
||||||
$this->blog_id = (string) $value;
|
$this->blog_id = (string) $value;
|
||||||
break;
|
break;
|
||||||
case 'site_id':
|
|
||||||
case 'network_id':
|
case 'network_id':
|
||||||
$this->site_id = (string) $value;
|
$this->site_id = (string) $value;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue