Clean up duplicate hook notations and adjacency for calls to the `wp_signup_location` filter.

Also adds braces missed in [25535].

See #26869.

Built from https://develop.svn.wordpress.org/trunk@28215


git-svn-id: http://core.svn.wordpress.org/trunk@28045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-04-25 07:12:14 +00:00
parent 8161668689
commit d77e78d685
3 changed files with 7 additions and 6 deletions

View File

@ -670,10 +670,10 @@ function choose_primary_blog() {
<tr>
<th scope="row" colspan="2" class="th-full">
<?php
$signup_url = network_site_url( 'wp-signup.php' );
/** This filter is documented in wp-login.php */
$sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
?>
<a href="<?php echo apply_filters( 'wp_signup_location', $signup_url ); ?>"><?php _e( 'Create a New Site' ); ?></a>
<a href="<?php echo esc_url( $sign_up_url ); ?>"><?php _e( 'Create a New Site' ); ?></a>
</th>
</tr>
<?php endif; ?>

View File

@ -295,11 +295,13 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
}
if ( 'wp-register.php' == basename( $redirect['path'] ) ) {
if ( is_multisite() )
if ( is_multisite() ) {
/** This filter is documented in wp-login.php */
$redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
else
} else {
$redirect_url = site_url( 'wp-login.php?action=register' );
}
wp_redirect( $redirect_url, 301 );
die();
}

View File

@ -643,7 +643,6 @@ break;
case 'register' :
if ( is_multisite() ) {
$sign_up_url = network_site_url( 'wp-signup.php' );
/**
* Filter the Multisite sign up URL.
*
@ -651,7 +650,7 @@ case 'register' :
*
* @param string $sign_up_url The sign up URL.
*/
wp_redirect( apply_filters( 'wp_signup_location', $sign_up_url ) );
wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) );
exit;
}