Changeset 36280
- Timestamp:
- 01/13/2016 08:19:48 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4/src/wp-includes/query.php
r36129 r36280 4982 4982 * @global WP_Query $wp_query Global WP_Query instance. 4983 4983 * @global wpdb $wpdb WordPress database abstraction object. 4984 * @global WP_Rewrite $wp_rewrite WordPress rewrite component.4985 4984 */ 4986 4985 function wp_old_slug_redirect() { 4987 global $wp_query, $wp_rewrite; 4988 4989 if ( get_queried_object() ) { 4990 return; 4991 } 4992 4993 if ( '' !== $wp_query->query_vars['name'] ) : 4986 global $wp_query; 4987 4988 if ( is_404() && '' !== $wp_query->query_vars['name'] ) : 4994 4989 global $wpdb; 4995 4990 … … 5039 5034 } elseif( is_embed() ) { 5040 5035 $link = user_trailingslashit( trailingslashit( $link ) . 'embed' ); 5041 } elseif ( is_404() ) {5042 // Add rewrite endpoints if necessary.5043 foreach ( $wp_rewrite->endpoints as $endpoint ) {5044 if ( $endpoint[2] && false !== get_query_var( $endpoint[2], false ) ) {5045 $link = user_trailingslashit( trailingslashit( $link ) . $endpoint[1] );5046 }5047 }5048 5036 } 5049 5037
Note: See TracChangeset
for help on using the changeset viewer.