Coding style
git-svn-id: http://svn.automattic.com/wordpress/trunk@12735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f9a92c2588
commit
9bea527ac3
13
wp-login.php
13
wp-login.php
|
@ -165,18 +165,16 @@ function retrieve_password() {
|
|||
$wpdb->update($wpdb->users, array('user_activation_key' => $key), array('user_login' => $user_login));
|
||||
}
|
||||
$message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n";
|
||||
if( !is_multisite() ) {
|
||||
if ( !is_multisite() )
|
||||
$message .= get_option('siteurl') . "\r\n\r\n";
|
||||
} else {
|
||||
else
|
||||
$message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "\r\n\r\n";
|
||||
}
|
||||
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
||||
$message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
|
||||
if( !is_multisite() ) {
|
||||
if ( !is_multisite() )
|
||||
$message .= site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . "\r\n";
|
||||
} else {
|
||||
else
|
||||
$message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login) . "\r\n";
|
||||
}
|
||||
|
||||
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
||||
// we want to reverse this for the plain text arena of emails.
|
||||
|
@ -409,11 +407,12 @@ case 'rp' :
|
|||
break;
|
||||
|
||||
case 'register' :
|
||||
if( is_multisite() ) {
|
||||
if ( is_multixsite() ) {
|
||||
// WPMU doesn't use this
|
||||
wp_redirect( apply_filters( 'wp_signup_location', get_bloginfo('wpurl') . '/wp-signup.php' ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( !get_option('users_can_register') ) {
|
||||
wp_redirect('wp-login.php?registration=disabled');
|
||||
exit();
|
||||
|
|
|
@ -65,18 +65,17 @@ function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
|
|||
<p class="error"><?php echo $errmsg ?></p>
|
||||
<?php }
|
||||
|
||||
if( !is_subdomain_install() ) {
|
||||
if ( !is_subdomain_install() )
|
||||
echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="50" /><br />';
|
||||
} else {
|
||||
else
|
||||
echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="50" /><span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />';
|
||||
}
|
||||
|
||||
if ( !is_user_logged_in() ) {
|
||||
print '(<strong>' . __( 'Your address will be ' );
|
||||
if( !is_subdomain_install() ) {
|
||||
if ( !is_subdomain_install() )
|
||||
print $current_site->domain . $current_site->path . __( 'blogname' );
|
||||
} else {
|
||||
else
|
||||
print __( 'domain.' ) . $current_site->domain . $current_site->path;
|
||||
}
|
||||
echo '.</strong> ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed so choose carefully!)' ) . '</p>';
|
||||
}
|
||||
|
||||
|
@ -225,11 +224,10 @@ function signup_user($user_name = '', $user_email = '', $errors = '') {
|
|||
|
||||
if ( !is_wp_error($errors) )
|
||||
$errors = new WP_Error();
|
||||
if( isset( $_POST[ 'signup_for' ] ) ) {
|
||||
if ( isset( $_POST[ 'signup_for' ] ) )
|
||||
$signup[ wp_specialchars( $_POST[ 'signup_for' ] ) ] = 'checked="checked"';
|
||||
} else {
|
||||
else
|
||||
$signup[ 'blog' ] = 'checked="checked"';
|
||||
}
|
||||
|
||||
// allow definition of default variables
|
||||
$filtered_results = apply_filters('signup_user_init', array('user_name' => $user_name, 'user_email' => $user_email, 'errors' => $errors ));
|
||||
|
@ -383,11 +381,10 @@ $current_user = wp_get_current_user();
|
|||
if ( $active_signup == "none" ) {
|
||||
_e( "Registration has been disabled." );
|
||||
} elseif ( $active_signup == 'blog' && !is_user_logged_in() ) {
|
||||
if( is_ssl() ) {
|
||||
if ( is_ssl() )
|
||||
$proto = 'https://';
|
||||
} else {
|
||||
else
|
||||
$proto = 'http://';
|
||||
}
|
||||
$login_url = site_url( 'wp-login.php?redirect_to=' . urlencode($proto . $_SERVER['HTTP_HOST'] . '/wp-signup.php' ));
|
||||
echo sprintf( __( "You must first <a href=\"%s\">login</a>, and then you can create a new blog."), $login_url );
|
||||
} else {
|
||||
|
@ -410,15 +407,15 @@ if( $active_signup == "none" ) {
|
|||
default :
|
||||
$user_email = $_POST[ 'user_email' ];
|
||||
do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere?
|
||||
if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) ) {
|
||||
if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) )
|
||||
signup_another_blog($newblogname);
|
||||
} elseif( is_user_logged_in() == false && ( $active_signup == 'all' || $active_signup == 'user' ) ) {
|
||||
elseif( is_user_logged_in() == false && ( $active_signup == 'all' || $active_signup == 'user' ) )
|
||||
signup_user( $newblogname, $user_email );
|
||||
} elseif( is_user_logged_in() == false && ( $active_signup == 'blog' ) ) {
|
||||
elseif( is_user_logged_in() == false && ( $active_signup == 'blog' ) )
|
||||
_e( "I'm sorry. We're not accepting new registrations at this time." );
|
||||
} else {
|
||||
else
|
||||
_e( "You're logged in already. No need to register again!" );
|
||||
}
|
||||
|
||||
if ($newblogname) {
|
||||
if ( !is_subdomain_install() )
|
||||
$newblog = 'http://' . $current_site->domain . $current_site->path . $newblogname . '/';
|
||||
|
|
369
xmlrpc.php
369
xmlrpc.php
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue