get_post_status_object( string $post_status )
Retrieve a post status object by name.
描述
参数
- $post_status
-
(string)
(Required)
The name of a registered post status.
返回值
(object|null) A post status object.
源代码
File: wp-includes/post.php
function get_post_status_object( $post_status ) {
global $wp_post_statuses;
if ( empty($wp_post_statuses[$post_status]) )
return null;
return $wp_post_statuses[$post_status];
}
更新日志
Version | 描述 |
---|---|
3.0.0 | Introduced. |
相关函数
Used By
-
wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php:
WP_REST_Post_Statuses_Controller::get_items() -
wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php:
WP_REST_Post_Statuses_Controller::get_item_permissions_check() -
wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php:
WP_REST_Post_Statuses_Controller::get_item() -
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:
WP_REST_Posts_Controller::check_read_permission() -
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:
WP_REST_Posts_Controller::handle_status_param() -
wp-includes/comment.php:
wp_handle_comment_submission() -
wp-admin/includes/post.php:
_wp_translate_postdata() -
wp-includes/capabilities.php:
map_meta_cap() -
wp-includes/class-wp-customize-manager.php:
WP_Customize_Manager::save() -
wp-includes/class-wp.php:
WP::parse_request() -
wp-includes/class-wp-query.php:
WP_Query::get_posts() -
wp-includes/rewrite.php:
url_to_postid() -
wp-includes/class-wp-xmlrpc-server.php:
wp_xmlrpc_server::_insert_post()
Show 8 more used by
Hide more used by
你可能对这些文章感兴趣:
- wordpress函数has_meta()用法示例
- wordpress函数has_filter()用法示例
- wordpress函数has_excerpt()用法示例
- wordpress函数has_header_video()用法示例
- wordpress函数has_category()用法示例
- wordpress函数has_custom_logo()用法示例
- wordpress函数has_custom_header()用法示例
- wordpress函数hash_hmac()用法示例
- wordpress函数grant_super_admin()用法示例
- wordpress函数get_the_post_thumbnail_url()用法示例
- wordpress函数hash_equals()用法示例
- wordpress函数got_url_rewrite()用法示例
- wordpress函数gzip_compression()用法示例
- wordpress函数got_mod_rewrite()用法示例
如有疑问,请前往问答中心反馈!
反馈