bbp_get_user_replies_created( array $args = array() )
Get the replies that a user created
Description Description
Parameters Parameters
- $args
-
(Optional) Arguments to pass into bbp_has_replies()
Default value: array()
Return Return
(bool) True if user has created replies, otherwise false
Source Source
File: includes/users/functions.php
function bbp_get_user_replies_created( $args = array() ) { // Backwards compat for pre-2.6.0 if ( is_numeric( $args ) ) { $args = array( 'author' => bbp_get_user_id( $args, false, false ), 'post_type' => bbp_get_reply_post_type(), 'order' => 'DESC' ); } // Default arguments $defaults = array( 'author' => bbp_get_displayed_user_id(), 'post_type' => bbp_get_reply_post_type(), 'order' => 'DESC' ); // Parse arguments $r = bbp_parse_args( $args, $defaults, 'get_user_replies_created' ); // Get the replies $query = bbp_has_replies( $r ); $user_id = $r['author']; // Filter & return return apply_filters( 'bbp_get_user_replies_created', $query, $user_id, $r, $args ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | bbPress (r6618) Signature changed to accept an array of arguments |
2.2.0 | Introduced. |