Ticket #49239: media-upload.php.patch
| File media-upload.php.patch, 932 bytes (added by , 6 years ago) |
|---|
-
media-upload.php
33 33 $post_id = isset( $post_id ) ? (int) $post_id : 0; 34 34 35 35 // Require an ID for the edit screen. 36 if ( isset( $action ) && $action == 'edit'&& ! $ID ) {36 if ( isset( $action ) && 'edit' === $action && ! $ID ) { 37 37 wp_die( 38 38 '<h1>' . __( 'Something went wrong.' ) . '</h1>' . 39 39 '<p>' . __( 'Invalid item ID.' ) . '</p>', … … 81 81 $body_id = 'media-upload'; 82 82 83 83 // Let the action code decide how to handle the request. 84 if ( $tab == 'type' || $tab == 'type_url'|| ! array_key_exists( $tab, media_upload_tabs() ) ) {84 if ( 'type' === $tab || 'type_url' === $tab || ! array_key_exists( $tab, media_upload_tabs() ) ) { 85 85 /** 86 86 * Fires inside specific upload-type views in the legacy (pre-3.5.0) 87 87 * media popup based on the current tab.