Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/06/2012 10:29:35 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Introduce bbp_post_request() and bbp_get_request() sub-actions:

  • Update actions and sub-actions to use these new handlers.
  • Update new/edit forum/topic/reply handlers to use these.
  • Update phpdoc as needed.
  • Remove duplicate 'bp_actions' request hooks from BuddyPress group forums.
  • Does not include admin-side requests.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/forums/functions.php

    r4525 r4551  
    7878 * Handles the front end forum submission
    7979 *
     80 * @param string $action The requested action to compare this function to
    8081 * @uses bbPress:errors::add() To log various error messages
    8182 * @uses bbp_verify_nonce_request() To verify the nonce and check the request
    … …  
    107108 *                                              messages
    108109 */
    109 function bbp_new_forum_handler() {
    110 
    111         // Bail if not a POST action
    112         if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    113                 return;
     110function bbp_new_forum_handler( $action = '' ) {
    114111
    115112        // Bail if action is not bbp-new-forum
    116         if ( empty( $_POST['action'] ) || ( 'bbp-new-forum' !== $_POST['action'] ) )
     113        if ( 'bbp-new-forum' !== $action )
    117114                return;
    118115
    … …  
    339336 * Handles the front end edit forum submission
    340337 *
     338 * @param string $action The requested action to compare this function to
    341339 * @uses bbPress:errors::add() To log various error messages
    342340 * @uses bbp_get_forum() To get the forum
    … …  
    368366 *                                              messages
    369367 */
    370 function bbp_edit_forum_handler() {
    371 
    372         // Bail if not a POST action
    373         if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) )
    374                 return;
     368function bbp_edit_forum_handler( $action = '' ) {
    375369
    376370        // Bail if action is not bbp-edit-forum
    377         if ( empty( $_POST['action'] ) || ( 'bbp-edit-forum' !== $_POST['action'] ) )
     371        if ( 'bbp-edit-forum' !== $action )
    378372                return;
    379373
Note: See TracChangeset for help on using the changeset viewer.