Make WordPress Core

Changeset 22777


Ignore:
Timestamp:
11/21/2012 05:40:53 PM (12 years ago)
Author:
nacin
Message:

Redirect post-new.php?post_type=attachment to media-new.php. see #22491, #22083, #21391.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post-new.php

    r22725 r22777  
    2222    $parent_file = 'edit.php';
    2323    $submenu_file = 'post-new.php';
     24} elseif ( 'attachment' == $post_type ) {
     25    wp_redirect( admin_url( 'media-new.php' ) );
     26    exit;
    2427} else {
    2528    $submenu_file = "post-new.php?post_type=$post_type";
Note: See TracChangeset for help on using the changeset viewer.