hidden_columns filter-hookWP 4.4.0

Filters the list of hidden columns.

Usage

add_filter( 'hidden_columns', 'wp_kama_hidden_columns_filter', 10, 3 );

/**
 * Function for `hidden_columns` filter-hook.
 * 
 * @param string[]  $hidden       Array of IDs of hidden columns.
 * @param WP_Screen $screen       WP_Screen object of the current screen.
 * @param bool      $use_defaults Whether to show the default columns.
 *
 * @return string[]
 */
function wp_kama_hidden_columns_filter( $hidden, $screen, $use_defaults ){

	// filter...
	return $hidden;
}
$hidden(string[])
Array of IDs of hidden columns.
$screen(WP_Screen)
WP_Screen object of the current screen.
$use_defaults(true|false)
Whether to show the default columns.

Changelog

Since 4.4.0 Introduced.
Since 4.4.1 Added the use_defaults parameter.

Where the hook is called

get_hidden_columns()
hidden_columns
wp-admin/includes/screen.php 84
return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults );

Where the hook is used in WordPress

Usage not found.