diff --git a/src/wp-admin/edit.php b/src/wp-admin/edit.php
index d9333b9778..4f0e1fa5fc 100644
a
|
b
|
foreach ( array( 'p', 'attachment_id', 'page_id' ) as $_redirect ) { |
56 | 56 | } |
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"; |
62 | 62 | $post_new_file = "post-new.php?post_type=$post_type"; |
… |
… |
if ( $doaction ) { |
80 | 80 | $sendback = admin_url( $post_new_file ); |
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'] ); |
86 | 86 | // Validate the post status exists. |
… |
… |
if ( $doaction ) { |
155 | 155 | wp_die( __( 'Sorry, you are not allowed to delete this item.' ) ); |
156 | 156 | } |
157 | 157 | |
158 | | if ( $post_del->post_type == 'attachment' ) { |
| 158 | if ( 'attachment' === $post_del->post_type ) { |
159 | 159 | if ( ! wp_delete_attachment( $post_id ) ) { |
160 | 160 | wp_die( __( 'Error in deleting.' ) ); |
161 | 161 | } |
… |
… |
if ( 'wp_block' === $post_type ) { |
207 | 207 | |
208 | 208 | $title = $post_type_object->labels->name; |
209 | 209 | |
210 | | if ( 'post' == $post_type ) { |
| 210 | if ( 'post' === $post_type ) { |
211 | 211 | get_current_screen()->add_help_tab( |
212 | 212 | array( |
213 | 213 | 'id' => 'overview', |
… |
… |
if ( 'post' == $post_type ) { |
260 | 260 | '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' |
261 | 261 | ); |
262 | 262 | |
263 | | } elseif ( 'page' == $post_type ) { |
| 263 | } elseif ( 'page' === $post_type ) { |
264 | 264 | get_current_screen()->add_help_tab( |
265 | 265 | array( |
266 | 266 | 'id' => 'overview', |
… |
… |
foreach ( $bulk_counts as $message => $count ) { |
382 | 382 | $messages[] = sprintf( $bulk_messages['post'][ $message ], number_format_i18n( $count ) ); |
383 | 383 | } |
384 | 384 | |
385 | | if ( $message == 'trashed' && isset( $_REQUEST['ids'] ) ) { |
| 385 | if ( 'trashed' === $message && isset( $_REQUEST['ids'] ) ) { |
386 | 386 | $ids = preg_replace( '/[^0-9,]/', '', $_REQUEST['ids'] ); |
387 | 387 | $messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", 'bulk-posts' ) ) . '">' . __( 'Undo' ) . '</a>'; |
388 | 388 | } |