WordPress.org

Make WordPress Core

Changeset 25535


Ignore:
Timestamp:
09/20/2013 11:30:37 PM (5 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-includes/canonical.php.

Props dustyf for the initial patch.
See #25229.

File:
1 edited

Legend:

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

    r25280 r25535  
    297297        if ( 'wp-register.php' == basename( $redirect['path'] ) ) {
    298298            if ( is_multisite() )
     299                //duplicate_hook
    299300                $redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
    300301            else
     
    433434    }
    434435
    435     // Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning false
    436     $redirect_url = apply_filters('redirect_canonical', $redirect_url, $requested_url);
     436    /**
     437     * Filter the canonical redirect URL.
     438     *
     439     * Returning false to this filter will cancel the redirect.
     440     *
     441     * @since 2.3.0
     442     *
     443     * @param string $redirect_url  The redirect URL.
     444     * @param string $requested_url The requested URL.
     445     */
     446    $redirect_url = apply_filters( 'redirect_canonical', $redirect_url, $requested_url );
    437447
    438448    if ( !$redirect_url || $redirect_url == $requested_url ) // yes, again -- in case the filter aborted the request
Note: See TracChangeset for help on using the changeset viewer.