bbp_get_user_topics_started( int $user_id )
Get the topics 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
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 | function bbp_get_user_topics_started( $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_topics( array ( 'author' => $user_id ) ); return apply_filters( 'bbp_get_user_topics_started' , $query , $user_id ); } |
Changelog
Version | Description |
---|---|
bbPress (r2660) | 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.