首页 WordPress函数大全 get_posts_by_author_sql()

get_posts_by_author_sql()

2020-05-01 / 2828阅 / 悠然

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

get_posts_by_author_sql( string|string[] $post_type, bool $full = true, int $post_author = null, bool $public_only = false )

Retrieve the post SQL based>

Contents

  • Description
    • See also
    • Parameters
    • Return
    • Source
    • Changelog
  • Related
    • Uses
    • Used By
  • User Contributed Notes

描述

See also See also

  • get_private_posts_cap_sql()

Top ↑

参数

$post_type

(string|string[])
(Required)
Single post type or an array of post types.

$full

(bool)
(Optional)
Returns a full WHERE statement instead of just an 'andalso' term.

Default value: true

$post_author

(int)
(Optional)
Query posts having a single author ID.

Default value: null

$public_only

(bool)
(Optional)
>Default value: false

返回

(string) SQL WHERE code that can be added to a query.

大家谈论
    我的见解