bp_located_template

  • apply_filters( 'bp_located_template', locate_template( (array) $filtered_templates, false ), $filtered_templates ) )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-catchuri.php :: Trac Source Line: 330
      		$wp_query->queried_object_id = $object_id;
      		$post                        = $wp_query->queried_object;
      	}
      
      	// Fetch each template and add the php suffix
      	foreach ( (array)$templates as $template )
      		$filtered_templates[] = $template . '.php';
      
      	// Filter the template locations so that plugins can alter where they are located
      	if ( $located_template = apply_filters( 'bp_located_template', locate_template( (array) $filtered_templates, false ), $filtered_templates ) ) {
      		// Template was located, lets set this as a valid page and not a 404.
      		status_header( 200 );
      		$wp_query->is_page = true;
      		$wp_query->is_404 = false;
      
      		load_template( apply_filters( 'bp_load_template', $located_template ) );
      	}
      
      	// Kill any other output after this.
      	die;
      

Comments are closed.