Ticket #25229: wp-includes-canonical.diff
File wp-includes-canonical.diff, 1.4 KB (added by , 11 years ago) |
---|
-
wp-includes/canonical.php
296 296 297 297 if ( 'wp-register.php' == basename( $redirect['path'] ) ) { 298 298 if ( is_multisite() ) 299 //duplicate_hook 299 300 $redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); 300 301 else 301 302 $redirect_url = site_url( 'wp-login.php?action=register' ); … … 432 433 $requested_url = preg_replace_callback('|%[a-fA-F0-9][a-fA-F0-9]|', 'lowercase_octets', $requested_url); 433 434 } 434 435 435 // Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning false 436 /** 437 * Filter the URLs for canonical redirects. 438 * 439 * The requested url and the url that will be redirected to can be filtered. Filter can also be used to cancel a canonical redirect by returning false. 440 * 441 * @since 2.3.0 442 * 443 * @param string $redirect_url The url that the user will be redirected to. 444 * @param string $requested_url The url that is requested and the redirect will be performed upon. 445 */ 436 446 $redirect_url = apply_filters('redirect_canonical', $redirect_url, $requested_url); 437 447 438 448 if ( !$redirect_url || $redirect_url == $requested_url ) // yes, again -- in case the filter aborted the request