Make WordPress Core

Ticket #27951: 27951.diff

File 27951.diff, 424 bytes (added by knutsp, 12 years ago)
  • edit.php

     
    1515$post_type = $typenow;
    1616$post_type_object = get_post_type_object( $post_type );
    1717
     18if ( 'attachment' == $post_type ) {
     19        if ( wp_redirect( admin_url( 'upload.php' ) ) ) {
     20                exit;
     21        }
     22}
     23
    1824if ( ! $post_type_object )
    1925        wp_die( __( 'Invalid post type' ) );
    2026