Make WordPress Core

Ticket #25215: 25215.diff

File 25215.diff, 1.4 KB (added by DrewAPicture, 11 years ago)
  • wp-includes/pluggable.php

     
    857857 * @since 1.5.1
    858858 * @uses apply_filters() Calls 'wp_redirect' hook on $location and $status.
    859859 *
    860  * @param string $location The path to redirect to
    861  * @param int $status Status code to use
     860 * @param string $location The path to redirect to.
     861 * @param int $status Status code to use.
    862862 * @return bool False if $location is not provided, true otherwise.
    863863 */
    864864function wp_redirect($location, $status = 302) {
    865865        global $is_IIS;
    866866
    867         $location = apply_filters('wp_redirect', $location, $status);
    868         $status = apply_filters('wp_redirect_status', $status, $location);
     867        /**
     868         * Filter the redirect location
     869         *
     870         * @since 2.1.0
     871         *
     872         * @param string $location The path to redirect to.
     873         * @param int    $status   Status code to use.
     874         */
     875        $location = apply_filters( 'wp_redirect', $location, $status );
    869876
    870         if ( !$location ) // allows the wp_redirect filter to cancel a redirect
     877        /**
     878         * Filter the redirect status code
     879         *
     880         * @since 2.3.0
     881         *
     882         * @param int    $status   Status code to use.
     883         * @param string $location The path to redirect to.
     884         */
     885        $status = apply_filters( 'wp_redirect_status', $status, $location );
     886
     887        if ( ! $location )
    871888                return false;
    872889
    873890        $location = wp_sanitize_redirect($location);