Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/26/2013 06:50:47 PM (11 years ago)
Author:
boonebgorges
Message:

Introduces a 'meta_query' parameter for the bp_has_groups() stack

This will allow plugin and theme authors to customize their group directories
based on data stored in the groupmeta table, using a powerful syntax familiar
from WP_Query.

Also adds unit tests for BP_Groups_Group::get() for the meta_query parameter,
as well as an integration test for the entire bp_has_groups() chain of
functions.

Fixes #3521

File:
1 edited

Legend:

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

    r6711 r6950  
    419419        'exclude'         => false,    // Do not include these specific groups (group_ids)
    420420        'search_terms'    => false,    // Limit to groups that match these search terms
     421        'meta_query'      => false,    // Filter by groupmeta. See WP_Meta_Query for syntax
    421422        'show_hidden'     => false,    // Show hidden groups to non-admins
    422423        'per_page'        => 20,       // The number of results to return per page
     
    433434        'exclude'         => $r['exclude'],
    434435        'search_terms'    => $r['search_terms'],
     436        'meta_query'      => $r['meta_query'],
    435437        'show_hidden'     => $r['show_hidden'],
    436438        'per_page'        => $r['per_page'],
Note: See TracChangeset for help on using the changeset viewer.