Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#36206 closed enhancement (fixed)

Added the `$post` parameter in attachment_submitbox_misc_actions and post_submitbox_start action

Reported by: sebastian.pisula Owned by: SergeyBiryukov
Priority: normal Milestone: 4.9
Component: Posts, Post Types Version:
Severity: normal Keywords: has-patch 2nd-opinion
Cc: Focuses:

Description

Added the $post parameter in attachment_submitbox_misc_actions and post_submitbox_start action

Attachments (2)

36206.patch (981 bytes ) - added by sebastian.pisula 10 years ago.
36206.2.patch (3.5 KB ) - added by SergeyBiryukov 9 years ago.

Download all attachments as: .zip

Change History (12)

#1 @sebastian.pisula
10 years ago

  • Keywords has-patch added

#2 @ericlewis
10 years ago

  • Milestone Awaiting ReviewFuture Release

$post is passed through post_submitbox_misc_actions action callbacks since r34895. Seems like these would be good for parity.

#3 @SergeyBiryukov
9 years ago

#40182 was marked as a duplicate.

#4 follow-up: @SergeyBiryukov
9 years ago

  • Keywords 2nd-opinion added
  • Milestone Future Release4.8

36206.2.patch is a refresh that includes @tosho's patch from #40182 (with @since entry).

It also passes $post to media_submitbox_misc_sections and audio_submitbox_misc_sections actions for consistency.

Note that post_submitbox_start is also used in link_submit_meta_box(), which doesn't have a WP_Post object, but has a link object instead. Should we pass the link object in that case or just null? Current patch does the former.

Last edited 9 years ago by SergeyBiryukov (previous) (diff)

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


9 years ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


9 years ago

#7 @jbpaul17
9 years ago

  • Milestone 4.84.8.1

Punting to 4.8.1 per today's bug scrub.

#8 @SergeyBiryukov
9 years ago

  • Milestone 4.8.14.9

#9 in reply to: ↑ 4 @SergeyBiryukov
9 years ago

Replying to SergeyBiryukov:

Note that post_submitbox_start is also used in link_submit_meta_box(), which doesn't have a WP_Post object, but has a link object instead. Should we pass the link object in that case or just null? Current patch does the former.

On second thought, the latter makes more sense.

#10 @SergeyBiryukov
9 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 41581:

Posts, Post Types: Pass $post parameter to post_submitbox_start, attachment_submitbox_misc_actions, media_submitbox_misc_sections, audio_submitbox_misc_sections filters.

Props sebastian.pisula, SergeyBiryukov.
Fixes #36206.

Note: See TracTickets for help on using tickets.