bp_nouveau_get_filter_id()

Get data filter’s ID attribute value.

Description

Parameters

(Required)

Source

File: bp-templates/bp-nouveau/includes/template-tags.php

2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
function bp_nouveau_get_filter_id() {
    $component = bp_nouveau_current_object();
 
    $ids = array(
        'members'       => $component['members_order_by'],
        'friends'       => 'members-friends',
        'notifications' => 'notifications-filter-by',
        'activity'      => 'activity-filter-by',
        'groups'        => 'groups-order-by',
        'blogs'         => 'blogs-order-by',
    );
 
    if ( isset( $ids[ $component['object'] ] ) ) {
 
        /**
         * Filters the filter ID for BuddyPress Nouveau filters.
         *
         * @since BuddyPress 3.0.0
         *
         * @param string $value ID based on current component object.
         */
        return apply_filters( 'bp_nouveau_get_filter_id', $ids[ $component['object'] ] );
    }
 
    return '';
}

Changelog

Changelog
Version Description
BuddyPress 3.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.