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.


Top ↑

Parameters

$classes

(string[])An array of postbox classes.


Top ↑

Source

File: wp-admin/includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More