Changeset 13855 for trunk/wp-admin/includes/meta-boxes.php
- Timestamp:
- 03/28/2010 02:37:10 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r13840 r13855 247 247 $tax_name = esc_attr(substr($box['id'], 8)); 248 248 $taxonomy = get_taxonomy($tax_name); 249 if ( !current_user_can($taxonomy->assign_cap) ) // @todo: Display the terms, do not edit.250 return;251 249 $helps = isset( $taxonomy->helps ) ? esc_attr( $taxonomy->helps ) : esc_attr__('Separate tags with commas.'); 252 250 $help_hint = isset( $taxonomy->help_hint ) ? $taxonomy->help_hint : __('Add new tag'); 253 251 $help_nojs = isset( $taxonomy->help_nojs ) ? $taxonomy->help_nojs : __('Add or remove tags'); 254 252 $help_cloud = isset( $taxonomy->help_cloud ) ? $taxonomy->help_cloud : __('Choose from the most used tags in %s'); 253 254 $disabled = !current_user_can($taxonomy->assign_cap) ? 'disabled="disabled"' : ''; 255 255 ?> 256 256 <div class="tagsdiv" id="<?php echo $tax_name; ?>"> … … 258 258 <div class="nojs-tags hide-if-js"> 259 259 <p><?php echo $help_nojs; ?></p> 260 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" class="the-tags" id="tax-input[<?php echo $tax_name; ?>]" ><?php echo esc_attr(get_terms_to_edit( $post->ID, $tax_name )); ?></textarea></div>261 260 <textarea name="<?php echo "tax_input[$tax_name]"; ?>" class="the-tags" id="tax-input[<?php echo $tax_name; ?>]" <?php echo $disabled; ?>><?php echo esc_attr(get_terms_to_edit( $post->ID, $tax_name )); ?></textarea></div> 261 <?php if ( current_user_can($taxonomy->assign_cap) ) : ?> 262 262 <div class="ajaxtag hide-if-no-js"> 263 263 <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label> … … 265 265 <input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="" /> 266 266 <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" tabindex="3" /> 267 </div> </div>267 </div> 268 268 <p class="howto"><?php echo $helps; ?></p> 269 <?php endif; ?> 270 </div> 269 271 <div class="tagchecklist"></div> 270 272 </div> 273 <?php if ( current_user_can($taxonomy->assign_cap) ) : ?> 271 274 <p class="hide-if-no-js"><a href="#titlediv" class="tagcloud-link" id="link-<?php echo $tax_name; ?>"><?php printf( $help_cloud, $box['title'] ); ?></a></p> 275 <?php else : ?> 276 <p><em><?php _e('You cannot modify this Taxonomy.'); ?></em></p> 277 <?php endif; ?> 272 278 <?php 273 279 } … … 308 314 </ul> 309 315 </div> 310 316 <?php if ( !current_user_can($tax->assign_cap) ) : ?> 317 <p><em><?php _e('You cannot modify this Taxonomy.'); ?></em></p> 318 <?php endif; ?> 311 319 <?php if ( current_user_can($tax->edit_cap) ) : ?> 312 320 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children">
Note: See TracChangeset
for help on using the changeset viewer.