]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/ms-functions.php
WordPress 4.0
[autoinstalls/wordpress.git] / wp-includes / ms-functions.php
index 431ba070aaf4ae5a3b6e8596b0f2b0d93ff5cb86..6d7a2fbd52bef85c4778fa4a40d19fdfed60bddd 100644 (file)
@@ -1761,7 +1761,7 @@ function check_upload_mimes( $mimes ) {
  * WordPress MS stores a blog's post count as an option so as
  * to avoid extraneous COUNTs when a blog's details are fetched
  * with get_blog_details(). This function is called when posts
- * are published to make sure the count stays current.
+ * are published or unpublished to make sure the count stays current.
  *
  * @since MU
  */
@@ -2078,11 +2078,9 @@ function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
        global $wpdb;
 
        $current_user = wp_get_current_user();
-       if ( $user_id == 0 )
-               $user_id = $current_user->ID;
-       if ( $blog_id == 0 )
+       if ( $blog_id == 0 ) {
                $blog_id = $wpdb->blogid;
-
+       }
        $local_key = $wpdb->get_blog_prefix( $blog_id ) . $key;
 
        if ( isset( $current_user->$local_key ) )