Ticket #26089: 26089.6.diff
File 26089.6.diff, 9.7 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 $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>'; 84 86 } 85 87 86 88 /** … … 143 145 'taxonomy' => 'category', 144 146 'checked_ontop' => true 145 147 ); 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 */ 146 159 $args = apply_filters( 'wp_terms_checklist_args', $args, $post_id ); 147 160 148 161 extract( wp_parse_args($args, $defaults), EXTR_SKIP ); … … 235 248 236 249 <li id="<?php echo $id; ?>" class="popular-category"> 237 250 <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 ?> 240 256 </label> 241 257 </li> 242 258 … … 271 287 272 288 foreach ( $categories as $category ) { 273 289 $cat_id = $category->term_id; 290 291 /** This filter is documented in wp-includes/category-template.php */ 274 292 $name = esc_html( apply_filters( 'the_category', $category->name ) ); 275 293 $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : ''; 276 294 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 310 293 311 $title = esc_textarea( trim( $post->post_title ) ); 294 312 313 /** This filter is documented in wp-admin/edit-tag-form.php */ 295 314 echo ' 296 315 <div class="hidden" id="inline_' . $post->ID . '"> 297 316 <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> 299 318 <div class="post_author">' . $post->post_author . '</div> 300 319 <div class="comment_status">' . esc_html( $post->comment_status ) . '</div> 301 320 <div class="ping_status">' . esc_html( $post->ping_status ) . '</div> … … 349 368 * @param unknown_type $mode 350 369 */ 351 370 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) ); 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 ) ); 354 385 355 386 if ( ! empty($content) ) { 356 387 echo $content; … … 556 587 function meta_form( $post = null ) { 557 588 global $wpdb; 558 589 $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 */ 559 599 $limit = (int) apply_filters( 'postmeta_form_limit', 30 ); 560 600 $keys = $wpdb->get_col( " 561 601 SELECT meta_key … … 770 810 * @param string $action The action attribute for the form. 771 811 */ 772 812 function 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 */ 773 822 $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); 774 823 $size = size_format( $bytes ); 775 824 $upload_dir = wp_upload_dir(); … … 1430 1479 //]]> 1431 1480 </script> 1432 1481 <?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 */ 1483 do_action( 'admin_enqueue_scripts', $hook_suffix ); 1440 1484 1485 /** This action is documented in wp-admin/admin-header.php */ 1486 do_action( "admin_print_styles-$hook_suffix" ); 1487 1488 /** This action is documented in wp-admin/admin-header.php */ 1489 do_action( 'admin_print_styles' ); 1490 1491 /** This action is documented in wp-admin/admin-header.php */ 1492 do_action( "admin_print_scripts-$hook_suffix" ); 1493 1494 /** This action is documented in wp-admin/admin-header.php */ 1495 do_action( 'admin_print_scripts' ); 1496 1497 /** This action is documented in wp-admin/admin-header.php */ 1498 do_action( "admin_head-$hook_suffix" ); 1499 1500 /** This action is documented in wp-admin/admin-header.php */ 1501 do_action( 'admin_head' ); 1502 1441 1503 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); 1442 1504 1443 1505 if ( is_rtl() ) … … 1445 1507 1446 1508 ?> 1447 1509 </head> 1510 <?php 1511 /** This filter is documented in wp-admin/admin-header.php */ 1512 ?> 1448 1513 <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; ?>"> 1449 1514 <script type="text/javascript"> 1450 1515 //<![CDATA[ … … 1465 1530 * 1466 1531 */ 1467 1532 function 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 ?> 1469 1539 <div class="hidden"> 1470 1540 <?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 ?> 1473 1547 </div> 1474 1548 <script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script> 1475 1549 </body> … … 1496 1570 if ( is_sticky($post->ID) ) 1497 1571 $post_states['sticky'] = __('Sticky'); 1498 1572 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 */ 1499 1582 $post_states = apply_filters( 'display_post_states', $post_states, $post ); 1500 1583 1501 1584 if ( ! empty($post_states) ) { … … 1527 1610 $media_states[] = __( 'Background Image' ); 1528 1611 } 1529 1612 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 */ 1530 1621 $media_states = apply_filters( 'display_media_states', $media_states ); 1531 1622 1532 1623 if ( ! empty( $media_states ) ) { … … 1701 1792 if ( $is_IE ) 1702 1793 @header('X-UA-Compatible: IE=edge'); 1703 1794 1795 /** 1796 * Fires inside the HTML tag in the admin header. 1797 * 1798 * @since 2.2.0 1799 */ 1704 1800 ?> 1705 1801 <!DOCTYPE html> 1706 1802 <!--[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(); ?>> 1708 1804 <![endif]--> 1709 1805 <!--[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(); ?>> 1711 1808 <!--<![endif]--> 1712 1809 <head> 1713 1810 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />