bbp_get_user_replies_created( int $user_id )
Get the replies that a user created
Description
Parameters
- $user_id
-
(Optional) User id
Return
(array|bool) Results if the user has created topics, otherwise false
Source
File: bp-forums/users/functions.php
function bbp_get_user_replies_created( $user_id = 0 ) { // Validate user $user_id = bbp_get_user_id( $user_id ); if ( empty( $user_id ) ) return false; // Try to get the topics $query = bbp_has_replies( array( 'post_type' => bbp_get_reply_post_type(), 'order' => 'DESC', 'author' => $user_id ) ); return apply_filters( 'bbp_get_user_replies_created', $query, $user_id ); }
Changelog
Version | Description |
---|---|
bbPress (r4225) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.