Changeset 63715 for branches/4.7/src/wp-admin/includes/post.php
- Timestamp:
- 09/17/2026 09:15:04 PM (10 hours ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-admin/includes/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
- Property svn:mergeinfo changed
/trunk merged: 63656-63657,63659-63660,63665,63669,63672
- Property svn:mergeinfo changed
-
branches/4.7/src/wp-admin/includes/post.php
r54566 r63715 23 23 if ( empty($post_data) ) 24 24 $post_data = &$_POST; 25 26 /* 27 * A raw `ID` on the create path (no `post_ID`) is an attempt to overwrite an 28 * existing post while bypassing the per-post capability checks below, which only 29 * run on the update path. Reject it outright: legitimate post creation never 30 * carries an `ID`. 31 */ 32 if ( ! $update && ! empty( $post_data['ID'] ) ) { 33 if ( 'page' === $post_data['post_type'] ) { 34 return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) ); 35 } else { 36 return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) ); 37 } 38 } 25 39 26 40 if ( $update )
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)