Ticket #13017 (closed task (blessed): fixed)

Opened 2 years ago

Last modified 2 years ago

Add add_meta_boxes hooks to all meta box implementations

Reported by: markjaquith Owned by:
Priority: high Milestone: 3.0
Component: Administration Version: 3.0
Severity: normal Keywords:
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

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

Change History

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?

hakre2 years ago

Whitespace and Documentation Issues, Code Improvements

comment:3   ryan2 years ago

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

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

Note: See TracTickets for help on using tickets.