Skip to content

Commit

Permalink
Maybe redirect in sunrise.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
JJJ committed Dec 7, 2016
1 parent 1fc2927 commit 529cff9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wp-site-aliases/drop-ins/sunrise.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ function wp_site_aliases_maybe_load_current_site_and_network() {
return;
}

// Maybe redirect
if ( 'redirect' === $alias->type ) {
switch_to_blog( $alias->site_id );
wp_safe_redirect( home_url( $_SERVER['REQUEST_URI'] ) );
restore_current_blog();
exit;
}

// Set the site globals
$blog_id = $alias->site_id;
$current_blog = get_site( $alias->site_id );
Expand Down

0 comments on commit 529cff9

Please sign in to comment.