Changeset 28514
- Timestamp:
- 05/19/2014 05:59:07 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r28500 r28514 22 22 */ 23 23 class Walker_Category_Checklist extends Walker { 24 var$tree_type = 'category';25 var$db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this24 public $tree_type = 'category'; 25 public $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this 26 26 27 27 /** -
trunk/src/wp-includes/class-wp-walker.php
r28322 r28514 20 20 * @access public 21 21 */ 22 var$tree_type;22 public $tree_type; 23 23 24 24 /** … … 29 29 * @access protected 30 30 */ 31 var$db_fields;31 protected $db_fields; 32 32 33 33 /** … … 38 38 * @access protected 39 39 */ 40 var $max_pages = 1; 40 protected $max_pages = 1; 41 42 /** 43 * Make private properties readable for backwards compatibility 44 * 45 * @since 4.0.0 46 * @param string $name 47 * @return mixed 48 */ 49 public function __get( $name ) { 50 return $this->$name; 51 } 41 52 42 53 /** … … 53 64 * @param array $args An array of additional arguments. 54 65 */ 55 function start_lvl( &$output, $depth = 0, $args = array() ) {}66 public function start_lvl( &$output, $depth = 0, $args = array() ) {} 56 67 57 68 /** … … 68 79 * @param array $args An array of additional arguments. 69 80 */ 70 function end_lvl( &$output, $depth = 0, $args = array() ) {}81 public function end_lvl( &$output, $depth = 0, $args = array() ) {} 71 82 72 83 /** … … 85 96 * @param int $current_object_id ID of the current item. 86 97 */ 87 function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {}98 public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {} 88 99 89 100 /** … … 100 111 * @param array $args An array of additional arguments. 101 112 */ 102 function end_el( &$output, $object, $depth = 0, $args = array() ) {}113 public function end_el( &$output, $object, $depth = 0, $args = array() ) {} 103 114 104 115 /** … … 122 133 * @return null Null on failure with no changes to parameters. 123 134 */ 124 function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {135 public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { 125 136 126 137 if ( !$element ) … … 179 190 * @return string The hierarchical item output. 180 191 */ 181 function walk( $elements, $max_depth) {192 public function walk( $elements, $max_depth) { 182 193 183 194 $args = array_slice(func_get_args(), 2); … … 267 278 * @return string XHTML of the specified page of elements 268 279 */ 269 function paged_walk( $elements, $max_depth, $page_num, $per_page ) {280 public function paged_walk( $elements, $max_depth, $page_num, $per_page ) { 270 281 271 282 /* sanity check */ … … 374 385 } 375 386 376 function get_number_of_root_elements( $elements ){387 public function get_number_of_root_elements( $elements ){ 377 388 378 389 $num = 0; … … 387 398 388 399 // Unset all the children for a given top level element. 389 function unset_children( $e, &$children_elements ){400 public function unset_children( $e, &$children_elements ){ 390 401 391 402 if ( !$e || !$children_elements ) -
trunk/src/wp-includes/comment-template.php
r28431 r28514 1559 1559 * @var string 1560 1560 */ 1561 var$tree_type = 'comment';1561 public $tree_type = 'comment'; 1562 1562 1563 1563 /** … … 1569 1569 * @var array 1570 1570 */ 1571 var$db_fields = array ('parent' => 'comment_parent', 'id' => 'comment_ID');1571 public $db_fields = array ('parent' => 'comment_parent', 'id' => 'comment_ID'); 1572 1572 1573 1573 /** … … 1582 1582 * @param array $args Uses 'style' argument for type of HTML list. 1583 1583 */ 1584 function start_lvl( &$output, $depth = 0, $args = array() ) {1584 public function start_lvl( &$output, $depth = 0, $args = array() ) { 1585 1585 $GLOBALS['comment_depth'] = $depth + 1; 1586 1586 … … 1609 1609 * @param array $args Will only append content if style argument value is 'ol' or 'ul'. 1610 1610 */ 1611 function end_lvl( &$output, $depth = 0, $args = array() ) {1611 public function end_lvl( &$output, $depth = 0, $args = array() ) { 1612 1612 $GLOBALS['comment_depth'] = $depth + 1; 1613 1613 … … 1657 1657 * @return null Null on failure with no changes to parameters. 1658 1658 */ 1659 function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {1659 public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) { 1660 1660 1661 1661 if ( !$element ) … … 1691 1691 * @param array $args An array of arguments. 1692 1692 */ 1693 function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) {1693 public function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) { 1694 1694 $depth++; 1695 1695 $GLOBALS['comment_depth'] = $depth; … … 1731 1731 * @param array $args An array of arguments. 1732 1732 */ 1733 function end_el( &$output, $comment, $depth = 0, $args = array() ) {1733 public function end_el( &$output, $comment, $depth = 0, $args = array() ) { 1734 1734 if ( !empty( $args['end-callback'] ) ) { 1735 1735 ob_start(); -
trunk/src/wp-includes/nav-menu-template.php
r28330 r28514 22 22 * @var string 23 23 */ 24 var$tree_type = array( 'post_type', 'taxonomy', 'custom' );24 public $tree_type = array( 'post_type', 'taxonomy', 'custom' ); 25 25 26 26 /** … … 32 32 * @var array 33 33 */ 34 var$db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' );34 public $db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' ); 35 35 36 36 /** … … 45 45 * @param array $args An array of arguments. @see wp_nav_menu() 46 46 */ 47 function start_lvl( &$output, $depth = 0, $args = array() ) {47 public function start_lvl( &$output, $depth = 0, $args = array() ) { 48 48 $indent = str_repeat("\t", $depth); 49 49 $output .= "\n$indent<ul class=\"sub-menu\">\n"; … … 61 61 * @param array $args An array of arguments. @see wp_nav_menu() 62 62 */ 63 function end_lvl( &$output, $depth = 0, $args = array() ) {63 public function end_lvl( &$output, $depth = 0, $args = array() ) { 64 64 $indent = str_repeat("\t", $depth); 65 65 $output .= "$indent</ul>\n"; … … 79 79 * @param int $id Current item ID. 80 80 */ 81 function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {81 public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { 82 82 $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; 83 83 … … 187 187 * @param array $args An array of arguments. @see wp_nav_menu() 188 188 */ 189 function end_el( &$output, $item, $depth = 0, $args = array() ) {189 public function end_el( &$output, $item, $depth = 0, $args = array() ) { 190 190 $output .= "</li>\n"; 191 191 } -
trunk/src/wp-includes/post-template.php
r28498 r28514 1227 1227 * @var string 1228 1228 */ 1229 var$tree_type = 'page';1229 public $tree_type = 'page'; 1230 1230 1231 1231 /** … … 1235 1235 * @var array 1236 1236 */ 1237 var$db_fields = array ('parent' => 'post_parent', 'id' => 'ID');1237 public $db_fields = array ('parent' => 'post_parent', 'id' => 'ID'); 1238 1238 1239 1239 /** … … 1245 1245 * @param array $args 1246 1246 */ 1247 function start_lvl( &$output, $depth = 0, $args = array() ) {1247 public function start_lvl( &$output, $depth = 0, $args = array() ) { 1248 1248 $indent = str_repeat("\t", $depth); 1249 1249 $output .= "\n$indent<ul class='children'>\n"; … … 1258 1258 * @param array $args 1259 1259 */ 1260 function end_lvl( &$output, $depth = 0, $args = array() ) {1260 public function end_lvl( &$output, $depth = 0, $args = array() ) { 1261 1261 $indent = str_repeat("\t", $depth); 1262 1262 $output .= "$indent</ul>\n"; … … 1273 1273 * @param array $args 1274 1274 */ 1275 function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) {1275 public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { 1276 1276 if ( $depth ) { 1277 1277 $indent = str_repeat( "\t", $depth ); … … 1354 1354 * @param array $args 1355 1355 */ 1356 function end_el( &$output, $page, $depth = 0, $args = array() ) {1356 public function end_el( &$output, $page, $depth = 0, $args = array() ) { 1357 1357 $output .= "</li>\n"; 1358 1358 } … … 1372 1372 * @var string 1373 1373 */ 1374 var$tree_type = 'page';1374 public $tree_type = 'page'; 1375 1375 1376 1376 /** … … 1380 1380 * @var array 1381 1381 */ 1382 var$db_fields = array ('parent' => 'post_parent', 'id' => 'ID');1382 public $db_fields = array ('parent' => 'post_parent', 'id' => 'ID'); 1383 1383 1384 1384 /** … … 1392 1392 * @param int $id 1393 1393 */ 1394 function start_el( &$output, $page, $depth = 0, $args = array(), $id = 0 ) {1394 public function start_el( &$output, $page, $depth = 0, $args = array(), $id = 0 ) { 1395 1395 $pad = str_repeat(' ', $depth * 3); 1396 1396
Note: See TracChangeset
for help on using the changeset viewer.