bbp_do_ajax()
Hooked to the ‘bbp_template_redirect’ action, this is Forums’ custom theme-side ajax handler.
Description
Return
(If) not a Forums ajax request
Source
File: bp-forums/common/ajax.php
function bbp_do_ajax() { // Bail if not an ajax request if ( ! bbp_is_ajax() ) return; // Set WordPress core ajax constant define( 'DOING_AJAX', true ); // Set the header content type @header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); // Disable content sniffing in browsers that support it send_nosniff_header(); // Perform custom Forums ajax do_action( 'bbp_ajax_' . $_REQUEST['action'] ); // All done die( '0' ); }
Changelog
Version | Description |
---|---|
bbPress (r4543) | 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.