Opened 8 years ago
Closed 7 years ago
#45179 closed defect (bug) (fixed)
Improve documentation for postbox_classes() and the postbox_classes_{$page}_{$id} hook within it
| Reported by: | DrewAPicture | Owned by: | sharifkiberu |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.2 |
| Component: | Posts, Post Types | Version: | 3.2 |
| Severity: | normal | Keywords: | good-first-bug has-patch needs-refresh |
| Cc: | Focuses: | docs |
Description
As pointed out on the Code Reference by @simonrcodrington, documentation for the $page and $id values in the postbox_classes_{$page}_{$id} hook is not quite correct.
$page actually represents the screen ID and $id represents the metabox ID. We should also improve the DocBlock for the postbox_classes() parent function by adding missing parameter descriptions.
<?php /** * Filters the postbox classes for a specific screen and screen ID combo. * * The dynamic portions of the hook name, `$page` and `$id`, refer to * the screen and screen ID, respectively. * * @since 3.2.0 * * @param string[] $classes An array of postbox classes. */ $classes = apply_filters( "postbox_classes_{$page}_{$id}", $classes );
Attachments (1)
Change History (6)
#3
@
8 years ago
- Milestone Future Release → 5.1
- Owner set to
- Status new → assigned
Assigning the ticket to mark the good-first-bug as "claimed".
Hi @sharifkiberu, thanks for the patch! I think we still need adjustments to the postbox_classes() adding missing parameter descriptions and that should do it.
Trunk development is still closed pending the 5.0 release, but we should be able to get this in with 5.1.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@DrewAPicture Updated documentation in patch