Make WordPress Core

Ticket #26089: 26089.6.diff

File 26089.6.diff, 9.7 KB (added by DrewAPicture, 11 years ago)

tweaks

  • src/wp-admin/includes/template.php

     
    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                /** This filter is documented in wp-includes/category-template.php */
     85                $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>';
    8486        }
    8587
    8688        /**
     
    143145                'taxonomy' => 'category',
    144146                'checked_ontop' => true
    145147        );
     148
     149        /**
     150         * Filter the arguments for the taxonomy terms checklist.
     151         *
     152         * @since 3.4.0
     153         *
     154         * @see wp_terms_checklist()
     155         *
     156         * @param array $args    Arguments passed to wp_terms_checklist().
     157         * @param int   $post_id The post ID.
     158         */
    146159        $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id );
    147160
    148161        extract( wp_parse_args($args, $defaults), EXTR_SKIP );
     
    235248
    236249                <li id="<?php echo $id; ?>" class="popular-category">
    237250                        <label class="selectit">
    238                         <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
    239                                 <?php echo esc_html( apply_filters( 'the_category', $term->name ) ); ?>
     251                                <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" <?php disabled( ! current_user_can( $tax->cap->assign_terms ) ); ?> />
     252                                <?php
     253                                /** This filter is documented in wp-includes/category-template.php */
     254                                echo esc_html( apply_filters( 'the_category', $term->name ) );
     255                                ?>
    240256                        </label>
    241257                </li>
    242258
     
    271287
    272288        foreach ( $categories as $category ) {
    273289                $cat_id = $category->term_id;
     290
     291                /** This filter is documented in wp-includes/category-template.php */
    274292                $name = esc_html( apply_filters( 'the_category', $category->name ) );
    275293                $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : '';
    276294                echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, "</label></li>";
     
    292310
    293311        $title = esc_textarea( trim( $post->post_title ) );
    294312
     313        /** This filter is documented in wp-admin/edit-tag-form.php */
    295314        echo '
    296315<div class="hidden" id="inline_' . $post->ID . '">
    297316        <div class="post_title">' . $title . '</div>
    298         <div class="post_name">' . apply_filters('editable_slug', $post->post_name) . '</div>
     317        <div class="post_name">' . apply_filters( 'editable_slug', $post->post_name ) . '</div>
    299318        <div class="post_author">' . $post->post_author . '</div>
    300319        <div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
    301320        <div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
     
    349368 * @param unknown_type $mode
    350369 */
    351370function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) {
    352         // allow plugin to replace the popup content
    353         $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) );
     371        /**
     372         * Filter the content of the comment reply table row.
     373         *
     374         * Returning a non-empty value here will short-circuit display of
     375         * the comments list tables.
     376         *
     377         * @since 2.7.0
     378         *
     379         * @see wp_comment_reply()
     380         *
     381         * @param string $content The table row content.
     382         * @param array  $args    An array of default args.
     383         */
     384        $content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) );
    354385
    355386        if ( ! empty($content) ) {
    356387                echo $content;
     
    556587function meta_form( $post = null ) {
    557588        global $wpdb;
    558589        $post = get_post( $post );
     590
     591        /**
     592         * Filter the number of custom fields to retrieve for the Custom Fields
     593         * meta box drop-down.
     594         *
     595         * @since 2.1.0
     596         *
     597         * @param int $limit Number of custom fields to retrieve. Default 30.
     598         */
    559599        $limit = (int) apply_filters( 'postmeta_form_limit', 30 );
    560600        $keys = $wpdb->get_col( "
    561601                SELECT meta_key
     
    770810 * @param string $action The action attribute for the form.
    771811 */
    772812function wp_import_upload_form( $action ) {
     813        /**
     814         * Filter the maximum allowed upload size for import files.
     815         *
     816         * @since 2.3.0
     817         *
     818         * @see wp_max_upload_size()
     819         *
     820         * @param int $max_upload_size Allowed upload size. Default 1 MB.
     821         */
    773822        $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
    774823        $size = size_format( $bytes );
    775824        $upload_dir = wp_upload_dir();
     
    14301479//]]>
    14311480</script>
    14321481<?php
    1433 do_action('admin_enqueue_scripts', $hook_suffix);
    1434 do_action("admin_print_styles-$hook_suffix");
    1435 do_action('admin_print_styles');
    1436 do_action("admin_print_scripts-$hook_suffix");
    1437 do_action('admin_print_scripts');
    1438 do_action("admin_head-$hook_suffix");
    1439 do_action('admin_head');
     1482/** This action is documented in wp-admin/admin-header.php */
     1483do_action( 'admin_enqueue_scripts', $hook_suffix );
    14401484
     1485/** This action is documented in wp-admin/admin-header.php */
     1486do_action( "admin_print_styles-$hook_suffix" );
     1487
     1488/** This action is documented in wp-admin/admin-header.php */
     1489do_action( 'admin_print_styles' );
     1490
     1491/** This action is documented in wp-admin/admin-header.php */
     1492do_action( "admin_print_scripts-$hook_suffix" );
     1493
     1494/** This action is documented in wp-admin/admin-header.php */
     1495do_action( 'admin_print_scripts' );
     1496
     1497/** This action is documented in wp-admin/admin-header.php */
     1498do_action( "admin_head-$hook_suffix" );
     1499
     1500/** This action is documented in wp-admin/admin-header.php */
     1501do_action( 'admin_head' );
     1502
    14411503$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
    14421504
    14431505if ( is_rtl() )
     
    14451507
    14461508?>
    14471509</head>
     1510<?php
     1511/** This filter is documented in wp-admin/admin-header.php */
     1512?>
    14481513<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class; ?>">
    14491514<script type="text/javascript">
    14501515//<![CDATA[
     
    14651530 *
    14661531 */
    14671532function iframe_footer() {
    1468         //We're going to hide any footer output on iframe pages, but run the hooks anyway since they output Javascript or other needed content. ?>
     1533        /*
     1534         * We're going to hide any footer output on iFrame pages,
     1535         * but run the hooks anyway since they output Javascript
     1536         * or other needed content.
     1537         */
     1538         ?>
    14691539        <div class="hidden">
    14701540<?php
    1471         do_action('admin_footer', '');
    1472         do_action('admin_print_footer_scripts'); ?>
     1541        /** This action is documented in wp-admin/admin-footer.php */
     1542        do_action( 'admin_footer', '' );
     1543
     1544        /** This action is documented in wp-admin/admin-footer.php */
     1545        do_action( 'admin_print_footer_scripts' );
     1546?>
    14731547        </div>
    14741548<script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
    14751549</body>
     
    14961570        if ( is_sticky($post->ID) )
    14971571                $post_states['sticky'] = __('Sticky');
    14981572
     1573        /**
     1574         * Filter the default post display states.
     1575         *
     1576         * @since 2.8.0
     1577         *
     1578         * @param array $post_states An array of post display states. Values include 'Password protected',
     1579         *                           'Private', 'Draft', 'Pending', and 'Sticky'.
     1580         * @param int   $post        The post ID.
     1581         */
    14991582        $post_states = apply_filters( 'display_post_states', $post_states, $post );
    15001583
    15011584        if ( ! empty($post_states) ) {
     
    15271610                        $media_states[] = __( 'Background Image' );
    15281611        }
    15291612
     1613        /**
     1614         * Filter the default media display states in the Media Library.
     1615         *
     1616         * @since 3.2.0
     1617         *
     1618         * @param array $media_states An array of media states. Default 'Header Image',
     1619         *                            'Background Image'.
     1620         */
    15301621        $media_states = apply_filters( 'display_media_states', $media_states );
    15311622
    15321623        if ( ! empty( $media_states ) ) {
     
    17011792        if ( $is_IE )
    17021793                @header('X-UA-Compatible: IE=edge');
    17031794
     1795/**
     1796 * Fires inside the HTML tag in the admin header.
     1797 *
     1798 * @since 2.2.0
     1799 */
    17041800?>
    17051801<!DOCTYPE html>
    17061802<!--[if IE 8]>
    1707 <html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
     1803<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>>
    17081804<![endif]-->
    17091805<!--[if !(IE 8) ]><!-->
    1710 <html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
     1806<?php /** This action is documented in wp-admin/includes/template.php */ ?>
     1807<html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>>
    17111808<!--<![endif]-->
    17121809<head>
    17131810<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />