Ticket #1721: new_filters.diff
File new_filters.diff, 1.5 KB (added by , 15 years ago) |
---|
-
bp-activity/bp-activity-classes.php
110 110 $where_sql = 'WHERE ' . join( ' AND ', $where_conditions ); 111 111 112 112 if ( $per_page && $page ) 113 $activities = $wpdb->get_results( $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}") );113 $activities = $wpdb->get_results( apply_filters('bp_activity_get_sql', $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}" ) ) ); 114 114 else 115 $activities = $wpdb->get_results( $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}") );115 $activities = $wpdb->get_results( apply_filters('bp_activity_get_sql', $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}" ) ) ); 116 116 117 $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}") );118 117 $total_activities = $wpdb->get_var( apply_filters('bp_activity_get_total_sql', $wpdb->prepare( "SELECT count(a.id) FROM {$bp->activity->table_name} a {$where_sql} ORDER BY a.date_recorded {$sort}" ) ) ); 118 119 119 /* Get the fullnames of users so we don't have to query in the loop */ 120 120 if ( function_exists( 'xprofile_install' ) && $activities ) { 121 121 foreach ( (array)$activities as $activity ) {