X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/177fd6fefd2e3d5a0ea6591c71d660cabdb3c1a4..refs/tags/wordpress-4.3:/wp-admin/includes/template.php diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index db80bf80..d1a85870 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1,198 +1,319 @@ 0); - if ( !empty($_GET['s']) ) - $args['search'] = $_GET['s']; - $categories = get_categories( $args ); +/** + * Walker 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 Passed by reference. Used to append additional content. + * @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
+ | - |
---|
-