WPDev.one
Core Function
View Source on Trac ↗

get_post_states()

get_post_states( mixed $post )

Retrieves an array of post states from a post.

Parameters 1 required

Name / Type Description
$post
WP_Post

The post to retrieve states for.

Required

Return Value

(string[])
Array of post state labels keyed by their state.

Function Information

Since Version
5.3.0
Source File
wp-admin/includes/template.php
Advertisement