Add missing access modifiers to methods/members in Walker and subclasses. Add a magic __get() method.

See #27881, #22234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2014-05-19 06:00:15 +00:00
parent df8a090193
commit dfa4de15fa
5 changed files with 47 additions and 36 deletions

View File

@@ -1226,7 +1226,7 @@ class Walker_Page extends Walker {
* @since 2.1.0
* @var string
*/
var $tree_type = 'page';
public $tree_type = 'page';
/**
* @see Walker::$db_fields
@@ -1234,7 +1234,7 @@ class Walker_Page extends Walker {
* @todo Decouple this.
* @var array
*/
var $db_fields = array ('parent' => 'post_parent', 'id' => 'ID');
public $db_fields = array ('parent' => 'post_parent', 'id' => 'ID');
/**
* @see Walker::start_lvl()
@@ -1244,7 +1244,7 @@ class Walker_Page extends Walker {
* @param int $depth Depth of page. Used for padding.
* @param array $args
*/
function start_lvl( &$output, $depth = 0, $args = array() ) {
public function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<ul class='children'>\n";
}
@@ -1257,7 +1257,7 @@ class Walker_Page extends Walker {
* @param int $depth Depth of page. Used for padding.
* @param array $args
*/
function end_lvl( &$output, $depth = 0, $args = array() ) {
public function end_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "$indent</ul>\n";
}
@@ -1272,7 +1272,7 @@ class Walker_Page extends Walker {
* @param int $current_page Page ID.
* @param array $args
*/
function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) {
public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) {
if ( $depth ) {
$indent = str_repeat( "\t", $depth );
} else {
@@ -1353,7 +1353,7 @@ class Walker_Page extends Walker {
* @param int $depth Depth of page. Not Used.
* @param array $args
*/
function end_el( &$output, $page, $depth = 0, $args = array() ) {
public function end_el( &$output, $page, $depth = 0, $args = array() ) {
$output .= "</li>\n";
}
@@ -1371,7 +1371,7 @@ class Walker_PageDropdown extends Walker {
* @since 2.1.0
* @var string
*/
var $tree_type = 'page';
public $tree_type = 'page';
/**
* @see Walker::$db_fields
@@ -1379,7 +1379,7 @@ class Walker_PageDropdown extends Walker {
* @todo Decouple this
* @var array
*/
var $db_fields = array ('parent' => 'post_parent', 'id' => 'ID');
public $db_fields = array ('parent' => 'post_parent', 'id' => 'ID');
/**
* @see Walker::start_el()
@@ -1391,7 +1391,7 @@ class Walker_PageDropdown extends Walker {
* @param array $args Uses 'selected' argument for selected page to set selected HTML attribute for option element.
* @param int $id
*/
function start_el( &$output, $page, $depth = 0, $args = array(), $id = 0 ) {
public function start_el( &$output, $page, $depth = 0, $args = array(), $id = 0 ) {
$pad = str_repeat('&nbsp;', $depth * 3);
$output .= "\t<option class=\"level-$depth\" value=\"$page->ID\"";