WordPress.org

Make WordPress Core

Opened 7 years ago

Last modified 5 months ago

#23169 new enhancement

Introduce register_post_status_for_object_type

Reported by: kovshenin Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: needs-patch
Focuses: Cc:
PR Number:

Description

Similar to what register_taxonomy_for_object_type does with taxonomies.

Attachments (1)

23169.patch (1.6 KB) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (15)

#1 @sirzooro
7 years ago

IMHO this should go to #12706.

#2 @sabreuse
7 years ago

  • Cc sabreuse added

#3 @sirzooro
7 years ago

  • Cc sirzooro added

#4 @DrewAPicture
7 years ago

  • Cc DrewAPicture added

#5 follow-up: @SergeyBiryukov
7 years ago

Took a stab in 23169.patch.

#6 @greenshady
7 years ago

  • Cc justin@… added

#7 in reply to: ↑ 5 @kovshenin
7 years 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.

#8 @sc0ttkclark
7 years ago

  • Cc lol@… added

#9 @maor
7 years ago

  • Cc maorhaz@… added

#10 @mordauk
6 years ago

  • Cc pippin@… added

#11 @SergeyBiryukov
6 years ago

  • Milestone changed from 3.6 to Future Release

#12 @soulseekah
6 years ago

  • Cc gennady@… added

#13 @nacin
6 years ago

  • Component changed from General to Post Types

#14 @chriscct7
4 years ago

  • Keywords editorial-flow removed
Note: See TracTickets for help on using tickets.