Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/29/2018 06:48:38 PM (8 years ago)
Author:
imath
Message:

BP Nouveau: fix Ajax search in directory pages & group members screen

Fixes #7779

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r12008 r12015  
    17501750
    17511751/**
     1752 * Output the search form data-bp attribute.
     1753 *
     1754 * @since 3.0.0
     1755 *
     1756 * @param  string $attr The data-bp attribute.
     1757 * @return string The data-bp attribute.
     1758 */
     1759function bp_nouveau_search_object_data_attr( $attr = '' ) {
     1760    $objects = bp_nouveau_get_search_objects();
     1761
     1762    if ( ! isset( $objects['secondary'] ) ) {
     1763        return $attr;
     1764    }
     1765
     1766    if ( bp_is_active( 'groups' ) && bp_is_group_members() ) {
     1767        $attr = join( '_', $objects );
     1768    } else {
     1769        $attr = $objects['secondary'];
     1770    }
     1771
     1772    echo esc_attr( $attr );
     1773}
     1774
     1775/**
    17521776 * Output a selector ID.
    17531777 *
Note: See TracChangeset for help on using the changeset viewer.