W3cubDocs

/WordPress

apply_filters( ‘get_post_status’, string $post_status, WP_Post $post )

Filters the post status.

Parameters

$post_statusstring
The post status.
$postWP_Post
The post object.

Source

return apply_filters( 'get_post_status', $post_status, $post );

Changelog

Version Description
5.7.0 The attachment post type is now passed through this filter.
4.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_post_status