X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/849f15aeed7a5e39314057bdc0064d8edd60dd7d..8ab4a4532479e8db471032b51042ec8c4716d091:/wp-includes/ms-functions.php
diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php
index 5537fb36..6dbcf086 100644
--- a/wp-includes/ms-functions.php
+++ b/wp-includes/ms-functions.php
@@ -434,23 +434,20 @@ function is_email_address_unsafe( $user_email ) {
}
/**
- * Processes new user registrations.
+ * Sanitize and validate data required for a user sign-up.
*
- * Checks the data provided by the user during signup. Verifies
- * the validity and uniqueness of user names and user email addresses,
- * and checks email addresses against admin-provided domain
- * whitelists and blacklists.
+ * Verifies the validity and uniqueness of user names and user email addresses,
+ * and checks email addresses against admin-provided domain whitelists and blacklists.
*
- * The hook 'wpmu_validate_user_signup' provides an easy way
- * to modify the signup process. The value $result, which is passed
- * to the hook, contains both the user-provided info and the error
- * messages created by the function. 'wpmu_validate_user_signup' allows
- * you to process the data in any way you'd like, and unset the
- * relevant errors if necessary.
+ * The {@see 'wpmu_validate_user_signup'} hook provides an easy way to modify the sign-up
+ * process. The value $result, which is passed to the hook, contains both the user-provided
+ * info and the error messages created by the function. {@see 'wpmu_validate_user_signup'}
+ * allows you to process the data in any way you'd like, and unset the relevant errors if
+ * necessary.
*
* @since MU
*
- * @param string $user_name The login name provided by the user.
+ * @param string $user_name The login name provided by the user.
* @param string $user_email The email provided by the user.
* @return array Contains username, email, and error messages.
*/
@@ -1437,7 +1434,7 @@ function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta
$welcome_email = get_site_option( 'welcome_email' );
if ( $welcome_email == false )
- $welcome_email = __( 'Dear User,
+ $welcome_email = __( 'Howdy USERNAME,
Your new SITE_NAME site has been successfully set up at:
BLOG_URL
@@ -1804,11 +1801,13 @@ function global_terms( $term_id, $deprecated = '' ) {
$global_id = $wpdb->insert_id;
}
} elseif ( $global_id != $term_id ) {
- $local_id = $wpdb->get_row( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
- if ( null != $local_id )
- $local_id = global_terms( $local_id );
- if ( 10 < $global_terms_recurse )
+ $local_id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
+ if ( null != $local_id ) {
+ global_terms( $local_id );
+ if ( 10 < $global_terms_recurse ) {
$global_id = $term_id;
+ }
+ }
}
if ( $global_id != $term_id ) {
@@ -1935,7 +1934,7 @@ function maybe_add_existing_user_to_blog() {
if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) )
wp_die( sprintf(__('An error occurred adding you to this site. Back to the homepage.'), home_url() ) );
- wp_die( sprintf( __( 'You have been added to this site. Please visit the homepage or log in using your username and password.' ), home_url(), admin_url() ), __( 'WordPress › Success' ) );
+ wp_die( sprintf( __( 'You have been added to this site. Please visit the homepage or log in using your username and password.' ), home_url(), admin_url() ), __( 'WordPress › Success' ), array( 'response' => 200 ) );
}
/**
@@ -2005,11 +2004,12 @@ function fix_phpmailer_messageid( $phpmailer ) {
* @return bool
*/
function is_user_spammy( $user = null ) {
- if ( ! is_a( $user, 'WP_User' ) ) {
- if ( $user )
+ if ( ! ( $user instanceof WP_User ) ) {
+ if ( $user ) {
$user = get_user_by( 'login', $user );
- else
+ } else {
$user = wp_get_current_user();
+ }
}
return $user && isset( $user->spam ) && 1 == $user->spam;
@@ -2028,7 +2028,6 @@ function is_user_spammy( $user = null ) {
function update_blog_public( $old_value, $value ) {
update_blog_status( get_current_blog_id(), 'public', (int) $value );
}
-add_action('update_option_blog_public', 'update_blog_public', 10, 2);
/**
* Check whether a usermeta key has to do with the current blog.
@@ -2069,7 +2068,6 @@ function users_can_register_signup_filter() {
return false;
}
-add_filter('option_users_can_register', 'users_can_register_signup_filter');
/**
* Ensure that the welcome message is not empty. Currently unused.
@@ -2082,7 +2080,7 @@ add_filter('option_users_can_register', 'users_can_register_signup_filter');
function welcome_user_msg_filter( $text ) {
if ( !$text ) {
remove_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );
- $text = __( 'Dear User,
+ $text = __( 'Howdy USERNAME,
Your new account is set up.
@@ -2098,7 +2096,6 @@ Thanks!
}
return $text;
}
-add_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );
/**
* Whether to force SSL on content.