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.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.7.0The attachment post type is now passed through this filter.
4.4.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.

Show More
Show More