Changeset 37914 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 06/29/2016 03:15:40 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r37801 r37914 31 31 if ( $update && ! current_user_can( 'edit_post', $post_data['ID'] ) ) { 32 32 if ( 'page' == $post_data['post_type'] ) 33 return new WP_Error( 'edit_others_pages', __( ' You are not allowed to edit pages as this user.' ) );33 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) ); 34 34 else 35 return new WP_Error( 'edit_others_posts', __( ' You are not allowed to edit posts as this user.' ) );35 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) ); 36 36 } elseif ( ! $update && ! current_user_can( $ptype->cap->create_posts ) ) { 37 37 if ( 'page' == $post_data['post_type'] ) 38 return new WP_Error( 'edit_others_pages', __( ' You are not allowed to create pages as this user.' ) );38 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) ); 39 39 else 40 return new WP_Error( 'edit_others_posts', __( ' You are not allowed to create posts as this user.' ) );40 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) ); 41 41 } 42 42 … … 69 69 if ( $update ) { 70 70 if ( 'page' == $post_data['post_type'] ) 71 return new WP_Error( 'edit_others_pages', __( ' You are not allowed to edit pages as this user.' ) );71 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) ); 72 72 else 73 return new WP_Error( 'edit_others_posts', __( ' You are not allowed to edit posts as this user.' ) );73 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) ); 74 74 } else { 75 75 if ( 'page' == $post_data['post_type'] ) 76 return new WP_Error( 'edit_others_pages', __( ' You are not allowed to create pages as this user.' ) );76 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to create pages as this user.' ) ); 77 77 else 78 return new WP_Error( 'edit_others_posts', __( ' You are not allowed to create posts as this user.' ) );78 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to create posts as this user.' ) ); 79 79 } 80 80 } … … 211 211 if ( !current_user_can( 'edit_post', $post_ID ) ) { 212 212 if ( 'page' == $post_data['post_type'] ) 213 wp_die( __(' You are not allowed to edit this page.' ));213 wp_die( __('Sorry, you are not allowed to edit this page.' )); 214 214 else 215 wp_die( __(' You are not allowed to edit this post.' ));215 wp_die( __('Sorry, you are not allowed to edit this post.' )); 216 216 } 217 217 … … 429 429 if ( !current_user_can( $ptype->cap->edit_posts ) ) { 430 430 if ( 'page' == $ptype->name ) 431 wp_die( __(' You are not allowed to edit pages.'));431 wp_die( __('Sorry, you are not allowed to edit pages.')); 432 432 else 433 wp_die( __(' You are not allowed to edit posts.'));433 wp_die( __('Sorry, you are not allowed to edit posts.')); 434 434 } 435 435 … … 722 722 if ( !current_user_can( $ptype->cap->edit_posts ) ) { 723 723 if ( 'page' == $ptype->name ) 724 return new WP_Error( 'edit_pages', __( ' You are not allowed to create pages on this site.' ) );724 return new WP_Error( 'edit_pages', __( 'Sorry, you are not allowed to create pages on this site.' ) ); 725 725 else 726 return new WP_Error( 'edit_posts', __( ' You are not allowed to create posts or drafts on this site.' ) );726 return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to create posts or drafts on this site.' ) ); 727 727 } 728 728 … … 1725 1725 1726 1726 if ( ! $post = get_post( $post_ID ) ) { 1727 wp_die( __( ' You are not allowed to edit this post.' ) );1727 wp_die( __( 'Sorry, you are not allowed to edit this post.' ) ); 1728 1728 } 1729 1729 1730 1730 if ( ! current_user_can( 'edit_post', $post->ID ) ) { 1731 wp_die( __( ' You are not allowed to edit this post.' ) );1731 wp_die( __( 'Sorry, you are not allowed to edit this post.' ) ); 1732 1732 } 1733 1733 … … 1787 1787 1788 1788 if ( ! current_user_can( 'edit_post', $post->ID ) ) { 1789 return new WP_Error( 'edit_posts', __( ' You are not allowed to edit this item.' ) );1789 return new WP_Error( 'edit_posts', __( 'Sorry, you are not allowed to edit this item.' ) ); 1790 1790 } 1791 1791
Note: See TracChangeset
for help on using the changeset viewer.