Opened 5 months ago

Last modified 2 weeks ago

#23169 new enhancement

Introduce register_post_status_for_object_type

Reported by: kovshenin Owned by:
Priority: normal Milestone: Future Release
Component: General Version:
Severity: normal Keywords: needs-patch editorial-flow
Cc: danielbachhuber, sabreuse, sirzooro, DrewAPicture, justin@…, kovshenin, lol@…, maorhaz@…, pippin@…

Description

Similar to what register_taxonomy_for_object_type does with taxonomies.

Attachments (1)

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

Download all attachments as: .zip

Change History (12)

IMHO this should go to #12706.

  • Cc sabreuse added
  • Cc sirzooro added
  • Cc DrewAPicture added

comment:5 follow-up: ↓ 7   SergeyBiryukov5 months ago

Took a stab in 23169.patch.

  • Cc justin@… added

comment:7 in reply to: ↑ 5   kovshenin4 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.

  • Cc lol@… added
  • Cc maorhaz@… added
  • Cc pippin@… added
  • Milestone changed from 3.6 to Future Release
Note: See TracTickets for help on using tickets.