首页 WordPress函数大全 get_post_type_object()

get_post_type_object()

2020-05-01 / 4812阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_post_type_object( string $post_type )

Retrieves a post type object by name.

描述

See also See also

  • register_post_type()

Top ↑

参数

$post_type

(string)
(Required)
The name of a registered post type.

返回

(WP_Post_Type|null) WP_Post_Type object if it exists, null otherwise.

大家谈论
    我的见解