Changeset 28391
- Timestamp:
- 05/13/2014 05:47:03 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/meta-boxes.php
r28298 r28391 373 373 * @param object $post 374 374 */ 375 function post_tags_meta_box( $post, $box) {376 $defaults = array( 'taxonomy' => 'post_tag');377 if ( ! isset($box['args']) || !is_array($box['args']) )375 function post_tags_meta_box( $post, $box ) { 376 $defaults = array( 'taxonomy' => 'post_tag' ); 377 if ( ! isset( $box['args'] ) || ! is_array( $box['args'] ) ) { 378 378 $args = array(); 379 else379 } else { 380 380 $args = $box['args']; 381 extract( wp_parse_args($args, $defaults), EXTR_SKIP ); 382 $tax_name = esc_attr($taxonomy); 383 $taxonomy = get_taxonomy($taxonomy); 381 } 382 $r = wp_parse_args( $args, $defaults ); 383 $tax = $r['taxonomy']; 384 $tax_name = esc_attr( $tax ); 385 $taxonomy = get_taxonomy( $tax ); 384 386 $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms ); 385 387 $comma = _x( ',', 'tag delimiter' ); … … 416 418 */ 417 419 function post_categories_meta_box( $post, $box ) { 418 $defaults = array( 'taxonomy' => 'category');419 if ( ! isset($box['args']) || !is_array($box['args']) )420 $defaults = array( 'taxonomy' => 'category' ); 421 if ( ! isset( $box['args'] ) || ! is_array( $box['args'] ) ) { 420 422 $args = array(); 421 else423 } else { 422 424 $args = $box['args']; 423 extract( wp_parse_args($args, $defaults), EXTR_SKIP ); 424 $tax = get_taxonomy($taxonomy); 425 425 } 426 $r = wp_parse_args( $args, $defaults ); 427 $taxonomy = $r['taxonomy']; 428 $tax = get_taxonomy( $taxonomy ); 426 429 ?> 427 430 <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv">
Note: See TracChangeset
for help on using the changeset viewer.