WordPress.org

Make WordPress Core

Changeset 28729


Ignore:
Timestamp:
06/10/2014 06:47:57 PM (7 years ago)
Author:
wonderboymusic
Message:

edit.php?post_type=attachment should redirect to upload.php. Without the redirect, the user is presented with an empty list table. There are probably other issues to address overall, but this accomplishes what the ticket wants.

Props knutsp.
Fixes #27951.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit.php

    r27469 r28729  
    1212if ( ! $typenow )
    1313    wp_die( __( 'Invalid post type' ) );
     14
     15if ( 'attachment' === $typenow ) {
     16    if ( wp_redirect( admin_url( 'upload.php' ) ) ) {
     17        exit;
     18    }
     19}
    1420
    1521$post_type = $typenow;
Note: See TracChangeset for help on using the changeset viewer.