Skip to:
Content

bbPress.org


Ignore:
Timestamp:
03/24/2015 01:32:20 PM (11 years ago)
Author:
johnjamesjacoby
Message:

API: Introduce bbp_redirect()

  • Wraps wp_safe_redirect() & exit() calls
  • Prevents errors from potentially empty wp_get_referrer() results
  • Replace wp_safe_redirect() usages with bbp_redirect()

Fixes #2778.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/replies.php

    r5637 r5658  
    465465     *                    data, action and message
    466466     * @uses add_query_arg() To add custom args to the url
    467      * @uses wp_safe_redirect() Redirect the page to custom url
     467     * @uses bbp_redirect() Redirect the page to custom url
    468468     */
    469469    public function toggle_reply() {
     
    522522            // Redirect back to the reply
    523523            $redirect = add_query_arg( $message, remove_query_arg( array( 'action', 'reply_id' ) ) );
    524             wp_safe_redirect( $redirect );
    525 
    526             // For good measure
    527             exit();
     524            bbp_redirect( $redirect );
    528525        }
    529526    }
Note: See TracChangeset for help on using the changeset viewer.