Title: display_media_states
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘display_media_states’, string[] $media_states, WP_Post $post )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#wp--skip-link--target)

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

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#parameters)󠁿

 `$media_states`string[]

An array of media states. Default ‘Header Image’, ‘Background Image’, ‘Site Icon’,`'
Logo'`.

`$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)

The current attachment object.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'display_media_states', $media_states, $post );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/template.php#L2488)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/template.php#L2488-L2488)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#related)󠁿

| Used by | Description | 
| [get_media_states()](https://developer.wordpress.org/reference/functions/get_media_states/)`wp-admin/includes/template.php` |

Retrieves an array of media states from an attachment.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/display_media_states/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.8.0](https://developer.wordpress.org/reference/since/4.8.0/) | Added the `$post` parameter. | 
| [3.2.0](https://developer.wordpress.org/reference/since/3.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdisplay_media_states%2F)
before being able to contribute a note or feedback.