Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#23174 closed defect (bug) (duplicate)

Complete register_post_status() API

Reported by: danielbachhuber's profile danielbachhuber Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: needs-patch
Focuses: Cc:


register_post_status(), introduced in r12719, isn't fully functional. Registering a custom post status produces incomplete and unexpected results. #12706 has been a long-standing ticket to fix things up but hasn't ever been committed, I suspect, because it's trying to do to much.

Instead, we should complete the register_post_status() API with the bare minimum of code. A user should be able to register a custom post status using any of the existing arguments. The admin UI (including post submit box and quick edit) should reflect this new custom post status. Furthermore, there are many hard-coded references to 'draft' and 'pending' statuses in core that should properly use the post status API.

Once we've knocked this out, enhancements like #23169, #23168, and others should be much easier to stomach.

Change History (3)

#1 @SergeyBiryukov
11 years ago

  • Keywords editorial-flow added
  • Milestone changed from Awaiting Review to 3.6

#2 @scribu
11 years ago

  • Cc scribu added

#3 @nacin
11 years ago

  • Keywords editorial-flow removed
  • Milestone 3.6 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

It's not that #12706 is trying to do too much. Based on three years of conversation and patches, it's just trying to implement the same scope laid out here: fully implement a custom post status API, including implementing it across core.

It's simply been determined that it is not at all a small feat. That scope is about 98% of what the hefty ticket:12706:12706-1.diff is trying to do. So I'm closing this one out in favor of #12706, which already has lots of history and quite a few followers. And while the current patch is huge, may be tough to understand, and has a number of failings with its approach, it is worth a careful study. It is basically a map of every area of core that needs to change, one way or another.

New, bite-sized tickets could be spun out of #12706 depending on the direction that ticket goes over the coming weeks.

Note: See TracTickets for help on using tickets.