bbp_get_user_favorites_topic_ids

  • apply_filters( 'bbp_get_user_favorites_topic_ids', $favorites, $user_id )

    Source Reference:

    • Component: bbPress :: bbp-user
      File: /bbp-includes/bbp-user-functions.php :: Trac Source Line: 242
      	 */
      	function bbp_get_user_favorites_topic_ids( $user_id = 0 ) {
      		if ( !$user_id = bbp_get_user_id( $user_id ) )
      			return false;
      
      		$favorites = (string) get_user_meta( $user_id, '_bbp_favorites', true );
      		$favorites = (array) explode( ',', $favorites );
      		$favorites = array_filter( $favorites );
      
      		return apply_filters( 'bbp_get_user_favorites_topic_ids', $favorites, $user_id );
      	}
      
      /**
       * Check if a topic is in user's favorites or not
       *
       * @since bbPress (r2652)
       *
       * @param int $user_id Optional. User id
       * @param int $topic_id Optional. Topic id
       * @uses bbp_get_user_id() To get the user id
      

Comments are closed.