|string|WP_Error */ public function wpGetPostTerms(int $postId, string $taxonomy, array $args = []) { return wp_get_post_terms($postId, $taxonomy, $args); } /** * @param int|\WP_Comment $comment * @return false|string */ public function wpGetCommentStatus($comment) { return wp_get_comment_status($comment); } /** * @return string[]|\WP_Post_Type[] */ public function getPostTypes(array $args = [], string $output = 'names', string $operator = 'and'): array { return get_post_types($args, $output, $operator); } public function postTypeSupports(string $type, string $feature): bool { return post_type_supports($type, $feature); } /** * @return string[]|\WP_Taxonomy[] */ public function getTaxonomies(array $args = [], string $output = 'names', string $operator = 'AND'): array { return get_taxonomies($args, $output, $operator); } /** * @return mixed */ public function getCommentMeta(int $commentId, string $key = '', bool $isSingle = false) { return get_comment_meta($commentId, $key, $isSingle); } /** * @param int|WP_Term|object $term * @param string $taxonomy * @param string $output * @param string $filter * @return WP_Term|array|WP_Error|null */ public function getTerm($term, string $taxonomy = '', string $output = OBJECT, string $filter = 'raw') { return get_term($term, $taxonomy, $output, $filter); } /** @return \WP_Taxonomy|false */ public function getTaxonomy(string $name) { return get_taxonomy($name); } /** @return int|string */ public function currentTime(string $type, bool $gmt = false) { return current_time($type, $gmt); } /** * @param string $field * @param string|int $value * @return false|WP_User */ public function getUserBy(string $field, $value) { return get_user_by($field, $value); } }