[wp-trac] [WordPress Trac] #45179: Improve documentation for postbox_classes() and the postbox_classes_{$page}_{$id} hook within it
WordPress Trac
noreply at wordpress.org
Thu Oct 25 08:00:58 UTC 2018
#45179: Improve documentation for postbox_classes() and the
postbox_classes_{$page}_{$id} hook within it
-------------------------------+-----------------------------
Reporter: DrewAPicture | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 3.2
Severity: normal | Keywords: good-first-bug
Focuses: docs |
-------------------------------+-----------------------------
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
<?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 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45179>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list