bp_legacy_theme_ajax_querystring
Filters the AJAX query string for the component loops.
Description
apply_filters( 'bp_legacy_theme_ajax_querystring', (string) $query_string, (string) $object, (string) $object_filter, (string) $object_scope, (string) $object_page, (string) $object_search_terms, (string) $object_extras );
Parameters (7)
- 0. $query_string (string)
- The query string we are working with.
- 1. $object (string)
- The type of page we are on.
- 2. $object_filter (string)
- The current object filter.
- 3. $object_scope (string)
- The current object scope.
- 4. $object_page (string)
- The current object page.
- 5. $object_search_terms (string)
- The current object search terms.
- 6. $object_extras (string)
- The current object extras.
Usage
- To run the hook, copy the example below.
- $query_string = apply_filters( 'bp_legacy_theme_ajax_querystring', $query_string, $object, $object_filter, $object_scope, $object_page, $object_search_terms, $object_extras );
- if ( !empty( $query_string ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_legacy_theme_ajax_querystring callback
- function filter_bp_legacy_theme_ajax_querystring( $query_string, $object, $object_filter, $object_scope, $object_page, $object_search_terms, $object_extras ) {
- // make filter magic happen here...
- return $query_string;
- };
- // add the filter
- add_filter( 'bp_legacy_theme_ajax_querystring', 'filter_bp_legacy_theme_ajax_querystring', 10, 7 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_legacy_theme_ajax_querystring', 'filter_bp_legacy_theme_ajax_querystring', 10, 7 );
Defined (1)
The filter is defined in the following location(s).
- /bp-templates/bp-legacy/buddypress-functions.php
- return apply_filters( 'bp_legacy_theme_ajax_querystring', $query_string, $object, $object_filter, $object_scope, $object_page, $object_search_terms, $object_extras );