Make WordPress Core

Opened 8 years ago

Closed 6 years ago

#36206 closed enhancement (fixed)

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

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

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 8 years ago.
36206.2.patch (3.5 KB) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (12)

#1 @sebastian.pisula
8 years ago

  • Keywords has-patch added

#2 @ericlewis
8 years ago

  • Milestone changed from Awaiting Review to Future Release

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

#3 @SergeyBiryukov
7 years ago

#40182 was marked as a duplicate.

#4 follow-up: @SergeyBiryukov
7 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from Future Release to 4.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 7 years ago by SergeyBiryukov (previous) (diff)

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


7 years ago

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


7 years ago

#7 @jbpaul17
7 years ago

  • Milestone changed from 4.8 to 4.8.1

Punting to 4.8.1 per today's bug scrub.

#8 @SergeyBiryukov
7 years ago

  • Milestone changed from 4.8.1 to 4.9

#9 in reply to: ↑ 4 @SergeyBiryukov
6 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
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

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.