postbox_classes_(screen_id)_(box_id) хук-фильтрWP 3.2.0

Filters the postbox classes for a specific screen and box ID combo.

The dynamic portions of the hook name, $screen_id and $box_id, refer to the screen ID and meta box ID, respectively.

Использование

add_filter( 'postbox_classes_(screen_id)_(box_id)', 'wp_kama_postbox_classes_screen_id_box_filter' );

/**
 * Function for `postbox_classes_(screen_id)_(box_id)` filter-hook.
 * 
 * @param string[] $classes An array of postbox classes.
 *
 * @return string[]
 */
function wp_kama_postbox_classes_screen_id_box_filter( $classes ){

	// filter...
	return $classes;
}
$classes(string[])
An array of postbox classes.

Список изменений

С версии 3.2.0 Введена.

Где вызывается хук

postbox_classes()
postbox_classes_(screen_id)_(box_id)
wp-admin/includes/post.php 1369
$classes = apply_filters( "postbox_classes_{$screen_id}_{$box_id}", $classes );

Где используется хук в WordPress

wp-admin/includes/dashboard.php 32
add_filter( 'postbox_classes_dashboard_dashboard_browser_nag', 'dashboard_browser_nag_class' );
wp-admin/includes/dashboard.php 47
add_filter( 'postbox_classes_dashboard_dashboard_php_nag', 'dashboard_php_nag_class' );