diff --git wp-admin/includes/template.php wp-admin/includes/template.php
index 5d43a25..f64a53f 100644
|
|
class Walker_Category_Checklist extends Walker { |
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 | /** |
| 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>'; |
84 | 91 | } |
85 | 92 | |
86 | 93 | /** |
… |
… |
function wp_terms_checklist($post_id = 0, $args = array()) { |
143 | 150 | 'taxonomy' => 'category', |
144 | 151 | 'checked_ontop' => true |
145 | 152 | ); |
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 ); |
147 | 172 | |
148 | 173 | extract( wp_parse_args($args, $defaults), EXTR_SKIP ); |
149 | 174 | |
… |
… |
function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech |
231 | 256 | continue; |
232 | 257 | $id = "popular-$taxonomy-$term->term_id"; |
233 | 258 | $checked = in_array( $term->term_id, $checked_terms ) ? 'checked="checked"' : ''; |
| 259 | |
| 260 | /** |
| 261 | * Filter terms names in category checkbox. |
| 262 | * |
| 263 | * @since unknown |
| 264 | * |
| 265 | */ |
234 | 266 | ?> |
235 | 267 | |
236 | 268 | <li id="<?php echo $id; ?>" class="popular-category"> |
… |
… |
function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech |
246 | 278 | } |
247 | 279 | |
248 | 280 | /** |
249 | | * {@internal Missing Short Description}} |
| 281 | * Outputs link category checklist in admin template. |
250 | 282 | * |
251 | 283 | * @since 2.5.1 |
252 | 284 | * |
253 | | * @param unknown_type $link_id |
| 285 | * @param int $link_id |
254 | 286 | */ |
255 | 287 | function wp_link_category_checklist( $link_id = 0 ) { |
256 | 288 | $default = 1; |
… |
… |
function wp_link_category_checklist( $link_id = 0 ) { |
271 | 303 | |
272 | 304 | foreach ( $categories as $category ) { |
273 | 305 | $cat_id = $category->term_id; |
274 | | $name = esc_html( apply_filters( 'the_category', $category->name ) ); |
| 306 | /** |
| 307 | * Filters link category names |
| 308 | * |
| 309 | * @since unknown |
| 310 | */ |
| 311 | $name = esc_html( apply_filters( 'the_category', $category->name ) ); |
275 | 312 | $checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : ''; |
276 | 313 | 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>"; |
277 | 314 | } |
278 | 315 | } |
279 | 316 | |
280 | | // adds hidden fields with the data for use in the inline editor for posts and pages |
281 | 317 | /** |
282 | | * {@internal Missing Short Description}} |
| 318 | * Hidden fields for inline editor. |
| 319 | * |
| 320 | * Adds hidden fields with the data for use in the inline editor for posts and pages. |
283 | 321 | * |
284 | 322 | * @since 2.7.0 |
285 | 323 | * |
286 | | * @param unknown_type $post |
| 324 | * @param id $post Post id |
287 | 325 | */ |
288 | 326 | function get_inline_data($post) { |
289 | 327 | $post_type_object = get_post_type_object($post->post_type); |
… |
… |
function get_inline_data($post) { |
292 | 330 | |
293 | 331 | $title = esc_textarea( trim( $post->post_title ) ); |
294 | 332 | |
295 | | echo ' |
| 333 | /** |
| 334 | * Filter for post name in inline editor. |
| 335 | * |
| 336 | * Applies editable slug filter to post name field for hidden field for inline post/page editor. |
| 337 | * |
| 338 | * @since 2.9.0 |
| 339 | */ |
| 340 | echo ' |
296 | 341 | <div class="hidden" id="inline_' . $post->ID . '"> |
297 | 342 | <div class="post_title">' . $title . '</div> |
298 | 343 | <div class="post_name">' . apply_filters('editable_slug', $post->post_name) . '</div> |
… |
… |
function get_inline_data($post) { |
340 | 385 | } |
341 | 386 | |
342 | 387 | /** |
343 | | * {@internal Missing Short Description}} |
| 388 | * Display comments reply post or page. |
344 | 389 | * |
345 | 390 | * @since 2.7.0 |
346 | 391 | * |
347 | | * @param unknown_type $position |
348 | | * @param unknown_type $checkbox |
349 | | * @param unknown_type $mode |
| 392 | * @param int $position |
| 393 | * @param bool $checkbox |
| 394 | * @param string $mode |
| 395 | * @param bool $table_row |
350 | 396 | */ |
351 | 397 | function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) { |
352 | | // allow plugin to replace the popup content |
| 398 | /** |
| 399 | * Filter to allow plugin to replace the popup content |
| 400 | * |
| 401 | * Filter to replace the comment reply popup content via a plugin |
| 402 | * |
| 403 | * @see wp_comment_reply |
| 404 | * |
| 405 | * @since 2.7.0 |
| 406 | */ |
353 | 407 | $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) ); |
354 | 408 | |
355 | 409 | if ( ! empty($content) ) { |
… |
… |
function _list_meta_row( $entry, &$count ) { |
556 | 610 | function meta_form( $post = null ) { |
557 | 611 | global $wpdb; |
558 | 612 | $post = get_post( $post ); |
559 | | $limit = (int) apply_filters( 'postmeta_form_limit', 30 ); |
| 613 | /** |
| 614 | * Filters the number of post-meta information items shown on the post edit screen. |
| 615 | * |
| 616 | * @since 2.1.0 |
| 617 | */ |
| 618 | $limit = (int) apply_filters( 'postmeta_form_limit', 30 ); |
560 | 619 | $keys = $wpdb->get_col( " |
561 | 620 | SELECT meta_key |
562 | 621 | FROM $wpdb->postmeta |
… |
… |
function wp_dropdown_roles( $selected = false ) { |
776 | 835 | * @param string $action The action attribute for the form. |
777 | 836 | */ |
778 | 837 | function wp_import_upload_form( $action ) { |
| 838 | /** |
| 839 | * Filter the maximum allowed upload size. |
| 840 | * |
| 841 | * @since 2.3.0 |
| 842 | * |
| 843 | * @uses wp_max_upload_size() |
| 844 | */ |
779 | 845 | $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); |
780 | 846 | $size = size_format( $bytes ); |
781 | 847 | $upload_dir = wp_upload_dir(); |
… |
… |
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', |
1426 | 1492 | //]]> |
1427 | 1493 | </script> |
1428 | 1494 | <?php |
| 1495 | /**#@+ This action is documented in wp-admin/admin-header.php */ |
1429 | 1496 | do_action('admin_enqueue_scripts', $hook_suffix); |
1430 | 1497 | do_action("admin_print_styles-$hook_suffix"); |
1431 | 1498 | do_action('admin_print_styles'); |
… |
… |
do_action("admin_print_scripts-$hook_suffix"); |
1433 | 1500 | do_action('admin_print_scripts'); |
1434 | 1501 | do_action("admin_head-$hook_suffix"); |
1435 | 1502 | do_action('admin_head'); |
1436 | | |
| 1503 | /**#@-*/ |
1437 | 1504 | $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); |
1438 | 1505 | |
1439 | 1506 | if ( is_rtl() ) |
1440 | 1507 | $admin_body_class .= ' rtl'; |
1441 | 1508 | |
1442 | | ?> |
| 1509 | /** |
| 1510 | * Filter the body class for admin. |
| 1511 | * |
| 1512 | * @since 3.3.0 |
| 1513 | */ |
| 1514 | ?> |
1443 | 1515 | </head> |
1444 | 1516 | <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 | 1517 | <script type="text/javascript"> |
… |
… |
function iframe_footer() { |
1464 | 1536 | //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 | 1537 | <div class="hidden"> |
1466 | 1538 | <?php |
| 1539 | /**#@+ This action is documented in wp-admin/admin-footer.php */ |
1467 | 1540 | do_action('admin_footer', ''); |
1468 | | do_action('admin_print_footer_scripts'); ?> |
| 1541 | do_action('admin_print_footer_scripts'); |
| 1542 | /**#@-*/ |
| 1543 | ?> |
1469 | 1544 | </div> |
1470 | 1545 | <script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script> |
1471 | 1546 | </body> |
… |
… |
function _post_states($post) { |
1491 | 1566 | $post_states['pending'] = _x('Pending', 'post state'); |
1492 | 1567 | if ( is_sticky($post->ID) ) |
1493 | 1568 | $post_states['sticky'] = __('Sticky'); |
1494 | | |
1495 | | $post_states = apply_filters( 'display_post_states', $post_states, $post ); |
| 1569 | /** |
| 1570 | * Filters the output of _posts_states(). |
| 1571 | * |
| 1572 | * @param string $post_states The current post status |
| 1573 | * @param int $post The post id. |
| 1574 | * |
| 1575 | * @since 2.8.0 |
| 1576 | */ |
| 1577 | $post_states = apply_filters( 'display_post_states', $post_states, $post ); |
1496 | 1578 | |
1497 | 1579 | if ( ! empty($post_states) ) { |
1498 | 1580 | $state_count = count($post_states); |
… |
… |
function _media_states( $post ) { |
1522 | 1604 | if ( ! empty( $meta_background ) && $meta_background == $stylesheet ) |
1523 | 1605 | $media_states[] = __( 'Background Image' ); |
1524 | 1606 | } |
1525 | | |
1526 | | $media_states = apply_filters( 'display_media_states', $media_states ); |
| 1607 | /** |
| 1608 | * Filter what custom header of background image is labeled as. |
| 1609 | * |
| 1610 | * Allows for changing what custom-header and custom-background are labeled as in their admin editors. |
| 1611 | * |
| 1612 | * @param string $media_states The |
| 1613 | * |
| 1614 | * @since 3.2.0 |
| 1615 | */ |
| 1616 | $media_states = apply_filters( 'display_media_states', $media_states ); |
1527 | 1617 | |
1528 | 1618 | if ( ! empty( $media_states ) ) { |
1529 | 1619 | $state_count = count( $media_states ); |
… |
… |
function _wp_admin_html_begin() { |
1692 | 1782 | if ( $is_IE ) |
1693 | 1783 | @header('X-UA-Compatible: IE=edge'); |
1694 | 1784 | |
| 1785 | /** |
| 1786 | * Outputs xmlns attribute for admin. |
| 1787 | * |
| 1788 | * Outputs, the xmlns in admin header, which specifies the xml namespace for a document. |
| 1789 | * |
| 1790 | * @since 2.2.0 |
| 1791 | * |
| 1792 | **/ |
1695 | 1793 | ?> |
1696 | 1794 | <!DOCTYPE html> |
1697 | 1795 | <!--[if IE 8]> |
… |
… |
final class WP_Internal_Pointers { |
1757 | 1855 | continue 2; |
1758 | 1856 | } |
1759 | 1857 | } |
1760 | | |
1761 | | // Bind pointer print function |
1762 | 1858 | add_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_' . $pointer ) ); |
1763 | 1859 | $got_pointers = true; |
1764 | 1860 | } |