Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#25216 closed enhancement (fixed)

Make the redirect from post-new to media-new filterable

Reported by: drewapicture's profile DrewAPicture Owned by: nacin's profile nacin
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.5
Component: Administration Keywords: has-patch
Focuses: Cc:

Description (last modified by DrewAPicture)

Can we please make it possible to cancel the redirect from post-new.php?post_type=attachment to media-new.php added in 3.5?

There's a nice UI on that screen there I'd like to be able to leverage for something, but it's currently inaccessible due to the redirect and exit in post-new.php.

Patch attached.

Attachments (1)

25216.diff (604 bytes) - added by DrewAPicture 11 years ago.

Download all attachments as: .zip

Change History (5)

@DrewAPicture
11 years ago

#1 @DrewAPicture
11 years ago

  • Description modified (diff)

In 25216.diff I simply check whether the redirect was successful, then exit. This clears the way to "canceling" the redirect via the wp_redirect filter.

#2 @SergeyBiryukov
11 years ago

  • Component changed from General to Administration
  • Milestone changed from Awaiting Review to 3.7

Related: [22777]

#3 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 25453:

Let the wp_redirect to media-new.php from post-new.php?post_type=attachment be canceled using the wp_redirect filter.

props DrewAPicture.
fixes #25216.

#4 @nacin
11 years ago

This seems like the $parent_file and $submenu_file would still need to be set up. Fine with leaving this to plugins.

Note: See TracTickets for help on using tickets.