Changeset 3617
- Timestamp:
- 12/30/2010 04:46:15 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-classes.php
r3580 r3617 143 143 } 144 144 145 $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(a.id) FROM {$bp->activity->table_name} a {$where_sql} ORDER BY a.date_recorded {$sort}" ) ); 145 $total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', $wpdb->prepare( "SELECT count(a.id) FROM {$bp->activity->table_name} a {$where_sql} ORDER BY a.date_recorded {$sort}" ), $where_sql, $sort ); 146 147 $total_activities = $wpdb->get_var( $total_activities_sql ); 146 148 147 149 // Get the fullnames of users so we don't have to query in the loop -
trunk/bp-groups/bp-groups-classes.php
r3609 r3617 317 317 318 318 /* Get paginated results */ 319 $paged_groups = $wpdb->get_results( join( ' ', (array)$sql ) ); 319 $paged_groups_sql = apply_filters( 'bp_groups_get_paged_groups_sql', join( ' ', (array)$sql ), $sql ); 320 $paged_groups = $wpdb->get_results( $paged_groups_sql ); 320 321 321 322 $total_sql['select'] = "SELECT COUNT(g.id) FROM {$bp->groups->table_name} g"; … … 344 345 345 346 /* Get total group results */ 346 $total_groups = $wpdb->get_var( join( ' ', (array)$t_sql ) ); 347 $total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', join( ' ', (array)$sql ), $sql ); 348 $total_groups = $wpdb->get_var( $total_groups_sql ); 347 349 348 350 /* Populate some extra information instead of querying each time in the loop */
Note: See TracChangeset
for help on using the changeset viewer.