Ticket #26089: 26089.3.diff
File 26089.3.diff, 9.8 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/template.php
80 80 $name = 'tax_input['.$taxonomy.']'; 81 81 82 82 $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; 83 /** This filter is documented in wp-includes/category-template.php */ 83 84 $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>'; 84 85 } 85 86 … … 143 144 'taxonomy' => 'category', 144 145 'checked_ontop' => true 145 146 ); 147 /** 148 * Filter the default arguments for the taxonomy terms checklist. 149 * 150 * @since 3.4.0 151 * 152 * @param array $args { 153 * The args for wp_terms checklist. 154 * 155 * @type bool $descendants_and_self Whether to display only taxonomies that 156 * apply to this post and its children, or all 157 * taxonomies. Default false. 158 * @type bool|array $selected_cats Whether to display selected taxonomies, or an 159 * array of registered taxonomy IDs assigned to the 160 * post. Default false. 161 * @type bool|array $popular_cats Whether to display top 10 taxonomies, or an 162 * array of taxonomies specifying which should be 163 * shown. Default false. 164 * @type object $walker Walker class to render the list. 165 * @type string $taxonomy The taxonomy to return. Default 'category'. 166 * Any registered taxonomy can be returned. 167 * @type bool $checked_ontop Whether to display checked taxonomies at 168 * the top of the terms list. Default true. 169 * } 170 * 171 * @param int $post_id The post ID. 172 */ 146 173 $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id ); 147 174 148 175 extract( wp_parse_args($args, $defaults), EXTR_SKIP ); … … 236 263 <li id="<?php echo $id; ?>" class="popular-category"> 237 264 <label class="selectit"> 238 265 <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 ) ); ?> 266 <?php /** This filter is documented in wp-includes/category-template.php */ 267 echo esc_html( apply_filters( 'the_category', $term->name ) ); ?> 240 268 </label> 241 269 </li> 242 270 … … 271 299 272 300 foreach ( $categories as $category ) { 273 301 $cat_id = $category->term_id; 302 /** This filter is documented in wp-includes/category-template.php */ 274 303 $name = esc_html( apply_filters( 'the_category', $category->name ) ); 275 304 $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : ''; 276 305 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>"; … … 292 321 293 322 $title = esc_textarea( trim( $post->post_title ) ); 294 323 324 /** This filter is documented in wp-admin/edit-tag-form.php */ 295 325 echo ' 296 326 <div class="hidden" id="inline_' . $post->ID . '"> 297 327 <div class="post_title">' . $title . '</div> 298 <div class="post_name">' . apply_filters( 'editable_slug', $post->post_name) . '</div>328 <div class="post_name">' . apply_filters( 'editable_slug', $post->post_name ) . '</div> 299 329 <div class="post_author">' . $post->post_author . '</div> 300 330 <div class="comment_status">' . esc_html( $post->comment_status ) . '</div> 301 331 <div class="ping_status">' . esc_html( $post->ping_status ) . '</div> … … 349 379 * @param unknown_type $mode 350 380 */ 351 381 function 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) ); 382 /** 383 * Filter the content of the comment reply table row. 384 * 385 * @since 2.7.0 386 * 387 * @param string $content The table row content. 388 * @param array $args An array of default args. 389 */ 390 $content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) ); 354 391 355 392 if ( ! empty($content) ) { 356 393 echo $content; … … 556 593 function meta_form( $post = null ) { 557 594 global $wpdb; 558 595 $post = get_post( $post ); 596 /** 597 * Filter the total custom fields allowed in the Custom Fields meta box. 598 * 599 * @since 2.1.0 600 * 601 * @param int $limit Number of custom fields allowed. Default 30. 602 */ 559 603 $limit = (int) apply_filters( 'postmeta_form_limit', 30 ); 560 604 $keys = $wpdb->get_col( " 561 605 SELECT meta_key … … 776 820 * @param string $action The action attribute for the form. 777 821 */ 778 822 function wp_import_upload_form( $action ) { 823 /** 824 * Filter the maximum allowed upload size for import files. 825 * 826 * @since 2.3.0 827 * 828 * @param int $max_upload_size Allowed upload size. Default 1 MB. 829 */ 779 830 $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); 780 831 $size = size_format( $bytes ); 781 832 $upload_dir = wp_upload_dir(); … … 1426 1477 //]]> 1427 1478 </script> 1428 1479 <?php 1429 do_action('admin_enqueue_scripts', $hook_suffix); 1430 do_action("admin_print_styles-$hook_suffix"); 1431 do_action('admin_print_styles'); 1432 do_action("admin_print_scripts-$hook_suffix"); 1433 do_action('admin_print_scripts'); 1434 do_action("admin_head-$hook_suffix"); 1435 do_action('admin_head'); 1480 /** This action is documented in wp-admin/admin-header.php */ 1481 do_action( 'admin_enqueue_scripts', $hook_suffix ); 1482 /** This action is documented in wp-admin/admin-header.php */ 1483 do_action( "admin_print_styles-$hook_suffix" ); 1484 /** This action is documented in wp-admin/admin-header.php */ 1485 do_action( 'admin_print_styles' ); 1486 /** This action is documented in wp-admin/admin-header.php */ 1487 do_action( "admin_print_scripts-$hook_suffix" ); 1488 /** This action is documented in wp-admin/admin-header.php */ 1489 do_action( 'admin_print_scripts' ); 1490 /** This action is documented in wp-admin/admin-header.php */ 1491 do_action( "admin_head-$hook_suffix" ); 1492 /** This action is documented in wp-admin/admin-header.php */ 1493 do_action( 'admin_head' ); 1436 1494 1437 1495 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); 1438 1496 … … 1439 1497 if ( is_rtl() ) 1440 1498 $admin_body_class .= ' rtl'; 1441 1499 1500 /** This filter is documented in wp-admin/admin-header.php */ 1442 1501 ?> 1443 1502 </head> 1444 1503 <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; ?>"> … … 1464 1523 //We're going to hide any footer output on iframe pages, but run the hooks anyway since they output Javascript or other needed content. ?> 1465 1524 <div class="hidden"> 1466 1525 <?php 1467 do_action('admin_footer', ''); 1468 do_action('admin_print_footer_scripts'); ?> 1526 /** This action is documented in wp-admin/admin-footer.php */ 1527 do_action( 'admin_footer', '' ); 1528 /** This action is documented in wp-admin/admin-footer.php */ 1529 do_action( 'admin_print_footer_scripts' ); 1530 ?> 1469 1531 </div> 1470 1532 <script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script> 1471 1533 </body> … … 1492 1554 if ( is_sticky($post->ID) ) 1493 1555 $post_states['sticky'] = __('Sticky'); 1494 1556 1557 /** 1558 * Filter the default post states. 1559 * 1560 * @since 2.8.0 1561 * 1562 * @param string $post_states The current post state. Accepts 'Password protected', 1563 * 'Private', 'Draft', 'Pending', 'Sticky'. 1564 * @param int $post The post ID. 1565 */ 1495 1566 $post_states = apply_filters( 'display_post_states', $post_states, $post ); 1496 1567 1497 1568 if ( ! empty($post_states) ) { … … 1523 1594 $media_states[] = __( 'Background Image' ); 1524 1595 } 1525 1596 1597 /** 1598 * Filter the default media states in the Media Library. 1599 * 1600 * @since 3.2.0 1601 * 1602 * @param array $media_states An array of media states. Default 'Header Image', 1603 * 'Background Image'. 1604 */ 1526 1605 $media_states = apply_filters( 'display_media_states', $media_states ); 1527 1606 1528 1607 if ( ! empty( $media_states ) ) { … … 1692 1771 if ( $is_IE ) 1693 1772 @header('X-UA-Compatible: IE=edge'); 1694 1773 1774 /** 1775 * Fires when adding the xmlns attribute to the HTML tag in the admin header. 1776 * 1777 * @since 2.2.0 1778 */ 1695 1779 ?> 1696 1780 <!DOCTYPE html> 1697 1781 <!--[if IE 8]> 1698 <html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns'); ?> <?php language_attributes(); ?>>1782 <html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>> 1699 1783 <![endif]--> 1700 1784 <!--[if !(IE 8) ]><!--> 1701 <html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> 1785 <?php /** This action is documented in wp-admin/includes/template.php */ ?> 1786 <html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>" <?php do_action( 'admin_xml_ns' ); ?> <?php language_attributes(); ?>> 1702 1787 <!--<![endif]--> 1703 1788 <head> 1704 1789 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />