Changeset 47808 for trunk/src/wp-includes/class-wp-rewrite.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-rewrite.php
r47550 r47808 527 527 $tok_index = 1; 528 528 foreach ( (array) $tokens[0] as $token ) { 529 if ( '%post_id%' == $token && ( $tok_index <= 3 ) ) {529 if ( '%post_id%' === $token && ( $tok_index <= 3 ) ) { 530 530 $front = $front . 'date/'; 531 531 break; … … 1262 1262 // robots.txt -- only if installed at the root. 1263 1263 $home_path = parse_url( home_url() ); 1264 $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();1264 $robots_rewrite = ( empty( $home_path['path'] ) || '/' === $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array(); 1265 1265 1266 1266 // favicon.ico -- only if installed at the root. 1267 $favicon_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'favicon\.ico$' => $this->index . '?favicon=1' ) : array();1267 $favicon_rewrite = ( empty( $home_path['path'] ) || '/' === $home_path['path'] ) ? array( 'favicon\.ico$' => $this->index . '?favicon=1' ) : array(); 1268 1268 1269 1269 // Old feed and service files. … … 1405 1405 */ 1406 1406 $rules = apply_filters( "{$permastructname}_rewrite_rules", $rules ); 1407 if ( 'post_tag' == $permastructname ) { 1407 1408 if ( 'post_tag' === $permastructname ) { 1408 1409 1409 1410 /** … … 1648 1649 $this->add_external_rule( $regex, $query ); 1649 1650 } else { 1650 if ( 'bottom' == $after ) {1651 if ( 'bottom' === $after ) { 1651 1652 $this->extra_rules = array_merge( $this->extra_rules, array( $regex => $query ) ); 1652 1653 } else { … … 1855 1856 unset( $this->feed_structure ); 1856 1857 unset( $this->comment_feed_structure ); 1857 $this->use_trailing_slashes = ( '/' == substr( $this->permalink_structure, -1, 1 ) ); 1858 1859 $this->use_trailing_slashes = ( '/' === substr( $this->permalink_structure, -1, 1 ) ); 1858 1860 1859 1861 // Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
Note: See TracChangeset
for help on using the changeset viewer.