Make WordPress Core

Ticket #49239: media-upload.php.patch

File media-upload.php.patch, 932 bytes (added by pikamander2, 6 years ago)
  • media-upload.php

     
    3333$post_id = isset( $post_id ) ? (int) $post_id : 0;
    3434
    3535// Require an ID for the edit screen.
    36 if ( isset( $action ) && $action == 'edit' && ! $ID ) {
     36if ( isset( $action ) && 'edit' === $action && ! $ID ) {
    3737        wp_die(
    3838                '<h1>' . __( 'Something went wrong.' ) . '</h1>' .
    3939                '<p>' . __( 'Invalid item ID.' ) . '</p>',
     
    8181$body_id = 'media-upload';
    8282
    8383// Let the action code decide how to handle the request.
    84 if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab, media_upload_tabs() ) ) {
     84if ( 'type' === $tab || 'type_url' === $tab || ! array_key_exists( $tab, media_upload_tabs() ) ) {
    8585        /**
    8686         * Fires inside specific upload-type views in the legacy (pre-3.5.0)
    8787         * media popup based on the current tab.