WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#13017 closed task (blessed) (fixed)

Add add_meta_boxes hooks to all meta box implementations

Reported by: markjaquith Owned by:
Milestone: 3.0 Priority: high
Severity: normal Version: 3.0
Component: Administration Keywords:
Focuses: Cc:

Description

rboren says:

When the do_meta_boxes actions was moved out of do_meta_boxes() it
should have had its name changed.  add_meta_boxes was added in 3.0 to
be the hook that we should have renamed do_meta_boxes to be.  Anyhow,
by the time either add_meta_boxes or do_meta_boxes are called the
default meta boxes should be added.  We should add add_meta_boxes to
the comment and link forms as well and have plugins standardize on it
rather than do_meta_boxes.

Attachments (1)

13017.patch (3.9 KB) - added by hakre 4 years ago.
Whitespace and Documentation Issues, Code Improvements

Download all attachments as: .zip

Change History (4)

comment:2 hakre4 years ago

That changeset ([14044]) still uses both instead of one (at least there is one commented out code to remove). This is how I read the spec out of code and changes (see below). It's not complete and I have not designed that, so the original author should feel free to remove the black/grey areas. After a clear specification it should be no problem to provide a patch. Until then it's just a guess to provide one. So here is my first try of a spec, any kind of feedback is really appreciated:

Filter 1:
do_meta_boxes
MUST/SHALL be invoked each time ... (Is it a must or a shall? Under which conditions exactly?)

Filter 2:
do_meta_boxes_[name of the metabox]
MUST be invoked each time directly after add_meta_boxes had been invoked (e.g. next line of code).

Filter 3:
do_meta_boxes
MUST be invoked each time directly after Filter 2 has been invoked (e.g. next line of code).

Backround:
r6761 r6758

Is that helpfull ryan? What about adding a list of all meta-box names and their pages?

hakre4 years ago

Whitespace and Documentation Issues, Code Improvements

comment:3 ryan4 years ago

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

(In [14752]) Meta box and screen option phpdoc and cleanup. Props hakre. fixes #13017

Note: See TracTickets for help on using tickets.