Skip to:
Content

BuddyPress.org

Changeset 7376


Ignore:
Timestamp:
09/09/2013 01:40:26 PM (11 years ago)
Author:
boonebgorges
Message:

In BP_Groups_Group::get(), pass method params to SQL filters

Easy access to the original method parameters will make it easier for
plugin authors to customize the query intelligently. See, for example,
the case of sticky groups, discussed in #2242.

Props imath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r7338 r7376  
    442442
    443443        // Get paginated results
    444         $paged_groups_sql = apply_filters( 'bp_groups_get_paged_groups_sql', join( ' ', (array) $sql ), $sql );
     444        $paged_groups_sql = apply_filters( 'bp_groups_get_paged_groups_sql', join( ' ', (array) $sql ), $sql, $r );
    445445        $paged_groups     = $wpdb->get_results( $paged_groups_sql );
    446446
     
    495495
    496496        // Get total group results
    497         $total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', $t_sql, $total_sql );
     497        $total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', $t_sql, $total_sql, $r );
    498498        $total_groups     = $wpdb->get_var( $total_groups_sql );
    499499
Note: See TracChangeset for help on using the changeset viewer.