Changeset 13289
- Timestamp:
- 02/22/2010 08:36:32 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r13285 r13289 209 209 $taxonomy = get_taxonomy(substr($action, 4)); 210 210 check_ajax_referer( $action ); 211 if ( !current_user_can( $taxonomy-> manage_cap ) )211 if ( !current_user_can( $taxonomy->edit_cap ) ) 212 212 die('-1'); 213 213 $names = explode(',', $_POST['new'.$taxonomy->name]); -
trunk/wp-admin/includes/meta-boxes.php
r13285 r13289 248 248 $tax_name = esc_attr(substr($box['id'], 8)); 249 249 $taxonomy = get_taxonomy($tax_name); 250 if ( !current_user_can($taxonomy-> manage_cap) ) // @todo: Display the terms, do not edit.250 if ( !current_user_can($taxonomy->assign_cap) ) // @todo: Display the terms, do not edit. 251 251 return; 252 252 $helps = isset($taxonomy->helps) ? esc_attr($taxonomy->helps) : __('Separate tags with commas.'); -
trunk/wp-admin/includes/template.php
r13288 r13289 316 316 317 317 $tax = get_taxonomy($taxonomy); 318 $args['disabled'] = !current_user_can($tax-> manage_cap);318 $args['disabled'] = !current_user_can($tax->assign_cap); 319 319 320 320 if ( is_array( $selected_cats ) ) … … 379 379 380 380 $tax = get_taxonomy($taxonomy); 381 if ( ! current_user_can($tax-> manage_cap) )381 if ( ! current_user_can($tax->assign_cap) ) 382 382 $disabled = 'disabled="disabled"'; 383 383 else -
trunk/wp-includes/post.php
r13284 r13289 2186 2186 foreach ( $tax_input as $taxonomy => $tags ) { 2187 2187 $taxonomy_obj = get_taxonomy($taxonomy); 2188 if ( current_user_can($taxonomy_obj-> manage_cap) )2188 if ( current_user_can($taxonomy_obj->assign_cap) ) 2189 2189 wp_set_post_terms( $post_ID, $tags, $taxonomy ); 2190 2190 } -
trunk/wp-includes/taxonomy.php
r13284 r13289 257 257 $args[$cap] = 'manage_categories'; 258 258 } 259 if ( empty($args['assign_cap']) ) 260 $args['assign_cap'] = 'edit_posts'; 259 261 260 262 if ( empty($args['singular_label']) )
Note: See TracChangeset
for help on using the changeset viewer.