Changeset 12833 for trunk/wp-admin/includes/meta-boxes.php
- Timestamp:
- 01/26/2010 11:32:04 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r12798 r12833 240 240 $tax_name = esc_attr(substr($box['id'], 8)); 241 241 $taxonomy = get_taxonomy($tax_name); 242 if ( !current_user_can($taxonomy->manage_cap) ) 243 return; 242 244 $helps = isset($taxonomy->helps) ? esc_attr($taxonomy->helps) : __('Separate tags with commas.'); 243 245 ?> … … 276 278 $args = $box['args']; 277 279 extract( wp_parse_args($args, $defaults), EXTR_SKIP ); 280 $tax = get_taxonomy($taxonomy); 281 282 if ( !current_user_can($tax->manage_cap) ) 283 return; 278 284 ?> 279 285 <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv"> … … 295 301 </div> 296 302 297 <?php if ( current_user_can( 'manage_categories') ) : ?>303 <?php if ( current_user_can($tax->edit_cap) ) : ?> 298 304 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children"> 299 305 <h4><a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
Note: See TracChangeset
for help on using the changeset viewer.