Changeset 44165 for trunk/src/wp-admin/post.php
- Timestamp:
- 12/14/2018 05:11:14 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43815-43816
- Property svn:mergeinfo changed
-
trunk/src/wp-admin/post.php
r44048 r44165 17 17 wp_reset_vars( array( 'action' ) ); 18 18 19 if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post'] !== (int) $_POST['post_ID'] ) { 20 wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 ); 21 } elseif ( isset( $_GET['post'] ) ) { 19 if ( isset( $_GET['post'] ) ) { 22 20 $post_id = $post_ID = (int) $_GET['post']; 23 21 } elseif ( isset( $_POST['post_ID'] ) ) { … … 43 41 } 44 42 45 if ( isset( $_POST['post_type'] ) && $post && $post_type !== $_POST['post_type'] ) {46 wp_die( __( 'A post type mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );47 }48 49 43 if ( isset( $_POST['deletepost'] ) ) { 50 44 $action = 'delete'; … … 55 49 $sendback = wp_get_referer(); 56 50 if ( ! $sendback || 57 strpos( $sendback, 'post.php' ) !== false ||58 strpos( $sendback, 'post-new.php' ) !== false ) {51 strpos( $sendback, 'post.php' ) !== false || 52 strpos( $sendback, 'post-new.php' ) !== false ) { 59 53 if ( 'attachment' == $post_type ) { 60 54 $sendback = admin_url( 'upload.php' ); … … 173 167 } 174 168 169 if ( use_block_editor_for_post( $post ) ) { 170 include( ABSPATH . 'wp-admin/edit-form-blocks.php' ); 171 break; 172 } 173 175 174 if ( ! wp_check_post_lock( $post->ID ) ) { 176 175 $active_post_lock = wp_set_post_lock( $post->ID );
Note: See TracChangeset
for help on using the changeset viewer.