Opened 2 years ago
Closed 2 years ago
#45179 closed defect (bug) (fixed)
Improve documentation for postbox_classes() and the postbox_classes_{$page}_{$id} hook within it
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | 3.2 |
Component: | Posts, Post Types | Keywords: | good-first-bug has-patch needs-refresh |
Focuses: | docs | Cc: |
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
@
2 years ago
- Milestone changed from Future Release to 5.1
- Owner set to sharifkiberu
- Status changed from new to 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.
Note: See
TracTickets for help on using
tickets.
@DrewAPicture Updated documentation in patch