Make WordPress Core

Ticket #26089: 26089.diff

File 26089.diff, 4.4 KB (added by shelob9, 11 years ago)

Inline docs for includes/template.php

  • wp-admin/includes/template.php

    diff --git wp-admin/includes/template.php wp-admin/includes/template.php
    index 5d43a25..ba53274 100644
    class Walker_Category_Checklist extends Walker { 
    8080                        $name = 'tax_input['.$taxonomy.']';
    8181
    8282                $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : '';
    83                 $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>';
     83
     84        /**
     85         * Filter category name in category checkbox.
     86         *
     87         * @since 1.2.1
     88         *
     89         */
     90        $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>';
    8491        }
    8592
    8693        /**
    function wp_terms_checklist($post_id = 0, $args = array()) { 
    143150                'taxonomy' => 'category',
    144151                'checked_ontop' => true
    145152        );
    146         $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
     153    /**
     154     * Filters arguments for wp_terms_checklist()
     155     *
     156     * @since 3.4
     157     *
     158     * @param array $args {
     159     *     The args for wp_terms checklist
     160     *
     161     *     @type bool $descendants_and_self Display only categories that apply to this post and their children or display all categories.
     162     *     @type bool|array $selected_cats Default (false) no categories. Or an array of category ids specify which categories should be selected by default in the list..
     163     *     @type bool|array $popular_cats Default (false) top 10 categories by count. Or an array of categories specify which categories should be shown in the popular categories list.
     164     *     @type object $walker Walker class to render the list with.
     165     *     @type string $taxonomy Taxonomy to return. Default category. Any registered taxonomy can be returned.
     166     *     @type bool $checked_ontop Display checked categories at the top of the terms list or not.
     167     * }
     168     *
     169     * @param int $post_id Post ID
     170     */
     171    $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
    147172
    148173        extract( wp_parse_args($args, $defaults), EXTR_SKIP );
    149174
    var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', 
    14261451//]]>
    14271452</script>
    14281453<?php
     1454/**#@+ This action is documented in wp-admin/admin-header.php */
    14291455do_action('admin_enqueue_scripts', $hook_suffix);
    14301456do_action("admin_print_styles-$hook_suffix");
    14311457do_action('admin_print_styles');
    do_action("admin_print_scripts-$hook_suffix"); 
    14331459do_action('admin_print_scripts');
    14341460do_action("admin_head-$hook_suffix");
    14351461do_action('admin_head');
    1436 
     1462/**#@-*/
    14371463$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
    14381464
    14391465if ( is_rtl() )
    function iframe_footer() { 
    14641490        //We're going to hide any footer output on iframe pages, but run the hooks anyway since they output Javascript or other needed content. ?>
    14651491        <div class="hidden">
    14661492<?php
     1493    /**#@+ This action is documented in wp-admin/admin-footer.php */
    14671494        do_action('admin_footer', '');
    1468         do_action('admin_print_footer_scripts'); ?>
     1495        do_action('admin_print_footer_scripts');
     1496    /**#@-*/
     1497?>
    14691498        </div>
    14701499<script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
    14711500</body>
    function _wp_admin_html_begin() { 
    16921721        if ( $is_IE )
    16931722                @header('X-UA-Compatible: IE=edge');
    16941723
     1724/**
     1725 * Outputs xmlns attribute for admin.
     1726 *
     1727 * Outputs, the xmlns in admin header, which specifies the xml namespace for a document.
     1728 *
     1729 * @since 2.2
     1730 *
     1731**/
    16951732?>
    16961733<!DOCTYPE html>
    16971734<!--[if IE 8]>
    final class WP_Internal_Pointers { 
    17571794                                                continue 2;
    17581795                                }
    17591796                        }
    1760 
    1761                         // Bind pointer print function
    17621797                        add_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_' . $pointer ) );
    17631798                        $got_pointers = true;
    17641799                }