mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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:
parent
1080c1e4ee
commit
87c947a987
@ -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; ?>
|
||||
|
@ -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 );
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user