Changeset 62178 for trunk/src/wp-includes/canonical.php
- Timestamp:
- 03/30/2026 05:31:56 AM (2 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/canonical.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/canonical.php
r61136 r62178 38 38 * figure if redirect is needed. 39 39 * @param bool $do_redirect Optional. Redirect to the new URL. 40 * @return string| void The string of the URL, if redirect needed.40 * @return string|null The string of the URL, if redirect needed. Never returns if a redirect occurs, depending on $do_redirect. 41 41 */ 42 42 function redirect_canonical( $requested_url = null, $do_redirect = true ) { … … 44 44 45 45 if ( isset( $_SERVER['REQUEST_METHOD'] ) && ! in_array( strtoupper( $_SERVER['REQUEST_METHOD'] ), array( 'GET', 'HEAD' ), true ) ) { 46 return ;46 return null; 47 47 } 48 48 … … 63 63 || ( $is_IIS && ! iis7_supports_permalinks() ) 64 64 ) { 65 return ;65 return null; 66 66 } 67 67 … … 75 75 $original = parse_url( $requested_url ); 76 76 if ( false === $original ) { 77 return ;77 return null; 78 78 } 79 79 … … 772 772 773 773 if ( ! $redirect_url || $redirect_url === $requested_url ) { 774 return ;774 return null; 775 775 } 776 776 … … 831 831 // Yes, again -- in case the filter aborted the request. 832 832 if ( ! $redirect_url || strip_fragment_from_url( $redirect_url ) === strip_fragment_from_url( $requested_url ) ) { 833 return ;833 return null; 834 834 } 835 835 … … 842 842 // Debug. 843 843 // die("1: $redirect_url<br />2: " . redirect_canonical( $redirect_url, false ) ); 844 return ;844 return null; 845 845 } 846 846 } else {
Note: See TracChangeset
for help on using the changeset viewer.