X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/a6f44f0edcda2471c5a33e4156c1c9488c7f3210..888fa4ed68091f3314f711c5f6fe75858bf5410b:/wp-admin/includes/template.php diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 18349644..fb581448 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -24,16 +24,51 @@ class Walker_Category_Checklist extends Walker { var $tree_type = 'category'; var $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() + */ function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "$indent\n"; } + /** + * Start the element output. + * + * @see Walker::start_el() + * + * @since 2.5.1 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $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. + */ function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { extract($args); if ( empty($taxonomy) ) @@ -45,9 +80,23 @@ class Walker_Category_Checklist extends Walker { $name = 'tax_input['.$taxonomy.']'; $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; - $output .= "\n
  • " . ''; + + /** This filter is documented in wp-includes/category-template.php */ + $output .= "\n
  • " . ''; } + /** + * Ends the element output, if needed. + * + * @see Walker::end_el() + * + * @since 2.5.1 + * + * @param string $output Passed by reference. Used to append additional content. + * @param object $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() + */ function end_el( &$output, $category, $depth = 0, $args = array() ) { $output .= "
  • \n"; } @@ -96,6 +145,17 @@ function wp_terms_checklist($post_id = 0, $args = array()) { 'taxonomy' => 'category', 'checked_ontop' => true ); + + /** + * Filter the taxonomy terms checklist arguments. + * + * @since 3.4.0 + * + * @see wp_terms_checklist() + * + * @param array $args An array of arguments. + * @param int $post_id The post ID. + */ $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id ); extract( wp_parse_args($args, $defaults), EXTR_SKIP ); @@ -188,8 +248,11 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech @@ -224,6 +287,8 @@ function wp_link_category_checklist( $link_id = 0 ) { foreach ( $categories as $category ) { $cat_id = $category->term_id; + + /** This filter is documented in wp-includes/category-template.php */ $name = esc_html( apply_filters( 'the_category', $category->name ) ); $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : ''; echo '"; @@ -245,10 +310,11 @@ function get_inline_data($post) { $title = esc_textarea( trim( $post->post_title ) ); + /** This filter is documented in wp-admin/edit-tag-form.php */ echo '