Changeset 45759 for trunk/src/wp-admin/edit.php
- Timestamp:
- 08/07/2019 11:40:00 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit.php
r45674 r45759 57 57 unset( $_redirect ); 58 58 59 if ( 'post' != $post_type ) {59 if ( 'post' !== $post_type ) { 60 60 $parent_file = "edit.php?post_type=$post_type"; 61 61 $submenu_file = "edit.php?post_type=$post_type"; … … 81 81 } 82 82 83 if ( 'delete_all' == $doaction ) {83 if ( 'delete_all' === $doaction ) { 84 84 // Prepare for deletion of all posts with a specified post status (i.e. Empty trash). 85 85 $post_status = preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['post_status'] ); … … 157 157 } 158 158 159 if ( $post_del->post_type == 'attachment') {159 if ( 'attachment' === $post_del->post_type ) { 160 160 if ( ! wp_delete_attachment( $post_id ) ) { 161 161 wp_die( __( 'Error in deleting.' ) ); … … 209 209 $title = $post_type_object->labels->name; 210 210 211 if ( 'post' == $post_type ) {211 if ( 'post' === $post_type ) { 212 212 get_current_screen()->add_help_tab( 213 213 array( … … 262 262 ); 263 263 264 } elseif ( 'page' == $post_type ) {264 } elseif ( 'page' === $post_type ) { 265 265 get_current_screen()->add_help_tab( 266 266 array( … … 384 384 } 385 385 386 if ( $message == 'trashed'&& isset( $_REQUEST['ids'] ) ) {386 if ( 'trashed' === $message && isset( $_REQUEST['ids'] ) ) { 387 387 $ids = preg_replace( '/[^0-9,]/', '', $_REQUEST['ids'] ); 388 388 $messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", 'bulk-posts' ) ) . '">' . __( 'Undo' ) . '</a>';
Note: See TracChangeset
for help on using the changeset viewer.