Changeset 27611
- Timestamp:
- 03/19/2014 05:46:02 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r27576 r27611 1435 1435 $post_data['ID'] = $post_data['post_ID'] = $post_id; 1436 1436 1437 if ( false === wp_verify_nonce( $post_data['_wpnonce'], 'update-post_' . $post_id ) ) 1438 return new WP_Error( 'invalid_nonce', __('ERROR: invalid post data.') ); 1437 if ( false === wp_verify_nonce( $post_data['_wpnonce'], 'update-post_' . $post_id ) ) { 1438 return new WP_Error( 'invalid_nonce', __( 'Error while saving.' ) ); 1439 } 1439 1440 1440 1441 $post = get_post( $post_id ); 1441 1442 1442 if ( ! current_user_can( 'edit_post', $post->ID ) ) 1443 return new WP_Error( 'edit_post', __('You are not allowed to edit this item.') ); 1443 if ( ! current_user_can( 'edit_post', $post->ID ) ) { 1444 return new WP_Error( 'edit_posts', __( 'You are not allowed to edit this item.' ) ); 1445 } 1444 1446 1445 1447 if ( 'auto-draft' == $post->post_status )
Note: See TracChangeset
for help on using the changeset viewer.