X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/53f4633144ed68c8b8fb5861f992b5489894a940..dc1231b7312fbdca99e9e887cc2bb35a28f85cdc:/wp-includes/user.php?ds=sidebyside diff --git a/wp-includes/user.php b/wp-includes/user.php index 1cd2db22..6f9de677 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -261,7 +261,7 @@ function wp_validate_logged_in_cookie( $user_id ) { * @global wpdb $wpdb WordPress database object for queries. * * @param int $userid User ID. - * @param array|string $post_type Optional. Post type(s) to count the number of posts for. Default 'post'. + * @param array|string $post_type Optional. Single post type or array of post types to count the number of posts for. Default 'post'. * @param bool $public_only Optional. Whether to only return counts for public posts. Default false. * @return int Number of posts the user has written in this post type. */ @@ -277,14 +277,14 @@ function count_user_posts( $userid, $post_type = 'post', $public_only = false ) * * @since 2.7.0 * @since 4.1.0 Added `$post_type` argument. - * @since 4.3.0 Added `$public_only` argument. + * @since 4.3.1 Added `$public_only` argument. * * @param int $count The user's post count. * @param int $userid User ID. - * @param string|array $post_types Post types to count the number of posts for. + * @param string|array $post_type Single post type or array of post types to count the number of posts for. * @param bool $public_only Whether to limit counted posts to public posts. */ - return apply_filters( 'get_usernumposts', $count, $userid, $post_type ); + return apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only ); } /** @@ -2619,7 +2619,7 @@ function register_new_user( $user_login, $user_email ) { update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag. - wp_new_user_notification( $user_id, 'both' ); + wp_new_user_notification( $user_id, null, 'both' ); return $user_id; }