Changeset 47808 for trunk/src/wp-admin/post.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/post.php
r47550 r47808 50 50 if ( isset( $_POST['deletepost'] ) ) { 51 51 $action = 'delete'; 52 } elseif ( isset( $_POST['wp-preview'] ) && 'dopreview' == $_POST['wp-preview'] ) {52 } elseif ( isset( $_POST['wp-preview'] ) && 'dopreview' === $_POST['wp-preview'] ) { 53 53 $action = 'preview'; 54 54 } … … 58 58 false !== strpos( $sendback, 'post.php' ) || 59 59 false !== strpos( $sendback, 'post-new.php' ) ) { 60 if ( 'attachment' == $post_type ) {60 if ( 'attachment' === $post_type ) { 61 61 $sendback = admin_url( 'upload.php' ); 62 62 } else { … … 112 112 case 'post': 113 113 check_admin_referer( 'add-' . $post_type ); 114 $post_id = 'postajaxpost' == $action ? edit_post() : write_post();114 $post_id = 'postajaxpost' === $action ? edit_post() : write_post(); 115 115 redirect_post( $post_id ); 116 116 exit(); … … 140 140 } 141 141 142 if ( 'trash' == $post->post_status ) {142 if ( 'trash' === $post->post_status ) { 143 143 wp_die( __( 'You can’t edit this item because it is in the Trash. Please restore it and try again.' ) ); 144 144 } … … 152 152 153 153 $post_type = $post->post_type; 154 if ( 'post' == $post_type ) {154 if ( 'post' === $post_type ) { 155 155 $parent_file = 'edit.php'; 156 156 $submenu_file = 'edit.php'; 157 157 $post_new_file = 'post-new.php'; 158 } elseif ( 'attachment' == $post_type ) {158 } elseif ( 'attachment' === $post_type ) { 159 159 $parent_file = 'upload.php'; 160 160 $submenu_file = 'upload.php';
Note: See TracChangeset
for help on using the changeset viewer.