diff -r be944660c56a -r 3d72ae0968f4 wp/wp-admin/includes/class-walker-category-checklist.php --- a/wp/wp-admin/includes/class-walker-category-checklist.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-admin/includes/class-walker-category-checklist.php Tue Sep 27 16:37:53 2022 +0200 @@ -61,14 +61,19 @@ * @see Walker::start_el() * * @since 2.5.1 + * @since 5.9.0 Renamed `$category` to `$data_object` and `$id` to `$current_object_id` + * to match parent class for PHP 8 named parameter support. * - * @param string $output Used to append additional content (passed by reference). - * @param WP_Term $category The current term object. - * @param int $depth Depth of the term in reference to parents. Default 0. - * @param array $args An array of arguments. @see wp_terms_checklist() - * @param int $id ID of the current term. + * @param string $output Used to append additional content (passed by reference). + * @param WP_Term $data_object The current term object. + * @param int $depth Depth of the term in reference to parents. Default 0. + * @param array $args An array of arguments. @see wp_terms_checklist() + * @param int $current_object_id Optional. ID of the current term. Default 0. */ - public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { + public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) { + // Restores the more descriptive, specific name for use within this method. + $category = $data_object; + if ( empty( $args['taxonomy'] ) ) { $taxonomy = 'category'; } else { @@ -120,13 +125,14 @@ * @see Walker::end_el() * * @since 2.5.1 + * @since 5.9.0 Renamed `$category` to `$data_object` to match parent class for PHP 8 named parameter support. * - * @param string $output Used to append additional content (passed by reference). - * @param WP_Term $category The current term object. - * @param int $depth Depth of the term in reference to parents. Default 0. - * @param array $args An array of arguments. @see wp_terms_checklist() + * @param string $output Used to append additional content (passed by reference). + * @param WP_Term $data_object The current term object. + * @param int $depth Depth of the term in reference to parents. Default 0. + * @param array $args An array of arguments. @see wp_terms_checklist() */ - public function end_el( &$output, $category, $depth = 0, $args = array() ) { + public function end_el( &$output, $data_object, $depth = 0, $args = array() ) { $output .= "\n"; } }