Changeset 63672
- Timestamp:
- 09/17/2026 05:39:44 PM (11 hours ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r63497 r63672 23 23 if ( empty( $post_data ) ) { 24 24 $post_data = &$_POST; 25 } 26 27 /* 28 * A raw `ID` on the create path (no `post_ID`) is an attempt to overwrite an 29 * existing post while bypassing the per-post capability checks below, which only 30 * run on the update path. Reject it outright: legitimate post creation never 31 * carries an `ID`. 32 */ 33 if ( ! $update && ! empty( $post_data['ID'] ) ) { 34 if ( 'page' === $post_data['post_type'] ) { 35 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) ); 36 } else { 37 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) ); 38 } 25 39 } 26 40
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)