Skip to content

Commit

Permalink
Main: Add a WordPress.org/Search page template.
Browse files Browse the repository at this point in the history
See WordPress/wporg-mu-plugins#38


git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11427 74240141-8908-4e6f-9713-ba540dce6ec7
  • Loading branch information
dd32 committed Jan 11, 2022
1 parent ce4a040 commit b476806
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
exit;

// WordPress.org does not have a specific site search, only the global WordPress.org search
} elseif ( is_search() ) {
wp_safe_redirect( '/search/' . urlencode( get_query_var('s') ), 301 );
} elseif ( ! empty( $_GET['s'] ) && false === strpos( $_SERVER['REQUEST_URI'], '/search/' ) ) {
wp_safe_redirect( '/search/' . urlencode( wp_unslash( $_GET['s'] ) ) . '/', 301 );
exit;

} elseif ( is_404() ) {
Expand Down

0 comments on commit b476806

Please sign in to comment.