Changeset 14585 for trunk/wp-admin/edit.php
- Timestamp:
- 05/12/2010 08:45:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r14571 r14585 20 20 $post_type_object = get_post_type_object($post_type); 21 21 22 if ( !current_user_can($post_type_object-> edit_type_cap) )22 if ( !current_user_can($post_type_object->cap->edit_posts) ) 23 23 wp_die(__('Cheatin’ uh?')); 24 24 … … 74 74 $trashed = 0; 75 75 foreach( (array) $post_ids as $post_id ) { 76 if ( !current_user_can($post_type_object-> delete_cap, $post_id) )76 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) 77 77 wp_die( __('You are not allowed to move this item to the Trash.') ); 78 78 … … 87 87 $untrashed = 0; 88 88 foreach( (array) $post_ids as $post_id ) { 89 if ( !current_user_can($post_type_object-> delete_cap, $post_id) )89 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) 90 90 wp_die( __('You are not allowed to restore this item from the Trash.') ); 91 91 … … 102 102 $post_del = & get_post($post_id); 103 103 104 if ( !current_user_can($post_type_object-> delete_cap, $post_id) )104 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) 105 105 wp_die( __('You are not allowed to delete this item.') ); 106 106 … … 141 141 142 142 $user_posts = false; 143 if ( !current_user_can($post_type_object-> edit_others_cap) ) {143 if ( !current_user_can($post_type_object->cap->edit_other_posts) ) { 144 144 $user_posts_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(1) FROM $wpdb->posts WHERE post_type = '%s' AND post_status NOT IN ('trash', 'auto-draft') AND post_author = %d", $post_type, $current_user->ID) ); 145 145 $user_posts = true; … … 346 346 <?php } 347 347 348 if ( $is_trash && current_user_can($post_type_object-> edit_others_cap) ) { ?>348 if ( $is_trash && current_user_can($post_type_object->cap->edit_other_posts) ) { ?> 349 349 <input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 350 350 <?php } ?> … … 397 397 </select> 398 398 <input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 399 <?php if ( $is_trash && current_user_can($post_type_object-> edit_others_cap) ) { ?>399 <?php if ( $is_trash && current_user_can($post_type_object->cap->edit_other_posts) ) { ?> 400 400 <input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 401 401 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.