bp_forums_get_post_extras

  • apply_filters( 'bp_forums_get_post_extras', $posts )

    Source Reference:

    • Component: BuddyPress :: bp-forums
      File: /bp-forums/bp-forums-functions.php :: Trac Source Line: 547
      		$poster_names = $wpdb->get_results( $wpdb->prepare( "SELECT pd.user_id, pd.value FROM {$bp->profile->table_name_data} pd WHERE pd.user_id IN ( {$user_ids} )" ) );
      		for ( $i = 0, $count = count( $posts ); $i < $count; ++$i ) {
      			foreach ( (array)$poster_names as $name ) {
      				if ( isset( $topics[$i] ) && $name->user_id == $topics[$i]->user_id )
      				$posts[$i]->poster_name = $poster->value;
      			}
      		}
      	}
      
      	return apply_filters( 'bp_forums_get_post_extras', $posts );
      }
      
      function bp_forums_get_forum_topicpost_count( $forum_id ) {
      	global $wpdb, $bbdb;
      
      	do_action( 'bbpress_init' );
      
      	// Need to find a bbPress function that does this
      	return $wpdb->get_results( $wpdb->prepare( "SELECT topics, posts from {$bbdb->forums} WHERE forum_id = %d", $forum_id ) );
      }
      

Comments are closed.