WordPress.org

Make WordPress Core

Opened 4 weeks ago

Closed 3 weeks ago

#54045 closed defect (bug) (fixed)

Editor/Docs: The place where `post_submitbox_minor_actions` is fired is misleading in the related DocBlock

Reported by: audrasjb Owned by: SergeyBiryukov
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch 2nd-opinion
Focuses: docs Cc:

Description

The place where post_submitbox_minor_actions is fired is misleading in the related DocBlock.

It says "Fires before the post time/date setting in the Publish meta box" but it fires right at the end of the .minor-publishing-actions <div> element.

I think we should rather indicate that it fires "after the save and preview settings in the Publish meta box" or "before the post status setting in the Publish meta box". Both are accurate, but I think the first one is better as the action hook is placed inside the <div> that contains both the save and preview settings.

Please also props @bedas for their feedback on DevHub user contributed notes.

Attachments (2)

54045.after-save-preview.diff (481 bytes) - added by audrasjb 4 weeks ago.
First proposal: Fires after the Save and Preview settings
54045.before-post-status.2.diff (476 bytes) - added by audrasjb 4 weeks ago.
Another proposal: Fires before the post status setting

Download all attachments as: .zip

Change History (5)

@audrasjb
4 weeks ago

First proposal: Fires after the Save and Preview settings

@audrasjb
4 weeks ago

Another proposal: Fires before the post status setting

#1 @audrasjb
4 weeks ago

  • Keywords has-patch 2nd-opinion added

Added two patches to handle both possibilities, but I'd say the first one is the more accurate (see ticket description).

#2 @SergeyBiryukov
3 weeks ago

  • Milestone changed from Awaiting Review to 5.9

#3 @SergeyBiryukov
3 weeks ago

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

In 51732:

Docs: Correct the post_submitbox_minor_actions hook description.

The action fires after the Save Draft (or Save as Pending) and Preview (or Preview Changes) buttons in the Publish meta box.

The previous description stated that the action fires before the post date/time setting, which was not quite correct, as there are also post status and visibility settings between the action and the date/time setting.

Follow-up to [34895].

Props bedas, audrasjb.
Fixes #54045.

Note: See TracTickets for help on using tickets.