Changeset 2709 for trunk/wp-admin/post.php
- Timestamp:
- 07/13/2005 10:26:26 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r2703 r2709 70 70 die ( __('You are not allowed to edit this post.') ); 71 71 72 if ( !user_can_edit_post($user_ID, $post_ID) )73 die ( __('You are not allowed to view other users\' private posts.') );74 75 72 $post = get_post_to_edit($post_ID); 76 73 … … 121 118 $post_id = (isset($_GET['post'])) ? intval($_GET['post']) : intval($_POST['post_ID']); 122 119 123 if ( !user_can_delete_post($user_ID, $post_id)) {120 if ( !current_user_can('edit_post', $post_id) ) 124 121 die( __('You are not allowed to delete this post.') ); 125 }126 122 127 123 if (! wp_delete_post($post_id)) … … 146 142 die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)')); 147 143 148 if ( ! user_can_edit_post_comments($user_ID, $comment->comment_post_ID) )144 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) 149 145 die( __('You are not allowed to edit comments on this post.') ); 150 146 … … 165 161 die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 166 162 167 if ( ! user_can_delete_post_comments($user_ID, $comment->comment_post_ID) )163 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) 168 164 die( __('You are not allowed to delete comments on this post.') ); 169 165 … … 208 204 die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'post.php')); 209 205 210 if ( !user_can_delete_post_comments($user_ID, $commentdata['comment_post_ID']))206 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) 211 207 die( __('You are not allowed to edit comments on this post.') ); 212 208 … … 239 235 die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 240 236 241 if ( ! user_can_edit_post_comments($user_ID, $comment->comment_post_ID) )237 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) 242 238 die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') ); 243 239 … … 259 255 die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 260 256 261 if ( ! user_can_edit_post_comments($user_ID, $comment->comment_post_ID) )257 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) 262 258 die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); 263 259 … … 285 281 die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php')); 286 282 287 if ( ! user_can_edit_post_comments($user_ID, $commentdata['comment_post_ID']))283 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) 288 284 die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); 289 285 … … 323 319 <?php endif; ?> 324 320 <?php 325 if ( user_can_create_draft($user_ID) ) {321 if ( current_user_can('edit_posts') ) { 326 322 $action = 'post'; 327 323 get_currentuserinfo();
Note: See TracChangeset
for help on using the changeset viewer.