Changeset 35139
- Timestamp:
- 10/13/2015 04:39:47 PM (11 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
-
meta-boxes.php (modified) (2 diffs)
-
template-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/meta-boxes.php
r35129 r35139 428 428 $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms ); 429 429 $comma = _x( ',', 'tag delimiter' ); 430 $terms_to_edit = get_terms_to_edit( $post->ID, $tax_name ); 431 if ( ! is_string( $terms_to_edit ) ) { 432 $terms_to_edit = ''; 433 } 430 434 ?> 431 435 <div class="tagsdiv" id="<?php echo $tax_name; ?>"> … … 433 437 <div class="nojs-tags hide-if-js"> 434 438 <p><?php echo $taxonomy->labels->add_or_remove_items; ?></p> 435 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php disabled( ! $user_can_assign_terms ); ?>><?php echo str_replace( ',', $comma . ' ', get_terms_to_edit( $post->ID, $tax_name )); // textarea_escaped by esc_attr() ?></textarea></div>439 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" rows="3" cols="20" class="the-tags" id="tax-input-<?php echo $tax_name; ?>" <?php disabled( ! $user_can_assign_terms ); ?>><?php echo str_replace( ',', $comma . ' ', $terms_to_edit ); // textarea_escaped by esc_attr() ?></textarea></div> 436 440 <?php if ( $user_can_assign_terms ) : ?> 437 441 <div class="ajaxtag hide-if-no-js"> -
trunk/src/wp-admin/includes/template-functions.php
r35128 r35139 315 315 } elseif ( $taxonomy->show_ui ) { 316 316 317 $terms_to_edit = get_terms_to_edit( $post->ID, $taxonomy_name ); 318 if ( ! is_string( $terms_to_edit ) ) { 319 $terms_to_edit = ''; 320 } 321 317 322 echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">' 318 . esc_html( str_replace( ',', ', ', get_terms_to_edit( $post->ID, $taxonomy_name )) ) . '</div>';323 . esc_html( str_replace( ',', ', ', $terms_to_edit ) ) . '</div>'; 319 324 320 325 }
Note: See TracChangeset
for help on using the changeset viewer.