WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#26698 closed defect (bug) (fixed)

Improve Documentation of add_meta_box()

Reported by: philiparthurmoore Owned by: nacin
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch commit
Focuses: docs Cc:

Description

The DocBlocks for add_meta_box do not mention side as an acceptable $context value; ​Codex does. The attached patch fixes this discrepancy.

Attachments (3)

improve-add_meta_box-docblocks.diff (1.0 KB) - added by philiparthurmoore 7 years ago.
26698.diff (2.4 KB) - added by DrewAPicture 7 years ago.
26698.2.diff (2.7 KB) - added by DrewAPicture 7 years ago.
Example contexts

Download all attachments as: .zip

Change History (9)

#1 @philiparthurmoore
7 years ago

  • Cc philip@… added

@DrewAPicture
7 years ago

#2 @DrewAPicture
7 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.9

Might as well fix the rest of the phpdoc while we're in there. This is done in 26698.diff

#3 @nacin
7 years ago

The only weird thing about this is that these contexts are specified by the particular screen. They are arbitrary. Some pages that implement meta boxes won't have "advanced" and some won't have "side". Not sure what do here, but perhaps it could be made clear hat those are for the post edit screen. We could even spell out the comments screen (normal/side I think) which is the only other core screen (except the dashboard) that uses meta boxes, I think.

@DrewAPicture
7 years ago

Example contexts

#4 @DrewAPicture
7 years ago

  • Keywords commit added

26698.2.diff incorporates the $context description feedback from @nacin in comment:3. I think that should be enough.

#5 @nacin
7 years ago

  • Component changed from Inline Docs to Administration
  • Focuses docs added

#6 @nacin
7 years ago

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

In 27132:

Improve parameter documentation of add_meta_box().

props philiparthurmoore, DrewAPicture.
fixes #26698.

Note: See TracTickets for help on using tickets.