bbp_user_favorites_link

Output the link to make a topic favorite/remove a topic from favorites.

Description

bbp_user_favorites_link( (array) $args = array(), (int) $user_id = 0, (bool) $wrap = true ); 

Parameters (3)

0. $args — Optional. (array) => array()
The args.

Options

    ;        

    1. $user_id — Optional. (int)
    User id
    2. $wrap — Optional. (bool) => true
    If you want to wrap the link in .

    Usage

    1. if ( !function_exists( 'bbp_user_favorites_link' ) ) { 
    2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/users/template.php'; 
    3.  
    4. // The args. 
    5. $args = array(); 
    6.  
    7. // Optional. User id 
    8. $user_id = -1; 
    9.  
    10. // Optional. If you want to wrap the link in . 
    11. $wrap = true; 
    12.  
    13. // NOTICE! Understand what this does before running. 
    14. $result = bbp_user_favorites_link($args, $user_id, $wrap); 
    15.  

    Defined (1)

    The function is defined in the following location(s).

    /includes/users/template.php  
    1. function bbp_user_favorites_link( $args = array(), $user_id = 0, $wrap = true ) { 
    2. echo bbp_get_user_favorites_link( $args, $user_id, $wrap );