WordPress at a glance
filter is not described

display_media_states filter-hook . WP 3.2.0

Filters the default media display states for items in the Media list table.

Usage

add_filter( 'display_media_states', 'filter_function_name_5304', 10, 2 );
function filter_function_name_5304( $media_states, $post ){
	// filter...

	return $media_states;
}
$media_states(array)
An array of media states.
Default: 'Header Image', 'Background Image', 'Site Icon', 'Logo'
$post(WP_Post)
The current attachment object.

Notes

  • Since 4.8.0 Added the $post parameter.

Where the hook is called

_media_states()
wp-admin/includes/template.php 2011
$media_states = apply_filters( 'display_media_states', $media_states, $post );

Where the hook is used (in WP core)

wp-includes/widgets/class-wp-widget-media.php 116
add_filter( 'display_media_states', array( $this, 'display_media_state' ), 10, 2 );