get_object_subtype()
get_object_subtype( string $object_type, int $object_id )
返回特定类型的给定对象ID的对象子类型。
Returns the object subtype for a given object ID of a specific type.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$object_type | (string) | 必需 | 对象元数据的类型是。接受“post”、“comment”、“term”、“user”或任何其他具有关联元表的对象类型。 |
$object_id | (int) | 必需 | 要检索其子类型的对象的ID。 |
返回(Return)
(string)对象子类型,如果未指定子类型,则为空string。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.9.8 | wp-includes/meta.php:1422 | 6 | 6 |
get_object_subtype() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_object_subtype/