WordPress.org

Make WordPress Core

Opened 4 years ago

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

Download all attachments as: .zip

Change History (12)

#1 @sebastian.pisula
4 years ago

  • Keywords has-patch added

#2 @ericlewis
4 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
3 years ago

#40182 was marked as a duplicate.

#4 follow-up: @SergeyBiryukov
3 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 3 years ago by SergeyBiryukov (previous) (diff)

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


2 years ago

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


2 years ago

#7 @jbpaul17
2 years ago

  • Milestone changed from 4.8 to 4.8.1

Punting to 4.8.1 per today's bug scrub.

#8 @SergeyBiryukov
2 years ago

  • Milestone changed from 4.8.1 to 4.9

#9 in reply to: ↑ 4 @SergeyBiryukov
2 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
2 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.