bp_ajax_querystring( string|bool $object = false )
Allow templates to pass parameters directly into the template loops via AJAX.
Description Description
For the most part this will be filtered in a theme’s functions.php for example in the default theme it is filtered via bp_dtheme_ajax_querystring().
By using this template tag in the templates it will stop them from showing errors if someone copies the templates from the default theme into another WordPress theme without coping the functions from functions.php.
Parameters Parameters
- $object
-
(Optional) Current template component.
Default value: false
Return Return
(string) The AJAX querystring.
Source Source
File: bp-core/bp-core-template.php
function bp_ajax_querystring( $object = false ) { $bp = buddypress(); if ( ! isset( $bp->ajax_querystring ) ) { $bp->ajax_querystring = ''; } /** * Filters the template paramenters to be used in the query string. * * Allows templates to pass parameters into the template loops via AJAX. * * @since 1.2.0 * * @param string $ajax_querystring Current query string. * @param string $object Current template component. */ return apply_filters( 'bp_ajax_querystring', $bp->ajax_querystring, $object ); }
Changelog Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |