Changeset 12927 for trunk/wp-admin/post.php
- Timestamp:
- 02/02/2010 05:37:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r12820 r12927 26 26 $post = null; 27 27 $post_type_object = null; 28 $post_type_cap = null;29 28 $post_type = null; 30 29 if ( $post_id ) { … … 36 35 $current_screen->post_type = $post->post_type; 37 36 $current_screen->id = $current_screen->post_type; 38 $post_type_cap = $post_type_object->capability_type;39 37 } 40 38 } … … 45 43 $current_screen->post_type = $post_type; 46 44 $current_screen->id = $current_screen->post_type; 47 $post_type_cap = $post_type_object->capability_type;48 45 } 49 46 } … … 234 231 $post = & get_post($post_id); 235 232 236 if ( !current_user_can( 'delete_' . $post_type_cap, $post_id) )233 if ( !current_user_can($post_type_object->delete_cap, $post_id) ) 237 234 wp_die( __('You are not allowed to move this item to the trash.') ); 238 235 … … 247 244 check_admin_referer('untrash-' . $post_type . '_' . $post_id); 248 245 249 if ( !current_user_can( 'delete_' . $post_type_cap, $post_id) )246 if ( !current_user_can($post_type_object->delete_cap, $post_id) ) 250 247 wp_die( __('You are not allowed to move this item out of the trash.') ); 251 248 … … 260 257 check_admin_referer('delete-' . $post_type . '_' . $post_id); 261 258 262 if ( !current_user_can( 'delete_' . $post_type_cap, $post_id) )259 if ( !current_user_can($post_type_object->delete_cap, $post_id) ) 263 260 wp_die( __('You are not allowed to delete this item.') ); 264 261
Note: See TracChangeset
for help on using the changeset viewer.