<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14222] trunk/wp-includes/ms-functions.php: Single quotes are way cooler.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14222">14222</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-04-24 17:49:08 +0000 (Sat, 24 Apr 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Single quotes are way cooler.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesmsfunctionsphp">trunk/wp-includes/ms-functions.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-functions.php (14221 => 14222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-functions.php        2010-04-24 17:22:34 UTC (rev 14221)
+++ trunk/wp-includes/ms-functions.php        2010-04-24 17:49:08 UTC (rev 14222)
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function get_most_active_blogs( $num = 10, $display = true ) {
</span><del>-        $most_active = get_site_option( "most_active" );
</del><ins>+        $most_active = get_site_option( 'most_active' );
</ins><span class="cx">         $update = false;
</span><span class="cx">         if ( is_array( $most_active ) ) {
</span><span class="cx">                 if ( ( $most_active['time'] + 60 ) < time() ) { // cache for 60 seconds.
</span><span class="lines">@@ -186,15 +186,15 @@
</span><span class="cx">                         unset( $most_active );
</span><span class="cx">                         $most_active = $t;
</span><span class="cx">                 }
</span><del>-                update_site_option( "most_active", $most_active );
</del><ins>+                update_site_option( 'most_active', $most_active );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ( $display == true ) {
</span><span class="cx">                 if ( is_array( $most_active ) ) {
</span><span class="cx">                         reset( $most_active );
</span><span class="cx">                         foreach ( (array) $most_active as $key => $details ) {
</span><del>-                                $url = esc_url("http://" . $details['domain'] . $details['path']);
-                                echo "<li>" . $details['postcount'] . " <a href='$url'>$url</a></li>";
</del><ins>+                                $url = esc_url('http://' . $details['domain'] . $details['path']);
+                                echo '<li>' . $details['postcount'] . " <a href='$url'>$url</a></li>";
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -204,14 +204,14 @@
</span><span class="cx"> function get_user_count() {
</span><span class="cx">         global $wpdb;
</span><span class="cx">
</span><del>-        $count_ts = get_site_option( "user_count_ts" );
</del><ins>+        $count_ts = get_site_option( 'user_count_ts' );
</ins><span class="cx">         if ( time() - $count_ts > 3600 ) {
</span><span class="cx">                 $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'") );
</span><del>-                update_site_option( "user_count", $count );
-                update_site_option( "user_count_ts", time() );
</del><ins>+                update_site_option( 'user_count', $count );
+                update_site_option( 'user_count_ts', time() );
</ins><span class="cx">         }
</span><span class="cx">
</span><del>-        $count = get_site_option( "user_count" );
</del><ins>+        $count = get_site_option( 'user_count' );
</ins><span class="cx">
</span><span class="cx">         return $count;
</span><span class="cx"> }
</span><span class="lines">@@ -222,14 +222,14 @@
</span><span class="cx">         if ( $id == 0 )
</span><span class="cx">                 $id = $wpdb->siteid;
</span><span class="cx">
</span><del>-        $count_ts = get_site_option( "blog_count_ts" );
</del><ins>+        $count_ts = get_site_option( 'blog_count_ts' );
</ins><span class="cx">         if ( time() - $count_ts > 3600 ) {
</span><span class="cx">                 $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' and archived = '0'", $id) );
</span><del>-                update_site_option( "blog_count", $count );
-                update_site_option( "blog_count_ts", time() );
</del><ins>+                update_site_option( 'blog_count', $count );
+                update_site_option( 'blog_count_ts', time() );
</ins><span class="cx">         }
</span><span class="cx">
</span><del>-        $count = get_site_option( "blog_count" );
</del><ins>+        $count = get_site_option( 'blog_count' );
</ins><span class="cx">
</span><span class="cx">         return $count;
</span><span class="cx"> }
</span><span class="lines">@@ -237,11 +237,11 @@
</span><span class="cx"> function get_blog_post( $blog_id, $post_id ) {
</span><span class="cx">         global $wpdb;
</span><span class="cx">
</span><del>-        $key = $blog_id . "-" . $post_id;
-        $post = wp_cache_get( $key, "global-posts" );
</del><ins>+        $key = $blog_id . '-' . $post_id;
+        $post = wp_cache_get( $key, 'global-posts' );
</ins><span class="cx">         if ( $post == false ) {
</span><del>-                $post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->get_blog_prefix( $blog_id ) . "posts WHERE ID = %d", $post_id ) );
-                wp_cache_add( $key, $post, "global-posts" );
</del><ins>+                $post = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->get_blog_prefix( $blog_id ) . 'posts WHERE ID = %d', $post_id ) );
+                wp_cache_add( $key, $post, 'global-posts' );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return $post;
</span><span class="lines">@@ -396,7 +396,7 @@
</span><span class="cx">         $url = wpmu_admin_redirect_add_updated_param( $url );
</span><span class="cx">         if ( isset( $_GET['redirect'] ) ) {
</span><span class="cx">                 if ( substr( $_GET['redirect'], 0, 2 ) == 's_' )
</span><del>-                        $url .= "&action=blogs&s=". esc_html( substr( $_GET['redirect'], 2 ) );
</del><ins>+                        $url .= '&action=blogs&s='. esc_html( substr( $_GET['redirect'], 2 ) );
</ins><span class="cx">         } elseif ( isset( $_POST['redirect'] ) ) {
</span><span class="cx">                 $url = wpmu_admin_redirect_add_updated_param( $_POST['redirect'] );
</span><span class="cx">         }
</span><span class="lines">@@ -429,7 +429,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function is_email_address_unsafe( $user_email ) {
</span><del>-        $banned_names = get_site_option( "banned_email_domains" );
</del><ins>+        $banned_names = get_site_option( 'banned_email_domains' );
</ins><span class="cx">         if ($banned_names && !is_array( $banned_names ))
</span><span class="cx">                 $banned_names = explode( "\n", $banned_names);
</span><span class="cx">
</span><span class="lines">@@ -456,58 +456,58 @@
</span><span class="cx">
</span><span class="cx">         $errors = new WP_Error();
</span><span class="cx">
</span><del>-        $user_name = preg_replace( "/\s+/", '', sanitize_user( $user_name, true ) );
</del><ins>+        $user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) );
</ins><span class="cx">         $user_email = sanitize_email( $user_email );
</span><span class="cx">
</span><span class="cx">         if ( empty( $user_name ) )
</span><del>-                 $errors->add('user_name', __("Please enter a username"));
</del><ins>+                 $errors->add('user_name', __('Please enter a username'));
</ins><span class="cx">
</span><span class="cx">         $maybe = array();
</span><del>-        preg_match( "/[a-z0-9]+/", $user_name, $maybe );
</del><ins>+        preg_match( '/[a-z0-9]+/', $user_name, $maybe );
</ins><span class="cx">
</span><span class="cx">         if ( $user_name != $maybe[0] )
</span><del>-                $errors->add('user_name', __("Only lowercase letters and numbers allowed"));
</del><ins>+                $errors->add('user_name', __('Only lowercase letters and numbers allowed'));
</ins><span class="cx">
</span><del>-        $illegal_names = get_site_option( "illegal_names" );
</del><ins>+        $illegal_names = get_site_option( 'illegal_names' );
</ins><span class="cx">         if ( is_array( $illegal_names ) == false ) {
</span><del>-                $illegal_names = array( "www", "web", "root", "admin", "main", "invite", "administrator" );
-                add_site_option( "illegal_names", $illegal_names );
</del><ins>+                $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
+                add_site_option( 'illegal_names', $illegal_names );
</ins><span class="cx">         }
</span><span class="cx">         if ( in_array( $user_name, $illegal_names ) == true )
</span><del>-                $errors->add('user_name', __("That username is not allowed"));
</del><ins>+                $errors->add('user_name', __('That username is not allowed'));
</ins><span class="cx">
</span><span class="cx">         if ( is_email_address_unsafe( $user_email ) )
</span><del>-                $errors->add('user_email', __("You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider."));
</del><ins>+                $errors->add('user_email', __('You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.'));
</ins><span class="cx">
</span><span class="cx">         if ( strlen( $user_name ) < 4 )
</span><del>-                $errors->add('user_name', __("Username must be at least 4 characters"));
</del><ins>+                $errors->add('user_name', __('Username must be at least 4 characters'));
</ins><span class="cx">
</span><del>-        if ( strpos( " " . $user_name, "_" ) != false )
</del><ins>+        if ( strpos( ' ' . $user_name, '_' ) != false )
</ins><span class="cx">                 $errors->add( 'user_name', __( 'Sorry, usernames may not contain the character &#8220;_&#8221;!' ) );
</span><span class="cx">
</span><span class="cx">         // all numeric?
</span><span class="cx">         $match = array();
</span><span class="cx">         preg_match( '/[0-9]*/', $user_name, $match );
</span><span class="cx">         if ( $match[0] == $user_name )
</span><del>-                $errors->add('user_name', __("Sorry, usernames must have letters too!"));
</del><ins>+                $errors->add('user_name', __('Sorry, usernames must have letters too!'));
</ins><span class="cx">
</span><span class="cx">         if ( !is_email( $user_email ) )
</span><del>-                $errors->add('user_email', __("Please enter a correct email address"));
</del><ins>+                $errors->add('user_email', __('Please enter a correct email address'));
</ins><span class="cx">
</span><span class="cx">         $limited_email_domains = get_site_option( 'limited_email_domains' );
</span><span class="cx">         if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) {
</span><span class="cx">                 $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
</span><span class="cx">                 if ( in_array( $emaildomain, $limited_email_domains ) == false )
</span><del>-                        $errors->add('user_email', __("Sorry, that email address is not allowed!"));
</del><ins>+                        $errors->add('user_email', __('Sorry, that email address is not allowed!'));
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Check if the username has been used already.
</span><span class="cx">         if ( username_exists($user_name) )
</span><del>-                $errors->add('user_name', __("Sorry, that username already exists!"));
</del><ins>+                $errors->add('user_name', __('Sorry, that username already exists!'));
</ins><span class="cx">
</span><span class="cx">         // Check if the email address has been used already.
</span><span class="cx">         if ( email_exists($user_email) )
</span><del>-                $errors->add('user_email', __("Sorry, that email address is already used!"));
</del><ins>+                $errors->add('user_email', __('Sorry, that email address is already used!'));
</ins><span class="cx">
</span><span class="cx">         // Has someone already signed up for this username?
</span><span class="cx">         $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_login = %s", $user_name) );
</span><span class="lines">@@ -519,10 +519,10 @@
</span><span class="cx">                 if ( $diff > 172800 )
</span><span class="cx">                         $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE user_login = %s", $user_name) );
</span><span class="cx">                 else
</span><del>-                        $errors->add('user_name', __("That username is currently reserved but may be available in a couple of days."));
</del><ins>+                        $errors->add('user_name', __('That username is currently reserved but may be available in a couple of days.'));
</ins><span class="cx">
</span><span class="cx">                 if ( $signup->active == 0 && $signup->user_email == $user_email )
</span><del>-                        $errors->add('user_email_used', __("username and email used"));
</del><ins>+                        $errors->add('user_email_used', __('username and email used'));
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $signup = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->signups WHERE user_email = %s", $user_email) );
</span><span class="lines">@@ -532,7 +532,7 @@
</span><span class="cx">                 if ( $diff > 172800 )
</span><span class="cx">                         $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE user_email = %s", $user_email) );
</span><span class="cx">                 else
</span><del>-                        $errors->add('user_email', __("That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing."));
</del><ins>+                        $errors->add('user_email', __('That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing.'));
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $result = array('user_name' => $user_name, 'user_email' => $user_email,        'errors' => $errors);
</span><span class="lines">@@ -547,27 +547,27 @@
</span><span class="cx">         $blog_title = substr( $blog_title, 0, 50 );
</span><span class="cx">
</span><span class="cx">         $errors = new WP_Error();
</span><del>-        $illegal_names = get_site_option( "illegal_names" );
</del><ins>+        $illegal_names = get_site_option( 'illegal_names' );
</ins><span class="cx">         if ( $illegal_names == false ) {
</span><del>-                $illegal_names = array( "www", "web", "root", "admin", "main", "invite", "administrator" );
-                add_site_option( "illegal_names", $illegal_names );
</del><ins>+                $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' );
+                add_site_option( 'illegal_names', $illegal_names );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ( empty( $blogname ) )
</span><del>-                $errors->add('blogname', __("Please enter a blog name"));
</del><ins>+                $errors->add('blogname', __('Please enter a blog name'));
</ins><span class="cx">
</span><span class="cx">         $maybe = array();
</span><del>-        preg_match( "/[a-z0-9]+/", $blogname, $maybe );
</del><ins>+        preg_match( '/[a-z0-9]+/', $blogname, $maybe );
</ins><span class="cx">         if ( $blogname != $maybe[0] )
</span><del>-                $errors->add('blogname', __("Only lowercase letters and numbers allowed"));
</del><ins>+                $errors->add('blogname', __('Only lowercase letters and numbers allowed'));
</ins><span class="cx">
</span><span class="cx">         if ( in_array( $blogname, $illegal_names ) == true )
</span><del>-                $errors->add('blogname', __("That name is not allowed"));
</del><ins>+                $errors->add('blogname', __('That name is not allowed'));
</ins><span class="cx">
</span><span class="cx">         if ( strlen( $blogname ) < 4 && !is_super_admin() )
</span><del>-                $errors->add('blogname', __("Blog name must be at least 4 characters"));
</del><ins>+                $errors->add('blogname', __('Blog name must be at least 4 characters'));
</ins><span class="cx">
</span><del>-        if ( strpos( " " . $blogname, "_" ) != false )
</del><ins>+        if ( strpos( ' ' . $blogname, '_' ) != false )
</ins><span class="cx">                 $errors->add( 'blogname', __( 'Sorry, blog names may not contain the character &#8220;_&#8221;!' ) );
</span><span class="cx">
</span><span class="cx">         // do not allow users to create a blog that conflicts with a page on the main blog.
</span><span class="lines">@@ -578,14 +578,14 @@
</span><span class="cx">         $match = array();
</span><span class="cx">         preg_match( '/[0-9]*/', $blogname, $match );
</span><span class="cx">         if ( $match[0] == $blogname )
</span><del>-                $errors->add('blogname', __("Sorry, blog names must have letters too!"));
</del><ins>+                $errors->add('blogname', __('Sorry, blog names must have letters too!'));
</ins><span class="cx">
</span><del>-        $blogname = apply_filters( "newblogname", $blogname );
</del><ins>+        $blogname = apply_filters( 'newblogname', $blogname );
</ins><span class="cx">
</span><span class="cx">         $blog_title = stripslashes( $blog_title );
</span><span class="cx">
</span><span class="cx">         if ( empty( $blog_title ) )
</span><del>-                $errors->add('blog_title', __("Please enter a blog title"));
</del><ins>+                $errors->add('blog_title', __('Please enter a blog title'));
</ins><span class="cx">
</span><span class="cx">         // Check if the domain/path has been used already.
</span><span class="cx">         if ( is_subdomain_install() ) {
</span><span class="lines">@@ -596,11 +596,11 @@
</span><span class="cx">                 $path = $base.$blogname.'/';
</span><span class="cx">         }
</span><span class="cx">         if ( domain_exists($mydomain, $path) )
</span><del>-                $errors->add('blogname', __("Sorry, that blog already exists!"));
</del><ins>+                $errors->add('blogname', __('Sorry, that blog already exists!'));
</ins><span class="cx">
</span><span class="cx">         if ( username_exists( $blogname ) ) {
</span><span class="cx">                 if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) )
</span><del>-                        $errors->add( 'blogname', __( "Sorry, that blog is reserved!" ) );
</del><ins>+                        $errors->add( 'blogname', __( 'Sorry, that blog is reserved!' ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Has someone already signed up for this domain?
</span><span class="lines">@@ -611,7 +611,7 @@
</span><span class="cx">                 if ( $diff > 172800 )
</span><span class="cx">                         $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->signups WHERE domain = %s AND path = %s", $mydomain, $path) );
</span><span class="cx">                 else
</span><del>-                        $errors->add('blogname', __("That blog is currently reserved but may be available in a couple days."));
</del><ins>+                        $errors->add('blogname', __('That blog is currently reserved but may be available in a couple days.'));
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $result = array('domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors);
</span><span class="lines">@@ -647,7 +647,7 @@
</span><span class="cx">         global $wpdb;
</span><span class="cx">
</span><span class="cx">         // Format data
</span><del>-        $user = preg_replace( "/\s+/", '', sanitize_user( $user, true ) );
</del><ins>+        $user = preg_replace( '/\s+/', '', sanitize_user( $user, true ) );
</ins><span class="cx">         $user_email = sanitize_email( $user_email );
</span><span class="cx">         $key = substr( md5( time() . rand() . $user_email ), 0, 16 );
</span><span class="cx">         $meta = serialize($meta);
</span><span class="lines">@@ -680,10 +680,10 @@
</span><span class="cx">                 $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo use *_url() API
</span><span class="cx">
</span><span class="cx">         $activate_url = esc_url($activate_url);
</span><del>-        $admin_email = get_site_option( "admin_email" );
</del><ins>+        $admin_email = get_site_option( 'admin_email' );
</ins><span class="cx">         if ( $admin_email == '' )
</span><span class="cx">                 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
</span><del>-        $from_name = get_site_option( "site_name" ) == '' ? 'WordPress' : esc_html( get_site_option( "site_name" ) );
</del><ins>+        $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
</ins><span class="cx">         $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
</span><span class="cx">         $message = sprintf( apply_filters( 'wpmu_signup_blog_notification_email', __( "To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your blog here:\n\n%s" ) ), $activate_url, esc_url( "http://{$domain}{$path}" ), $key );
</span><span class="cx">         // TODO: Don't hard code activation link.
</span><span class="lines">@@ -697,10 +697,10 @@
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         // Send email with activation link.
</span><del>-        $admin_email = get_site_option( "admin_email" );
</del><ins>+        $admin_email = get_site_option( 'admin_email' );
</ins><span class="cx">         if ( $admin_email == '' )
</span><span class="cx">                 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
</span><del>-        $from_name = get_site_option( "site_name" ) == '' ? 'WordPress' : esc_html( get_site_option( "site_name" ) );
</del><ins>+        $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
</ins><span class="cx">         $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
</span><span class="cx">         $message = sprintf( apply_filters( 'wpmu_signup_user_notification_email', __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n" ) ), site_url( "wp-activate.php?key=$key" ), $key );
</span><span class="cx">         // TODO: Don't hard code activation link.
</span><span class="lines">@@ -779,7 +779,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function wpmu_create_user( $user_name, $password, $email) {
</span><del>-        $user_name = preg_replace( "/\s+/", '', sanitize_user( $user_name, true ) );
</del><ins>+        $user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) );
</ins><span class="cx">
</span><span class="cx">         $user_id = wp_create_user( $user_name, $password, $email );
</span><span class="cx">         if ( is_wp_error($user_id) )
</span><span class="lines">@@ -795,7 +795,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function wpmu_create_blog($domain, $path, $title, $user_id, $meta = '', $site_id = 1) {
</span><del>-        $domain = preg_replace( "/\s+/", '', sanitize_user( $domain, true ) );
</del><ins>+        $domain = preg_replace( '/\s+/', '', sanitize_user( $domain, true ) );
</ins><span class="cx">
</span><span class="cx">         if ( is_subdomain_install() )
</span><span class="cx">                 $domain = str_replace( '@', '', $domain );
</span><span class="lines">@@ -810,8 +810,8 @@
</span><span class="cx">         if ( domain_exists($domain, $path, $site_id) )
</span><span class="cx">                 return new WP_Error('blog_taken', __('Blog already exists.'));
</span><span class="cx">
</span><del>-        if ( !defined("WP_INSTALLING") )
-                define( "WP_INSTALLING", true );
</del><ins>+        if ( !defined('WP_INSTALLING') )
+                define( 'WP_INSTALLING', true );
</ins><span class="cx">
</span><span class="cx">         if ( ! $blog_id = insert_blog($domain, $path, $site_id) )
</span><span class="cx">                 return new WP_Error('insert_blog', __('Could not create blog.'));
</span><span class="lines">@@ -856,14 +856,14 @@
</span><span class="cx">         $siteurl = site_url();
</span><span class="cx">         restore_current_blog();
</span><span class="cx">
</span><del>-        $msg = sprintf( __( "New Blog: %1s
</del><ins>+        $msg = sprintf( __( 'New Blog: %1s
</ins><span class="cx"> URL: %2s
</span><span class="cx"> Remote IP: %3s
</span><span class="cx">
</span><del>-Disable these notifications: %4s"), $blogname, $siteurl, $_SERVER['REMOTE_ADDR'], $options_site_url);
</del><ins>+Disable these notifications: %4s' ), $blogname, $siteurl, $_SERVER['REMOTE_ADDR'], $options_site_url);
</ins><span class="cx">         $msg = apply_filters( 'newblog_notify_siteadmin', $msg );
</span><span class="cx">
</span><del>-        wp_mail( $email, sprintf( __( "New Blog Registration: %s" ), $siteurl ), $msg );
</del><ins>+        wp_mail( $email, sprintf( __( 'New Blog Registration: %s' ), $siteurl ), $msg );
</ins><span class="cx">         return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -879,13 +879,13 @@
</span><span class="cx">         $user = new WP_User($user_id);
</span><span class="cx">
</span><span class="cx">         $options_site_url = esc_url(network_admin_url('ms-options.php'));
</span><del>-        $msg = sprintf(__("New User: %1s
</del><ins>+        $msg = sprintf(__('New User: %1s
</ins><span class="cx"> Remote IP: %2s
</span><span class="cx">
</span><del>-Disable these notifications: %3s"), $user->user_login, $_SERVER['REMOTE_ADDR'], $options_site_url);
</del><ins>+Disable these notifications: %3s'), $user->user_login, $_SERVER['REMOTE_ADDR'], $options_site_url);
</ins><span class="cx">
</span><span class="cx">         $msg = apply_filters( 'newuser_notify_siteadmin', $msg );
</span><del>-        wp_mail( $email, sprintf(__("New User Registration: %s"), $user->user_login), $msg );
</del><ins>+        wp_mail( $email, sprintf(__('New User Registration: %s'), $user->user_login), $msg );
</ins><span class="cx">         return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -987,24 +987,24 @@
</span><span class="cx">         $url = get_blogaddress_by_id($blog_id);
</span><span class="cx">         $user = new WP_User($user_id);
</span><span class="cx">
</span><del>-        $welcome_email = str_replace( "SITE_NAME", $current_site->site_name, $welcome_email );
-        $welcome_email = str_replace( "BLOG_TITLE", $title, $welcome_email );
-        $welcome_email = str_replace( "BLOG_URL", $url, $welcome_email );
-        $welcome_email = str_replace( "USERNAME", $user->user_login, $welcome_email );
-        $welcome_email = str_replace( "PASSWORD", $password, $welcome_email );
</del><ins>+        $welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
+        $welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email );
+        $welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email );
+        $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
+        $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
</ins><span class="cx">
</span><del>-        $welcome_email = apply_filters( "update_welcome_email", $welcome_email, $blog_id, $user_id, $password, $title, $meta);
-        $admin_email = get_site_option( "admin_email" );
</del><ins>+        $welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta);
+        $admin_email = get_site_option( 'admin_email' );
</ins><span class="cx">
</span><span class="cx">         if ( $admin_email == '' )
</span><span class="cx">                 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
</span><span class="cx">
</span><del>-        $from_name = get_site_option( "site_name" ) == '' ? 'WordPress' : esc_html( get_site_option( "site_name" ) );
</del><ins>+        $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
</ins><span class="cx">         $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
</span><span class="cx">         $message = $welcome_email;
</span><span class="cx">
</span><span class="cx">         if ( empty( $current_site->site_name ) )
</span><del>-                $current_site->site_name = "WordPress MU";
</del><ins>+                $current_site->site_name = 'WordPress MU';
</ins><span class="cx">
</span><span class="cx">         $subject = apply_filters( 'update_welcome_subject', sprintf(__('New %1$s Blog: %2$s'), $current_site->site_name, stripslashes( $title ) ) );
</span><span class="cx">         wp_mail($user->user_email, $subject, $message, $message_headers);
</span><span class="lines">@@ -1021,23 +1021,23 @@
</span><span class="cx">
</span><span class="cx">         $user = new WP_User($user_id);
</span><span class="cx">
</span><del>-        $welcome_email = apply_filters( "update_welcome_user_email", $welcome_email, $user_id, $password, $meta);
-        $welcome_email = str_replace( "SITE_NAME", $current_site->site_name, $welcome_email );
-        $welcome_email = str_replace( "USERNAME", $user->user_login, $welcome_email );
-        $welcome_email = str_replace( "PASSWORD", $password, $welcome_email );
-        $welcome_email = str_replace( "LOGINLINK", wp_login_url(), $welcome_email );
</del><ins>+        $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta);
+        $welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );
+        $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
+        $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
+        $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
</ins><span class="cx">
</span><del>-        $admin_email = get_site_option( "admin_email" );
</del><ins>+        $admin_email = get_site_option( 'admin_email' );
</ins><span class="cx">
</span><span class="cx">         if ( $admin_email == '' )
</span><span class="cx">                 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
</span><span class="cx">
</span><del>-        $from_name = get_site_option( "site_name" ) == '' ? 'WordPress' : esc_html( get_site_option( "site_name" ) );
</del><ins>+        $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
</ins><span class="cx">         $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
</span><span class="cx">         $message = $welcome_email;
</span><span class="cx">
</span><span class="cx">         if ( empty( $current_site->site_name ) )
</span><del>-                $current_site->site_name = "WordPress MU";
</del><ins>+                $current_site->site_name = 'WordPress MU';
</ins><span class="cx">
</span><span class="cx">         $subject = apply_filters( 'update_welcome_user_subject', sprintf(__('New %1$s User: %2$s'), $current_site->site_name, $user->user_login) );
</span><span class="cx">         wp_mail($user->user_email, $subject, $message, $message_headers);
</span><span class="lines">@@ -1161,7 +1161,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function check_upload_mimes( $mimes ) {
</span><del>-        $site_exts = explode( " ", get_site_option( "upload_filetypes" ) );
</del><ins>+        $site_exts = explode( ' ', get_site_option( 'upload_filetypes' ) );
</ins><span class="cx">         foreach ( $site_exts as $ext ) {
</span><span class="cx">                 foreach ( $mimes as $ext_pattern => $mime ) {
</span><span class="cx">                         if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false )
</span><span class="lines">@@ -1173,7 +1173,7 @@
</span><span class="cx">
</span><span class="cx"> function update_posts_count( $deprecated = '' ) {
</span><span class="cx">         global $wpdb;
</span><del>-        update_option( "post_count", (int) $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_status = 'publish' and post_type = 'post'" ) );
</del><ins>+        update_option( 'post_count', (int) $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_status = 'publish' and post_type = 'post'" ) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function wpmu_log_new_registrations( $blog_id, $user_id ) {
</span><span class="lines">@@ -1268,8 +1268,8 @@
</span><span class="cx">         if ( is_array( $upload ) == false || defined( 'WP_IMPORTING' ) )
</span><span class="cx">                 return $upload;
</span><span class="cx">
</span><del>-        if ( strlen( $upload[ 'bits' ] ) > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )
-                return sprintf(__( "This file is too big. Files must be less than %dKb in size.<br />" ), get_site_option( 'fileupload_maxk', 1500 ));
</del><ins>+        if ( strlen( $upload['bits'] ) > ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) )
+                return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_site_option( 'fileupload_maxk', 1500 ));
</ins><span class="cx">
</span><span class="cx">         return $upload;
</span><span class="cx"> }
</span><span class="lines">@@ -1316,7 +1316,7 @@
</span><span class="cx">         if ( $key == '' )
</span><span class="cx">                 $key = array_pop( $parts );
</span><span class="cx">
</span><del>-        $details = get_option( "new_user_" . $key );
</del><ins>+        $details = get_option( 'new_user_' . $key );
</ins><span class="cx">         add_existing_user_to_blog( $details );
</span><span class="cx">         delete_option( 'new_user_' . $key );
</span><span class="cx">         wp_die( sprintf(__('You have been added to this blog. Please visit the <a href="%s">homepage</a> or <a href="%s">login</a> using your username and password.'), site_url(), admin_url() ) );
</span><span class="lines">@@ -1325,7 +1325,7 @@
</span><span class="cx"> function add_existing_user_to_blog( $details = false ) {
</span><span class="cx">         if ( is_array( $details ) ) {
</span><span class="cx">                 add_user_to_blog( '', $details[ 'user_id' ], $details[ 'role' ] );
</span><del>-                do_action( "added_existing_user", $details[ 'user_id' ] );
</del><ins>+                do_action( 'added_existing_user', $details[ 'user_id' ] );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1395,7 +1395,7 @@
</span><span class="cx">         if ( $blog_id == 0 )
</span><span class="cx">                 $blog_id = $wpdb->blogid;
</span><span class="cx">
</span><del>-        $local_key = $wpdb->base_prefix . $blog_id . "_" . $key;
</del><ins>+        $local_key = $wpdb->base_prefix . $blog_id . '_' . $key;
</ins><span class="cx">
</span><span class="cx">         if ( isset( $current_user->$local_key ) )
</span><span class="cx">                 return true;
</span><span class="lines">@@ -1414,7 +1414,7 @@
</span><span class="cx">
</span><span class="cx"> function welcome_user_msg_filter( $text ) {
</span><span class="cx">         if ( !$text ) {
</span><del>-                return __( "Dear User,
</del><ins>+                return __( 'Dear User,
</ins><span class="cx">
</span><span class="cx"> Your new account is set up.
</span><span class="cx">
</span><span class="lines">@@ -1425,7 +1425,7 @@
</span><span class="cx">
</span><span class="cx"> Thanks!
</span><span class="cx">
</span><del>---The Team @ SITE_NAME" );
</del><ins>+--The Team @ SITE_NAME' );
</ins><span class="cx">         }
</span><span class="cx">         return $text;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>