Use network_site_url() for wp-signup.php. props markjaquith. see #19796.

git-svn-id: http://core.svn.wordpress.org/trunk@21813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-09-11 12:27:25 +00:00
parent 1080c1e4ee
commit 87c947a987
4 changed files with 6 additions and 6 deletions

View File

@ -674,7 +674,7 @@ function choose_primary_blog() {
<?php if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ) ) ) : ?>
<tr>
<th scope="row" colspan="2" class="th-full">
<a href="<?php echo apply_filters( 'wp_signup_location', network_home_url( 'wp-signup.php' ) ); ?>"><?php _e( 'Create a New Site' ); ?></a>
<a href="<?php echo apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); ?>"><?php _e( 'Create a New Site' ); ?></a>
</th>
</tr>
<?php endif; ?>

View File

@ -18,7 +18,7 @@
* one or the other.
*
* Prevents redirection for feeds, trackbacks, searches, comment popup, and
* admin URLs. Does not redirect on non-pretty-permalink-supporting IIS 7,
* admin URLs. Does not redirect on non-pretty-permalink-supporting IIS 7,
* page/post previews, WP admin, Trackbacks, robots.txt, searches, or on POST
* requests.
*
@ -282,7 +282,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
if ( 'wp-register.php' == basename( $redirect['path'] ) ) {
if ( is_multisite() )
$redirect_url = apply_filters( 'wp_signup_location', site_url( 'wp-signup.php' ) );
$redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
else
$redirect_url = site_url( 'wp-login.php?action=register' );
wp_redirect( $redirect_url, 301 );

View File

@ -509,7 +509,7 @@ break;
case 'register' :
if ( is_multisite() ) {
// Multisite uses wp-signup.php
wp_redirect( apply_filters( 'wp_signup_location', site_url('wp-signup.php') ) );
wp_redirect( apply_filters( 'wp_signup_location', network_site_url('wp-signup.php') ) );
exit;
}

View File

@ -23,7 +23,7 @@ if ( !is_multisite() ) {
}
if ( !is_main_site() ) {
wp_redirect( network_home_url( 'wp-signup.php' ) );
wp_redirect( network_site_url( 'wp-signup.php' ) );
die();
}
@ -390,7 +390,7 @@ $current_user = wp_get_current_user();
if ( $active_signup == 'none' ) {
_e( 'Registration has been disabled.' );
} elseif ( $active_signup == 'blog' && !is_user_logged_in() ) {
$login_url = site_url( 'wp-login.php?redirect_to=' . urlencode( set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . '/wp-signup.php' ) ) );
$login_url = site_url( 'wp-login.php?redirect_to=' . urlencode( network_site_url( 'wp-signup.php' ) ) );
echo sprintf( __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ), $login_url );
} else {
$stage = isset( $_POST['stage'] ) ? $_POST['stage'] : 'default';