mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Streamline support for multiple post types in get_posts_by_author_sql().
* Don't accept a comma-separated list, only a single post type or an array of post types. This is easier to document. * Add changelog entries to all calling functions. Props DrewAPicture. Fixes #32243. git-svn-id: https://develop.svn.wordpress.org/trunk@32524 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -251,7 +251,7 @@ function wp_validate_logged_in_cookie( $user_id ) {
|
||||
*
|
||||
* @since 3.0.0
|
||||
* @since 4.1.0 Added `$post_type` argument.
|
||||
* @since 4.3.0 Added `$public_only` argument.
|
||||
* @since 4.3.0 Added `$public_only` argument. Added the ability to pass an array of post types to `$post_type`.
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database object for queries.
|
||||
*
|
||||
@@ -288,7 +288,7 @@ function count_user_posts( $userid, $post_type = 'post', $public_only = false )
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array $users Array of user IDs.
|
||||
* @param string|array $post_type Optional. Array or comma-separated list of post types to check. Defaults to 'post'.
|
||||
* @param string|array $post_type Optional. Single post type or array of post types to check. Defaults to 'post'.
|
||||
* @param bool $public_only Optional. Only return counts for public posts. Defaults to false.
|
||||
* @return array Amount of posts each user has written.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user