Changeset 46123 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 09/15/2019 10:32:54 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r45932 r46123 1057 1057 * @uses Walker_Category to create HTML list content. 1058 1058 * @since 2.1.0 1059 * @see Walker_Category::walk() for parameters and return description. 1059 * @see Walker::walk() for parameters and return description. 1060 * 1061 * @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments. 1060 1062 * @return string 1061 1063 */ 1062 function walk_category_tree() { 1063 $args = func_get_args(); 1064 // the user's options are the third parameter 1064 function walk_category_tree( ...$args ) { 1065 // The user's options are the third parameter. 1065 1066 if ( empty( $args[2]['walker'] ) || ! ( $args[2]['walker'] instanceof Walker ) ) { 1066 1067 $walker = new Walker_Category; … … 1068 1069 $walker = $args[2]['walker']; 1069 1070 } 1070 return call_user_func_array( array( $walker, 'walk' ),$args );1071 return $walker->walk( ...$args ); 1071 1072 } 1072 1073 … … 1076 1077 * @uses Walker_CategoryDropdown to create HTML dropdown content. 1077 1078 * @since 2.1.0 1078 * @see Walker_CategoryDropdown::walk() for parameters and return description. 1079 * @see Walker::walk() for parameters and return description. 1080 * 1081 * @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments. 1079 1082 * @return string 1080 1083 */ 1081 function walk_category_dropdown_tree() { 1082 $args = func_get_args(); 1083 // the user's options are the third parameter 1084 function walk_category_dropdown_tree( ...$args ) { 1085 // The user's options are the third parameter. 1084 1086 if ( empty( $args[2]['walker'] ) || ! ( $args[2]['walker'] instanceof Walker ) ) { 1085 1087 $walker = new Walker_CategoryDropdown; … … 1087 1089 $walker = $args[2]['walker']; 1088 1090 } 1089 return call_user_func_array( array( $walker, 'walk' ),$args );1091 return $walker->walk( ...$args ); 1090 1092 } 1091 1093
Note: See TracChangeset
for help on using the changeset viewer.