/** * Taxonomy API: Walker_Category_Checklist class * * @package WordPress * @subpackage Administration * @since 4.4.0 */ /** * Core walker class to output an unordered list of category checkbox input elements. * * @since 2.5.1 * * @see Walker * @see wp_category_checklist() * @see wp_terms_checklist() */ class Walker_Category_Checklist extends Walker { public $tree_type = 'category'; public $db_fields = array( 'parent' => 'parent', 'id' => 'term_id', ); //TODO: decouple this /** * Starts the list before the elements are added. * * @see Walker:start_lvl() * * @since 2.5.1 * * @param string $output Used to append additional content (passed by reference). * @param int $depth Depth of category. Used for tab indentation. * @param array $args An array of arguments. @see wp_terms_checklist() */ public function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat( "\t", $depth ); $output .= "$indent