display_media_states WordPress Filter Hook

The display_media_states hook is used to add additional states to attachments. These states are displayed in the Media Library list view, in the Attachment Details modal, and in the Edit Media screen.

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

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


Parameters

$media_states

(string[])An array of media states. Default 'Header Image', 'Background Image', 'Site Icon', 'Logo'.

$post

(WP_Post)The current attachment object.


Top ↑

Source

File: wp-admin/includes/template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.8.0Added the $post parameter.
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.