bbp_post_request()

The main action used for handling theme-side POST requests

Description

Source

File: bp-forums/core/sub-actions.php

349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
function bbp_post_request() {
 
    // Bail if not a POST action
    if ( ! bbp_is_post_request() )
        return;
 
    // Bail if no action
    if ( empty( $_POST['action'] ) )
        return;
 
    // This dynamic action is probably the one you want to use. It narrows down
    // the scope of the 'action' without needing to check it in your function.
    do_action( 'bbp_post_request_' . $_POST['action'] );
 
    // Use this static action if you don't mind checking the 'action' yourself.
    do_action( 'bbp_post_request',   $_POST['action'] );
}

Changelog

Changelog
Version Description
bbPress (r4550) 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.