WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 3 months ago

#23169 new enhancement

Introduce register_post_status_for_object_type

Reported by: kovshenin Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: needs-patch editorial-flow
Focuses: Cc:

Description

Similar to what register_taxonomy_for_object_type does with taxonomies.

Attachments (1)

23169.patch (1.6 KB) - added by SergeyBiryukov 15 months ago.

Download all attachments as: .zip

Change History (14)

comment:1 sirzooro15 months ago

IMHO this should go to #12706.

comment:2 sabreuse15 months ago

  • Cc sabreuse added

comment:3 sirzooro15 months ago

  • Cc sirzooro added

comment:4 DrewAPicture15 months ago

  • Cc DrewAPicture added

SergeyBiryukov15 months ago

comment:5 follow-up: SergeyBiryukov15 months ago

Took a stab in 23169.patch.

comment:6 greenshady15 months ago

  • Cc justin@… added

comment:7 in reply to: ↑ 5 kovshenin15 months ago

  • Cc kovshenin added

Replying to SergeyBiryukov: In 23169.patch you set the default post types to post and page, but there may be existing plugins that rely on their registered post status to apply to all post types, including custom post types. For backwards compatibility, I think that if the post_type/object_type argument is omitted in register_post_status, we should register for all post statuses, which can also be tricky, because at the time of calling, some post types might not be registered yet.

comment:8 sc0ttkclark14 months ago

  • Cc lol@… added

comment:9 maor13 months ago

  • Cc maorhaz@… added

comment:10 mordauk11 months ago

  • Cc pippin@… added

comment:11 SergeyBiryukov11 months ago

  • Milestone changed from 3.6 to Future Release

comment:12 soulseekah5 months ago

  • Cc gennady@… added

comment:13 nacin3 months ago

  • Component changed from General to Post Types
Note: See TracTickets for help on using tickets.