Changeset 56031 for trunk/src/wp-includes/class-wp-rewrite.php
- Timestamp:
- 06/26/2023 10:15:04 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-rewrite.php
r56014 r56031 1061 1061 * minute all present). Set these flags now as we need them for the endpoints. 1062 1062 */ 1063 if ( strpos( $struct, '%postname%' ) !== false 1064 || strpos( $struct, '%post_id%' ) !== false 1065 || strpos( $struct, '%pagename%' ) !== false 1066 || ( strpos( $struct, '%year%' ) !== false && strpos( $struct, '%monthnum%' ) !== false && strpos( $struct, '%day%' ) !== false && strpos( $struct, '%hour%' ) !== false && strpos( $struct, '%minute%' ) !== false && strpos( $struct, '%second%' ) !== false ) 1067 ) { 1063 if ( str_contains( $struct, '%postname%' ) 1064 || str_contains( $struct, '%post_id%' ) 1065 || str_contains( $struct, '%pagename%' ) 1066 || ( str_contains( $struct, '%year%' ) 1067 && str_contains( $struct, '%monthnum%' ) 1068 && str_contains( $struct, '%day%' ) 1069 && str_contains( $struct, '%hour%' ) 1070 && str_contains( $struct, '%minute%' ) 1071 && str_contains( $struct, '%second%' ) ) 1072 ) { 1068 1073 $post = true; 1069 if ( str pos( $struct, '%pagename%' ) !== false) {1074 if ( str_contains( $struct, '%pagename%' ) ) { 1070 1075 $page = true; 1071 1076 } … … 1075 1080 // For custom post types, we need to add on endpoints as well. 1076 1081 foreach ( get_post_types( array( '_builtin' => false ) ) as $ptype ) { 1077 if ( str pos( $struct, "%$ptype%" ) !== false) {1082 if ( str_contains( $struct, "%$ptype%" ) ) { 1078 1083 $post = true; 1079 1084 … … 1556 1561 $match = str_replace( '.+?', '.+', $match ); 1557 1562 1558 if ( str pos( $query, $this->index ) !== false) {1563 if ( str_contains( $query, $this->index ) ) { 1559 1564 $rules .= 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA,L]\n"; 1560 1565 } else {
Note: See TracChangeset
for help on using the changeset viewer.