In `Walker`:
* Every subclass of `Walker` overrides `$db_fields` and makes it public * `wp_list_comments()` accesses `->max_pages` on an instance of `Walker`, it must be public * `$has_children` was added as `protected` in 4.0. doesn't need BC Make `$db_fields` and `$max_pages` public and remove magic methods. See #30891. Built from https://develop.svn.wordpress.org/trunk@31137 git-svn-id: http://core.svn.wordpress.org/trunk@31118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eab3aa7802
commit
b962499be6
|
@ -25,19 +25,17 @@ class Walker {
|
||||||
* DB fields to use.
|
* DB fields to use.
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @access protected
|
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $db_fields;
|
public $db_fields;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Max number of pages walked by the paged walker
|
* Max number of pages walked by the paged walker
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
* @access protected
|
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $max_pages = 1;
|
public $max_pages = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the current element has children or not.
|
* Whether the current element has children or not.
|
||||||
|
@ -50,58 +48,6 @@ class Walker {
|
||||||
*/
|
*/
|
||||||
protected $has_children;
|
protected $has_children;
|
||||||
|
|
||||||
/**
|
|
||||||
* Make private properties readable for backwards compatibility.
|
|
||||||
*
|
|
||||||
* @since 4.0.0
|
|
||||||
* @access public
|
|
||||||
*
|
|
||||||
* @param string $name Property to get.
|
|
||||||
* @return mixed Property.
|
|
||||||
*/
|
|
||||||
public function __get( $name ) {
|
|
||||||
return $this->$name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make private properties settable for backwards compatibility.
|
|
||||||
*
|
|
||||||
* @since 4.0.0
|
|
||||||
* @access public
|
|
||||||
*
|
|
||||||
* @param string $name Property to set.
|
|
||||||
* @param mixed $value Property value.
|
|
||||||
* @return mixed Newly-set property.
|
|
||||||
*/
|
|
||||||
public function __set( $name, $value ) {
|
|
||||||
return $this->$name = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make private properties checkable for backwards compatibility.
|
|
||||||
*
|
|
||||||
* @since 4.0.0
|
|
||||||
* @access public
|
|
||||||
*
|
|
||||||
* @param string $name Property to check if set.
|
|
||||||
* @return bool Whether the property is set.
|
|
||||||
*/
|
|
||||||
public function __isset( $name ) {
|
|
||||||
return isset( $this->$name );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Make private properties un-settable for backwards compatibility.
|
|
||||||
*
|
|
||||||
* @since 4.0.0
|
|
||||||
* @access public
|
|
||||||
*
|
|
||||||
* @param string $name Property to unset.
|
|
||||||
*/
|
|
||||||
public function __unset( $name ) {
|
|
||||||
unset( $this->$name );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the list before the elements are added.
|
* Starts the list before the elements are added.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-alpha-31136';
|
$wp_version = '4.2-alpha-31137';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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