bp_ajax_querystring

  • apply_filters( 'bp_ajax_querystring', $bp->ajax_querystring, $object )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-template.php :: Trac Source Line: 545
       * if someone copies the templates from the default theme into another WordPress theme
       * without coping the functions from functions.php.
       */
      function bp_ajax_querystring( $object = false ) {
      	global $bp;
      
      	if ( !isset( $bp->ajax_querystring ) )
      		$bp->ajax_querystring = '';
      
      	return apply_filters( 'bp_ajax_querystring', $bp->ajax_querystring, $object );
      }
      
      /** Template Classes and _is functions ****************************************/
      
      function bp_current_component() {
      	global $bp;
      	$current_component = !empty( $bp->current_component ) ? $bp->current_component : false;
      	return apply_filters( 'bp_current_component', $current_component );
      }
      

Hook: add_filter: bp_ajax_querystring instances (1)

  • add_filter( 'bp_ajax_querystring', 'bp_dtheme_ajax_querystring', 10, 2 )
    $tag: bp_ajax_querystring
    $function_to_add: bp_dtheme_ajax_querystring
    $priority: 10
    $accepted_args: 2

    Source Reference:

    • Component: BuddyPress :: bp-themes
      File: /bp-themes/bp-default/_inc/ajax.php :: Trac Source Line: 82
      	if ( isset( $_BP_COOKIE['bp-' . $object . '-search-terms'] ) )
      		$object_search_terms = $_BP_COOKIE['bp-' . $object . '-search-terms'];
      
      	$object_extras = '';
      	if ( isset( $_BP_COOKIE['bp-' . $object . '-extras'] ) )
      		$object_extras = $_BP_COOKIE['bp-' . $object . '-extras'];
      
      	return apply_filters( 'bp_dtheme_ajax_querystring', $query_string, $object, $object_filter, $object_scope, $object_page, $object_search_terms, $object_extras );
      }
      add_filter( 'bp_ajax_querystring', 'bp_dtheme_ajax_querystring', 10, 2 );
      
      /* This function will simply load the template loop for the current object. On an AJAX request */
      function bp_dtheme_object_template_loader() {
      
       	/**
      	 * AJAX requests happen too early to be seen by bp_update_is_directory()
      	 * so we do it manually here to ensure templates load with the correct
      	 * context. Without this check, templates will load the 'single' version
      	 * of themselves rather than the directory version.
      	 */
      

Comments are closed.