get_page_statuses() WordPress Function
The get_page_statuses() function is a powerful tool that allows you to get the status of any page on your WordPress site. This function is especially useful for troubleshooting purposes, as it can help you identify pages that are not loading correctly or that are returning 404 errors.
get_page_statuses() #
Retrieve all of the WordPress support page statuses.
Description
Pages have a limited set of valid status values, this provides the post_status values and descriptions.
Return
(string[]) Array of page status labels keyed by their status.
Source
File: wp-includes/post.php
function get_page_statuses() { $status = array( 'draft' => __( 'Draft' ), 'private' => __( 'Private' ), 'publish' => __( 'Published' ), ); return $status; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |