Changeset 55988 for trunk/src/wp-includes/rewrite.php
- Timestamp:
- 06/22/2023 02:34:56 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rewrite.php
r55703 r55988 543 543 544 544 // Add 'www.' if it is absent and should be there. 545 if ( false !== strpos( home_url(), '://www.' ) && false === strpos( $url, '://www.' ) ) {545 if ( str_contains( home_url(), '://www.' ) && ! str_contains( $url, '://www.' ) ) { 546 546 $url = str_replace( '://', '://www.', $url ); 547 547 } 548 548 549 549 // Strip 'www.' if it is present and shouldn't be. 550 if ( false === strpos( home_url(), '://www.' ) ) {550 if ( ! str_contains( home_url(), '://www.' ) ) { 551 551 $url = str_replace( '://www.', '://', $url ); 552 552 } … … 573 573 } 574 574 575 if ( false !== strpos( trailingslashit( $url ), home_url( '/' ) ) ) {575 if ( str_contains( trailingslashit( $url ), home_url( '/' ) ) ) { 576 576 // Chop off http://domain.com/[path]. 577 577 $url = str_replace( home_url(), '', $url );
Note: See TracChangeset
for help on using the changeset viewer.