WordPress.org

Make WordPress Core

Changeset 25230


Ignore:
Timestamp:
09/04/2013 08:30:37 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Add phpdoc for 'wp_redirect' and 'wp_redirect_status' filters. props DrewAPicture. fixes #25215.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r25204 r25230  
    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 */
     
    865865    global $is_IIS;
    866866
    867     $location = apply_filters('wp_redirect', $location, $status);
    868     $status = apply_filters('wp_redirect_status', $status, $location);
    869 
    870     if ( !$location ) // allows the wp_redirect filter to cancel a redirect
     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 );
     876
     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
Note: See TracChangeset for help on using the changeset viewer.