首页 WordPress函数大全 get_object_term_cache()

get_object_term_cache()

2020-05-01 / 4174阅 / 悠然

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

get_object_term_cache( int $id, string $taxonomy )

Retrieves the cached term objects for the given object ID.

描述

Upstream functions (like get_the_terms() and is_object_in_term()) are responsible for populating the object-term relationship cache. The current function>

参数

$id

(int)
(Required)
Term object ID, for example a post, comment, or user ID.

$taxonomy

(string)
(Required)
Taxonomy name.

返回

(bool|WP_Term[]|WP_Error) Array of WP_Term objects, if cached. False if cache is empty for $taxonomy and $id. WP_Error if get_term() returns an error object for any term.

大家谈论
    我的见解