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