postbox_classes_{$screen_id}_{$box_id} WordPress Filter Hook
The postbox_classes_{$screen_id}_{$box_id} hook is used to add custom classes to a postbox on a particular admin screen. This hook is useful for targeting specific postboxes and adding custom styles or functionality. For example, you could use this hook to add a 'hidden' class to a postbox, which could then be used to hide the postbox by default using CSS.
apply_filters( "postbox_classes_{$screen_id}_{$box_id}", string[] $classes ) #
Filters the postbox classes for a specific screen and box ID combo.
Description
The dynamic portions of the hook name, $screen_id
and $box_id
, refer to the screen ID and meta box ID, respectively.
Parameters
- $classes
(string[])An array of postbox classes.
Source
Changelog
Version | Description |
---|---|
3.2.0 | Introduced. |