get_post_status WordPress Filter Hook
The get_post_status WordPress hook is a very powerful and useful tool. It allows you to change the post status of a post or page on your site. This can be very useful if you want to change the post status of a post or page that is no longer needed or if you want to change the post status of a post or page that is not working correctly.
apply_filters( 'get_post_status', string $post_status , WP_Post $post ) #
Filters the post status.
Parameters
- $post_status
(string)The post status.
- $post
(WP_Post)The post object.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
5.7.0 | The attachment post type is now passed through this filter. |
4.4.0 | Introduced. |