Changeset 12833 for trunk/wp-admin/edit-tags.php
- Timestamp:
- 01/26/2010 11:32:04 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-tags.php
r12818 r12833 19 19 if ( !is_taxonomy($taxonomy) ) 20 20 wp_die(__('Invalid taxonomy')); 21 22 $tax = get_taxonomy($taxonomy); 21 23 22 24 if ( empty($post_type) || !in_array( $post_type, get_post_types( array('_show' => true) ) ) ) … … 40 42 check_admin_referer('add-tag'); 41 43 42 if ( !current_user_can( 'manage_categories') )44 if ( !current_user_can($tax->edit_cap) ) 43 45 wp_die(__('Cheatin’ uh?')); 44 46 … … 61 63 check_admin_referer('delete-tag_' . $tag_ID); 62 64 63 if ( !current_user_can( 'manage_categories') )65 if ( !current_user_can($tax->delete_cap) ) 64 66 wp_die(__('Cheatin’ uh?')); 65 67 … … 81 83 check_admin_referer('bulk-tags'); 82 84 83 if ( !current_user_can( 'manage_categories') )85 if ( !current_user_can($tax->delete_cap) ) 84 86 wp_die(__('Cheatin’ uh?')); 85 87 … … 116 118 check_admin_referer('update-tag_' . $tag_ID); 117 119 118 if ( !current_user_can( 'manage_categories') )120 if ( !current_user_can($tax->edit_cap) ) 119 121 wp_die(__('Cheatin’ uh?')); 120 122 … … 143 145 } 144 146 145 $can_manage = current_user_can('manage_categories');146 147 147 wp_enqueue_script('admin-tags'); 148 if ( $can_manage)148 if ( current_user_can($tax->edit_cap) ) 149 149 wp_enqueue_script('inline-edit-tax'); 150 150 … … 250 250 251 251 <tbody id="the-list" class="list:tag"> 252 <?php 253 254 $count = tag_rows( $pagenum, $tags_per_page, $searchterms, $taxonomy ); 255 ?> 252 <?php tag_rows( $pagenum, $tags_per_page, $searchterms, $taxonomy ); ?> 256 253 </tbody> 257 254 </table> … … 285 282 <h3><?php _e('Popular Tags'); ?></h3> 286 283 <?php 287 if ( $can_manage)284 if ( current_user_can($tax->edit_cap) ) 288 285 wp_tag_cloud(array('taxonomy' => $taxonomy, 'link' => 'edit')); 289 286 else … … 292 289 </div> 293 290 294 <?php if ( $can_manage) {295 do_action('add_tag_form_pre' ); ?>291 <?php if ( current_user_can($tax->edit_cap) ) { 292 do_action('add_tag_form_pre', $taxonomy); ?> 296 293 297 294 <div class="form-wrap"> … … 328 325 329 326 <p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p> 330 <?php do_action('add_tag_form' ); ?>327 <?php do_action('add_tag_form', $taxonomy); ?> 331 328 </form></div> 332 329 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.