bbp_get_topic_favoriters

  • apply_filters( 'bbp_get_topic_favoriters', $users, $topic_id )

    Source Reference:

    • Component: bbPress :: bbp-user
      File: /bbp-includes/bbp-user-functions.php :: Trac Source Line: 186
       */
      function bbp_get_topic_favoriters( $topic_id = 0 ) {
      	if ( empty( $topic_id ) )
      		return;
      
      	global $wpdb;
      
      	// Get the users who have favorited the topic
      	$users = $wpdb->get_col( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = '_bbp_favorites' and FIND_IN_SET('{$topic_id}', meta_value) > 0" );
      	$users = apply_filters( 'bbp_get_topic_favoriters', $users, $topic_id );
      
      	if ( !empty( $users ) )
      		return $users;
      
      	return false;
      }
      
      /**
       * Get a user's favorite topics
       *
      

Comments are closed.