59 * Start the element output. |
59 * Start the element output. |
60 * |
60 * |
61 * @see Walker::start_el() |
61 * @see Walker::start_el() |
62 * |
62 * |
63 * @since 2.5.1 |
63 * @since 2.5.1 |
|
64 * @since 5.9.0 Renamed `$category` to `$data_object` and `$id` to `$current_object_id` |
|
65 * to match parent class for PHP 8 named parameter support. |
64 * |
66 * |
65 * @param string $output Used to append additional content (passed by reference). |
67 * @param string $output Used to append additional content (passed by reference). |
66 * @param WP_Term $category The current term object. |
68 * @param WP_Term $data_object The current term object. |
67 * @param int $depth Depth of the term in reference to parents. Default 0. |
69 * @param int $depth Depth of the term in reference to parents. Default 0. |
68 * @param array $args An array of arguments. @see wp_terms_checklist() |
70 * @param array $args An array of arguments. @see wp_terms_checklist() |
69 * @param int $id ID of the current term. |
71 * @param int $current_object_id Optional. ID of the current term. Default 0. |
70 */ |
72 */ |
71 public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { |
73 public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) { |
|
74 // Restores the more descriptive, specific name for use within this method. |
|
75 $category = $data_object; |
|
76 |
72 if ( empty( $args['taxonomy'] ) ) { |
77 if ( empty( $args['taxonomy'] ) ) { |
73 $taxonomy = 'category'; |
78 $taxonomy = 'category'; |
74 } else { |
79 } else { |
75 $taxonomy = $args['taxonomy']; |
80 $taxonomy = $args['taxonomy']; |
76 } |
81 } |
118 * Ends the element output, if needed. |
123 * Ends the element output, if needed. |
119 * |
124 * |
120 * @see Walker::end_el() |
125 * @see Walker::end_el() |
121 * |
126 * |
122 * @since 2.5.1 |
127 * @since 2.5.1 |
|
128 * @since 5.9.0 Renamed `$category` to `$data_object` to match parent class for PHP 8 named parameter support. |
123 * |
129 * |
124 * @param string $output Used to append additional content (passed by reference). |
130 * @param string $output Used to append additional content (passed by reference). |
125 * @param WP_Term $category The current term object. |
131 * @param WP_Term $data_object The current term object. |
126 * @param int $depth Depth of the term in reference to parents. Default 0. |
132 * @param int $depth Depth of the term in reference to parents. Default 0. |
127 * @param array $args An array of arguments. @see wp_terms_checklist() |
133 * @param array $args An array of arguments. @see wp_terms_checklist() |
128 */ |
134 */ |
129 public function end_el( &$output, $category, $depth = 0, $args = array() ) { |
135 public function end_el( &$output, $data_object, $depth = 0, $args = array() ) { |
130 $output .= "</li>\n"; |
136 $output .= "</li>\n"; |
131 } |
137 } |
132 } |
138 } |