Ticket #26089: 26089.4.diff
File 26089.4.diff, 9.1 KB (added by , 10 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 84 /** This filter is documented in wp-includes/category-template.php */ 83 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>'; 84 86 } 85 87 … … 143 145 'taxonomy' => 'category', 144 146 'checked_ontop' => true 145 147 ); 148 /** 149 * Filter the default arguments for the taxonomy terms checklist. 150 * 151 * @since 3.4.0 152 * 153 * @see wp_terms_checklist() 154 * 155 * @param array $args Default wp_terms_checklist() arguments. 156 * @param int $post_id The post ID. 157 */ 146 158 $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id ); 147 159 148 160 extract( wp_parse_args($args, $defaults), EXTR_SKIP ); … … 235 247 236 248 <li id="<?php echo $id; ?>" class="popular-category"> 237 249 <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 ) ); ?> 250 <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 ) ); ?> /> 251 <?php 252 /** This filter is documented in wp-includes/category-template.php */ 253 echo esc_html( apply_filters( 'the_category', $term->name ) ); 254 ?> 240 255 </label> 241 256 </li> 242 257 … … 271 286 272 287 foreach ( $categories as $category ) { 273 288 $cat_id = $category->term_id; 289 290 /** This filter is documented in wp-includes/category-template.php */ 274 291 $name = esc_html( apply_filters( 'the_category', $category->name ) ); 275 292 $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : ''; 276 293 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 309 293 310 $title = esc_textarea( trim( $post->post_title ) ); 294 311 312 /** This filter is documented in wp-admin/edit-tag-form.php */ 295 313 echo ' 296 314 <div class="hidden" id="inline_' . $post->ID . '"> 297 315 <div class="post_title">' . $title . '</div> 298 <div class="post_name">' . apply_filters( 'editable_slug', $post->post_name) . '</div>316 <div class="post_name">' . apply_filters( 'editable_slug', $post->post_name ) . '</div> 299 317 <div class="post_author">' . $post->post_author . '</div> 300 318 <div class="comment_status">' . esc_html( $post->comment_status ) . '</div> 301 319 <div class="ping_status">' . esc_html( $post->ping_status ) . '</div> … … 349 367 * @param unknown_type $mode 350 368 */ 351 369 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) ); 370 /** 371 * Filter the content of the comment reply table row. 372 * 373 * Returning a non-empty value here will short-circuit display of 374 * the comments list tables. 375 * 376 * @since 2.7.0 377 * 378 * @param string $content The table row content. 379 * @param array $args An array of default args. 380 */ 381 $content = apply_filters( 'wp_comment_reply', '', array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode ) ); 354 382 355 383 if ( ! empty($content) ) { 356 384 echo $content; … … 556 584 function meta_form( $post = null ) { 557 585 global $wpdb; 558 586 $post = get_post( $post ); 587 /** 588 * Filter the total custom fields allowed in the Custom Fields meta box. 589 * 590 * @since 2.1.0 591 * 592 * @param int $limit Number of custom fields allowed. Default 30. 593 */ 559 594 $limit = (int) apply_filters( 'postmeta_form_limit', 30 ); 560 595 $keys = $wpdb->get_col( " 561 596 SELECT meta_key … … 776 811 * @param string $action The action attribute for the form. 777 812 */ 778 813 function wp_import_upload_form( $action ) { 814 /** 815 * Filter the maximum allowed upload size for import files. 816 * 817 * @since 2.3.0 818 * 819 * @param int $max_upload_size Allowed upload size. Default 1 MB. 820 */ 779 821 $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); 780 822 $size = size_format( $bytes ); 781 823 $upload_dir = wp_upload_dir(); … … 1426 1468 //]]> 1427 1469 </script> 1428 1470 <?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'); 1471 /** This action is documented in wp-admin/admin-header.php */ 1472 do_action( 'admin_enqueue_scripts', $hook_suffix ); 1436 1473 1474 /** This action is documented in wp-admin/admin-header.php */ 1475 do_action( "admin_print_styles-$hook_suffix" ); 1476 1477 /** This action is documented in wp-admin/admin-header.php */ 1478 do_action( 'admin_print_styles' ); 1479 1480 /** This action is documented in wp-admin/admin-header.php */ 1481 do_action( "admin_print_scripts-$hook_suffix" ); 1482 1483 /** This action is documented in wp-admin/admin-header.php */ 1484 do_action( 'admin_print_scripts' ); 1485 1486 /** This action is documented in wp-admin/admin-header.php */ 1487 do_action( "admin_head-$hook_suffix" ); 1488 1489 /** This action is documented in wp-admin/admin-header.php */ 1490 do_action( 'admin_head' ); 1491 1437 1492 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); 1438 1493 1439 1494 if ( is_rtl() ) … … 1441 1496 1442 1497 ?> 1443 1498 </head> 1499 <?php 1500 /** This filter is documented in wp-admin/admin-header.php */ 1501 ?> 1444 1502 <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; ?>"> 1445 1503 <script type="text/javascript"> 1446 1504 //<![CDATA[ … … 1461 1519 * 1462 1520 */ 1463 1521 function iframe_footer() { 1464 // We're going to hide any footer output on iframe pages, but run the hooks anyway since they output Javascript or other needed content. ?>1522 // 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 1523 <div class="hidden"> 1466 1524 <?php 1467 do_action('admin_footer', ''); 1468 do_action('admin_print_footer_scripts'); ?> 1525 /** This action is documented in wp-admin/admin-footer.php */ 1526 do_action( 'admin_footer', '' ); 1527 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 array $post_states An array of post states. Values include 'Password protected', 1563 * 'Private', 'Draft', 'Pending', and '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 inside 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'); ?>" />