Changeset 11166
- Timestamp:
- 08/03/2021 04:47:26 AM (4 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/query-modifications.php
r10642 r11166 229 229 'posts', 'withcomments', 'withoutcomments', 'favicon', 'cpage', 230 230 'search', 'exact', 'sentence', 'calendar', 'more', 'tb', 'pb', 231 'attachment ', 'attachment_id', 'subpost', 'subpost_id', 'preview',231 'attachment_id', 'subpost', 'subpost_id', 'preview', 232 232 'post_format', 'cat', 'category_name', 233 233 ]; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r11165 r11166 67 67 wp_safe_redirect( home_url( '/search/' . urlencode( get_query_var( 's' ) ) . '/' ), 301 ); 68 68 die(); 69 } 70 71 // Handle 404 pages where it's a singular theme followed by junk, for example, /themes/twentyten/junk/input/ 72 if ( is_404() ) { 73 $path = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); 74 if ( preg_match( '!^/themes/([^/]+)/.+!i', $path, $m ) ) { 75 $posts = get_posts( [ 76 'name' => $m[1], 77 'post_type' => 'repopackage', 78 'post_status' => 'publish' 79 ] ); 80 81 if ( $posts ) { 82 wp_safe_redirect( get_permalink( $posts[0] ), 301 ); 83 die(); 84 } 85 } 69 86 } 70 87
Note: See TracChangeset
for help on using the changeset viewer.