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/topics.php

    r5637 r5658  
    488488     *                    data, action and message
    489489     * @uses add_query_arg() To add custom args to the url
    490      * @uses wp_safe_redirect() Redirect the page to custom url
     490     * @uses bbp_redirect() Redirect the page to custom url
    491491     */
    492492    public function toggle_topic() {
     
    585585            // Redirect back to the topic
    586586            $redirect = add_query_arg( $message, remove_query_arg( array( 'action', 'topic_id' ) ) );
    587             wp_safe_redirect( $redirect );
    588 
    589             // For good measure
    590             exit();
     587            bbp_redirect( $redirect );
    591588        }
    592589    }
Note: See TracChangeset for help on using the changeset viewer.