WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11879 closed enhancement (wontfix)

Redirect in merged files instead of pure deletion?

Reported by: TobiasBg Owned by: ryan
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: dev-feedback
Focuses: Cc:

Description

Just a quick though that crossed my mind:

With the recent merging of files into other files, due to the Custom Post Typoes support (i.e. [12708], [12702] and more from #9674), several files like page.php, page-new.php have been deleted.

This could potentially break backward compatibility for some plugins that link to these files (i.e. a plugin that has a link to "create a new page").

My suggestion: Instead of plain deleting them, they could be reduced to something like a PHP redirect (header()) to the correct new page (with passed parameters from the query string conserved).
I.e. page.php could contain a header redirect to post.php?post_type=page(+rest of query string).)

At the same time the redirect should be marked as deprecated, so that noboby will set new links to it, but use the correct new file.

Change History (6)

comment:1 ryan4 years ago

We can add them later if needed. Right now I want to see what breaks with them removed.

comment:2 ryan4 years ago

  • Component changed from Multisite to General

comment:3 ryan4 years ago

We could also introduce get_add/create_post_link() to compliment get_edit_post_link().

comment:4 TobiasBg4 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Good enough for me then.
Some 404s by old plugins are not worth the trouble and overhead.

comment:5 TobiasBg4 years ago

  • Cc wordpress@… added

comment:6 nacin4 years ago

  • Milestone 3.0 deleted
Note: See TracTickets for help on using tickets.