Changeset 47122 for trunk/src/wp-includes/class-wp.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp.php
r47018 r47122 174 174 $home_path_regex = sprintf( '|^%s|i', preg_quote( $home_path, '|' ) ); 175 175 176 // Trim path info from the end and the leading home path from the 177 // front. For path info requests, this leaves us with the requesting 178 // filename, if any. For 404 requests, this leaves us with the 179 // requested permalink. 176 /* 177 * Trim path info from the end and the leading home path from the front. 178 * For path info requests, this leaves us with the requesting filename, if any. 179 * For 404 requests, this leaves us with the requested permalink. 180 */ 180 181 $req_uri = str_replace( $pathinfo, '', $req_uri ); 181 182 $req_uri = trim( $req_uri, '/' ); … … 190 191 191 192 // The requested permalink is in $pathinfo for path info requests and 192 // 193 // $req_uri for other requests. 193 194 if ( ! empty( $pathinfo ) && ! preg_match( '|^.*' . $wp_rewrite->index . '$|', $pathinfo ) ) { 194 195 $requested_path = $pathinfo; … … 207 208 $request_match = $requested_path; 208 209 if ( empty( $request_match ) ) { 209 // An empty request could only match against ^$ regex 210 // An empty request could only match against ^$ regex. 210 211 if ( isset( $rewrite['$'] ) ) { 211 212 $this->matched_rule = '$'; … … 324 325 } 325 326 326 // Convert urldecoded spaces back into +327 // Convert urldecoded spaces back into '+'. 327 328 foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy => $t ) { 328 329 if ( $t->query_var && isset( $this->query_vars[ $t->query_var ] ) ) { … … 344 345 } 345 346 346 // Limit publicly queried post_types to those that are publicly_queryable347 // Limit publicly queried post_types to those that are 'publicly_queryable'. 347 348 if ( isset( $this->query_vars['post_type'] ) ) { 348 349 $queryable_post_types = get_post_types( array( 'publicly_queryable' => true ) ); … … 418 419 $headers['Content-Type'] = get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ); 419 420 } else { 420 // Set the correct content type for feeds 421 // Set the correct content type for feeds. 421 422 $type = $this->query_vars['feed']; 422 423 if ( 'feed' == $this->query_vars['feed'] ) { … … 453 454 $headers['ETag'] = $wp_etag; 454 455 455 // Support for Conditional GET456 // Support for conditional GET. 456 457 if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) ) { 457 458 $client_etag = wp_unslash( $_SERVER['HTTP_IF_NONE_MATCH'] ); … … 461 462 462 463 $client_last_modified = empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ? '' : trim( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ); 463 // If string is empty, return 0. If not, attempt to parse into a timestamp 464 // If string is empty, return 0. If not, attempt to parse into a timestamp. 464 465 $client_modified_timestamp = $client_last_modified ? strtotime( $client_last_modified ) : 0; 465 466 466 // Make a timestamp for our most recent modification.. .467 // Make a timestamp for our most recent modification.. 467 468 $wp_modified_timestamp = strtotime( $wp_last_modified ); 468 469 … … 676 677 } 677 678 678 // check for paged content that exceeds the max number of pages679 // Check for paged content that exceeds the max number of pages. 679 680 $next = '<!--nextpage-->'; 680 681 if ( $p && false !== strpos( $p->post_content, $next ) && ! empty( $this->query_vars['page'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.