Filters the default post display states used in the posts list table.
Parameters
\array<string,
string> $post_states A mapping of post state slugs to translated post state labels. E.g. array( 'draft' => __( 'Draft' ), 'sticky' => __( 'Sticky' ), ... ).
2360* with `function_exists()` before being used.2361*2362* @param array<string,string>$post_statesA mapping of post state slugs to translated post state labels.2363*E.g.`array( 'draft' => __( 'Draft' ), 'sticky' => __( 'Sticky' ), ... )`.2364* @param WP_Post$post The current post object.2365*/2366returnapply_filters('display_post_states',$post_states,$post);2367}23682369/**2370* Outputs the attachment media states asHTML.2371*2372* @since 3.2.0
History
Introduced in 2.8.0. 2 changes between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
6.9.7
Parameter `` added.verified against source
6.9.7
Parameter $post_states removed.verified against source
5.5.0
Also applied in the Customizer context. If any admin functions are used within the filter, their existence should be checked with function_exists() before being used.from the docblock
3.6.0
Added the $post parameter.from the docblock
2.8.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.