bp_activity_total_activities_sql, SELECT count(DISTINCT a.id

bp_activity_total_activities_sql, SELECT count(DISTINCT a.id

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: buddypress.14.5.2

apply_filters('bp_activity_total_activities_sql, SELECT count(DISTINCT a.id') is found 1 times:

  • /bp-activity/classes/class-bp-activity-activity.php line 852
    			 * @param string $value     MySQL statement used to query for total activities.
    			 * @param string $where_sql MySQL WHERE statement portion.
    			 * @param string $sort      Sort direction for query.
    			 */
    			$total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', "SELECT count(DISTINCT a.id) FROM {$bp->activity->table_name} a {$join_sql} {$where_sql}", $where_sql, $sort );
    
    			/*
    			 * Queries that include 'last_activity' are cached separately,
    			 * since they are generally much less long-lived.
    			 */
    			if ( preg_match( '/a\.type NOT IN \([^\)]*\'last_activity\'[^\)]*\)/', $total_activities_sql ) ) {