Changeset 32529
- Timestamp:
- 05/21/2015 08:29:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r31838 r32529 34 34 * figure if redirect is needed. 35 35 * @param bool $do_redirect Optional. Redirect to the new URL. 36 * @return null|false|string Null, if redirect not needed. False, if redirect 37 * not needed or the string of the URL 36 * @return null|string Null, if redirect not needed, or the string of the URL 38 37 */ 39 38 function redirect_canonical( $requested_url = null, $do_redirect = true ) { … … 448 447 } 449 448 450 if ( !$redirect_url || $redirect_url == $requested_url ) 451 return false; 449 if ( ! $redirect_url || $redirect_url == $requested_url ) { 450 return; 451 } 452 452 453 453 // Hex encoded octets are case-insensitive. … … 473 473 $redirect_url = apply_filters( 'redirect_canonical', $redirect_url, $requested_url ); 474 474 475 if ( !$redirect_url || $redirect_url == $requested_url ) // yes, again -- in case the filter aborted the request 476 return false; 475 // yes, again -- in case the filter aborted the request 476 if ( ! $redirect_url || $redirect_url == $requested_url ) { 477 return; 478 } 477 479 478 480 if ( $do_redirect ) { … … 484 486 // Debug 485 487 // die("1: $redirect_url<br />2: " . redirect_canonical( $redirect_url, false ) ); 486 return false;488 return; 487 489 } 488 490 } else { … … 524 526 * @global wpdb $wpdb WordPress database abstraction object. 525 527 * 526 * @return bool|string The correct URL if one is found. False on failure.528 * @return false|string The correct URL if one is found. False on failure. 527 529 */ 528 530 function redirect_guess_404_permalink() {
Note: See TracChangeset
for help on using the changeset viewer.