Ticket #3521: bp_activity_get_filters.patch
File bp_activity_get_filters.patch, 1.0 KB (added by , 13 years ago) |
---|
-
bp-activity/bp-activity-classes.php
100 100 101 101 // Select conditions 102 102 $select_sql = "SELECT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name"; 103 103 $select_sql = apply_filters( 'bp_activity_get_select_sql', $select_sql); 104 104 105 $from_sql = " FROM {$bp->activity->table_name} a LEFT JOIN {$wpdb->users} u ON a.user_id = u.ID"; 105 106 $from_sql = apply_filters( 'bp_activity_get_from_sql', $from_sql); 107 106 108 // Where conditions 107 109 $where_conditions = array(); 108 110 … … 146 148 $where_conditions[] = "a.type != 'activity_comment'"; 147 149 148 150 $where_sql = 'WHERE ' . join( ' AND ', $where_conditions ); 151 152 $where_sql = apply_filters( 'bp_activity_get_where_sql', $where_sql); 149 153 150 154 if ( $per_page && $page ) { 151 155 $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $per_page ), intval( $per_page ) );