<!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>[13311] trunk: Don't use deprecated *_usermeta() functions.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13311">13311</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-02-22 21:25:32 +0000 (Mon, 22 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Don't use deprecated *_usermeta() functions. Props technosailor fixes <a href="http://trac.wordpress.org/ticket/10837">#10837</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminajaxphp">trunk/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunkwpadminimportdotclearphp">trunk/wp-admin/import/dotclear.php</a></li>
<li><a href="#trunkwpadminimporttextpatternphp">trunk/wp-admin/import/textpattern.php</a></li>
<li><a href="#trunkwpadminincludesmiscphp">trunk/wp-admin/includes/misc.php</a></li>
<li><a href="#trunkwpadminincludesmsphp">trunk/wp-admin/includes/ms.php</a></li>
<li><a href="#trunkwpadminincludesschemaphp">trunk/wp-admin/includes/schema.php</a></li>
<li><a href="#trunkwpadminincludesupgradephp">trunk/wp-admin/includes/upgrade.php</a></li>
<li><a href="#trunkwpadminmseditphp">trunk/wp-admin/ms-edit.php</a></li>
<li><a href="#trunkwpadminpluginsphp">trunk/wp-admin/plugins.php</a></li>
<li><a href="#trunkwpadminusereditphp">trunk/wp-admin/user-edit.php</a></li>
<li><a href="#trunkwpincludescapabilitiesphp">trunk/wp-includes/capabilities.php</a></li>
<li><a href="#trunkwpincludesmsfunctionsphp">trunk/wp-includes/ms-functions.php</a></li>
<li><a href="#trunkwpincludesregistrationphp">trunk/wp-includes/registration.php</a></li>
<li><a href="#trunkwpincludesuserphp">trunk/wp-includes/user.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-ajax.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/admin-ajax.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -998,11 +998,11 @@
</span><span class="cx">                 die('-1');
</span><span class="cx"> 
</span><span class="cx">         if ( is_array($closed) )
</span><del>-                update_usermeta($user-&gt;ID, 'closedpostboxes_'.$page, $closed);
</del><ins>+                update_user_meta($user-&gt;ID, 'closedpostboxes_'.$page, $closed);
</ins><span class="cx"> 
</span><span class="cx">         if ( is_array($hidden) ) {
</span><span class="cx">                 $hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv') ); // postboxes that are always shown
</span><del>-                update_usermeta($user-&gt;ID, 'meta-box-hidden_'.$page, $hidden);
</del><ins>+                update_user_meta($user-&gt;ID, 'meta-box-hidden_'.$page, $hidden);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         die('1');
</span><span class="lines">@@ -1020,7 +1020,7 @@
</span><span class="cx">                 die('-1');
</span><span class="cx"> 
</span><span class="cx">         if ( is_array($hidden) )
</span><del>-                update_usermeta($user-&gt;ID, &quot;manage-$page-columns-hidden&quot;, $hidden);
</del><ins>+                update_user_meta($user-&gt;ID, &quot;manage-$page-columns-hidden&quot;, $hidden);
</ins><span class="cx"> 
</span><span class="cx">         die('1');
</span><span class="cx">         break;
</span><span class="lines">@@ -1040,7 +1040,7 @@
</span><span class="cx">                 update_user_option($user-&gt;ID, &quot;meta-box-order_$page&quot;, $order);
</span><span class="cx"> 
</span><span class="cx">         if ( $page_columns )
</span><del>-                update_usermeta($user-&gt;ID, &quot;screen_layout_$page&quot;, $page_columns);
</del><ins>+                update_user_meta($user-&gt;ID, &quot;screen_layout_$page&quot;, $page_columns);
</ins><span class="cx"> 
</span><span class="cx">         die('1');
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkwpadminimportdotclearphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/import/dotclear.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/import/dotclear.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/import/dotclear.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -257,10 +257,10 @@
</span><span class="cx">                                 else if (2  &lt;= $wp_perms) { $user-&gt;set_role('contributor'); }
</span><span class="cx">                                 else                     { $user-&gt;set_role('subscriber'); }
</span><span class="cx"> 
</span><del>-                                update_usermeta( $ret_id, 'wp_user_level', $wp_perms);
-                                update_usermeta( $ret_id, 'rich_editing', 'false');
-                                update_usermeta( $ret_id, 'first_name', csc ($user_prenom));
-                                update_usermeta( $ret_id, 'last_name', csc ($user_nom));
</del><ins>+                                update_user_meta( $ret_id, 'wp_user_level', $wp_perms);
+                                update_user_meta( $ret_id, 'rich_editing', 'false');
+                                update_user_meta( $ret_id, 'first_name', csc ($user_prenom));
+                                update_user_meta( $ret_id, 'last_name', csc ($user_nom));
</ins><span class="cx">                         }// End foreach($users as $user)
</span><span class="cx"> 
</span><span class="cx">                         // Store id translation array for future use
</span></span></pre></div>
<a id="trunkwpadminimporttextpatternphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/import/textpattern.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/import/textpattern.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/import/textpattern.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -265,8 +265,8 @@
</span><span class="cx">                                 if('2'  == $transperms[$privs]) { $user-&gt;set_role('contributor'); }
</span><span class="cx">                                 if('0'  == $transperms[$privs]) { $user-&gt;set_role('subscriber'); }
</span><span class="cx"> 
</span><del>-                                update_usermeta( $ret_id, 'wp_user_level', $transperms[$privs] );
-                                update_usermeta( $ret_id, 'rich_editing', 'false');
</del><ins>+                                update_user_meta( $ret_id, 'wp_user_level', $transperms[$privs] );
+                                update_user_meta( $ret_id, 'rich_editing', 'false');
</ins><span class="cx">                         }// End foreach($users as $user)
</span><span class="cx"> 
</span><span class="cx">                         // Store id translation array for future use
</span></span></pre></div>
<a id="trunkwpadminincludesmiscphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/misc.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/misc.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/includes/misc.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -424,7 +424,7 @@
</span><span class="cx">                                 break;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                update_usermeta($user-&gt;ID, $option, $value);
</del><ins>+                update_user_meta($user-&gt;ID, $option, $value);
</ins><span class="cx">                 wp_redirect( remove_query_arg( array('pagenum', 'apage', 'paged'), wp_get_referer() ) );
</span><span class="cx">                 exit;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpadminincludesmsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ms.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ms.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/includes/ms.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -543,12 +543,12 @@
</span><span class="cx"> 
</span><span class="cx">         if ( !empty( $blogs ) ) {
</span><span class="cx">                 foreach( $blogs as $blogid =&gt; $blog ) {
</span><del>-                        if ( $blogid != $dashboard_blog-&gt;blog_id &amp;&amp; get_usermeta( $current_user-&gt;ID , 'primary_blog' ) == $dashboard_blog-&gt;blog_id ) {
-                                update_usermeta( $current_user-&gt;ID, 'primary_blog', $blogid );
</del><ins>+                        if ( $blogid != $dashboard_blog-&gt;blog_id &amp;&amp; get_user_meta( $current_user-&gt;ID , 'primary_blog' ) == $dashboard_blog-&gt;blog_id ) {
+                                update_user_meta( $current_user-&gt;ID, 'primary_blog', $blogid );
</ins><span class="cx">                                 continue;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-                $blog = get_blog_details( get_usermeta( $current_user-&gt;ID , 'primary_blog' ) );
</del><ins>+                $blog = get_blog_details( get_user_meta( $current_user-&gt;ID , 'primary_blog' ) );
</ins><span class="cx">                 $protocol = ( is_ssl() ? 'https://' : 'http://' );
</span><span class="cx">                 wp_redirect( $protocol . $blog-&gt;domain . $blog-&gt;path . 'wp-admin/?c=' . $c ); // redirect and count to 5, &quot;just in case&quot;
</span><span class="cx">                 exit;
</span><span class="lines">@@ -690,7 +690,7 @@
</span><span class="cx">                 &lt;td&gt;
</span><span class="cx">                 &lt;?php
</span><span class="cx">                 $all_blogs = get_blogs_of_user( $current_user-&gt;ID );
</span><del>-                $primary_blog = get_usermeta($current_user-&gt;ID, 'primary_blog');
</del><ins>+                $primary_blog = get_user_meta($current_user-&gt;ID, 'primary_blog');
</ins><span class="cx">                 if ( count( $all_blogs ) &gt; 1 ) {
</span><span class="cx">                         $found = false;
</span><span class="cx">                         ?&gt;
</span><span class="lines">@@ -704,13 +704,13 @@
</span><span class="cx">                         &lt;?php
</span><span class="cx">                         if ( !$found ) {
</span><span class="cx">                                 $blog = array_shift( $all_blogs );
</span><del>-                                update_usermeta( $current_user-&gt;ID, 'primary_blog', $blog-&gt;userblog_id );
</del><ins>+                                update_user_meta( $current_user-&gt;ID, 'primary_blog', $blog-&gt;userblog_id );
</ins><span class="cx">                         }
</span><span class="cx">                 } elseif ( count( $all_blogs ) == 1 ) {
</span><span class="cx">                         $blog = array_shift( $all_blogs );
</span><span class="cx">                         echo $blog-&gt;domain;
</span><span class="cx">                         if ( $primary_blog != $blog-&gt;userblog_id ) // Set the primary blog again if it's out of sync with blog list.
</span><del>-                                update_usermeta( $current_user-&gt;ID, 'primary_blog', $blog-&gt;userblog_id );
</del><ins>+                                update_user_meta( $current_user-&gt;ID, 'primary_blog', $blog-&gt;userblog_id );
</ins><span class="cx">                 } else {
</span><span class="cx">                         echo &quot;N/A&quot;;
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkwpadminincludesschemaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/schema.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/schema.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/includes/schema.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -721,8 +721,8 @@
</span><span class="cx">         if ( !is_multisite() ) {
</span><span class="cx">                 $wpdb-&gt;insert( $wpdb-&gt;blogs, array( 'site_id' =&gt; $network_id, 'domain' =&gt; $domain, 'path' =&gt; $path ) );
</span><span class="cx">                 $blog_id = $wpdb-&gt;insert_id;
</span><del>-                update_usermeta( $site_user-&gt;ID, 'source_domain', $domain );
-                update_usermeta( $site_user-&gt;ID, 'primary_blog', $blog_id );
</del><ins>+                update_user_meta( $site_user-&gt;ID, 'source_domain', $domain );
+                update_user_meta( $site_user-&gt;ID, 'primary_blog', $blog_id );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ( $vhost == 'yes' )
</span></span></pre></div>
<a id="trunkwpadminincludesupgradephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/upgrade.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/upgrade.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/includes/upgrade.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -671,23 +671,23 @@
</span><span class="cx">         $users = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;users&quot;);
</span><span class="cx">         foreach ( $users as $user ) :
</span><span class="cx">                 if ( !empty( $user-&gt;user_firstname ) )
</span><del>-                        update_usermeta( $user-&gt;ID, 'first_name', $wpdb-&gt;escape($user-&gt;user_firstname) );
</del><ins>+                        update_user_meta( $user-&gt;ID, 'first_name', $wpdb-&gt;escape($user-&gt;user_firstname) );
</ins><span class="cx">                 if ( !empty( $user-&gt;user_lastname ) )
</span><del>-                        update_usermeta( $user-&gt;ID, 'last_name', $wpdb-&gt;escape($user-&gt;user_lastname) );
</del><ins>+                        update_user_meta( $user-&gt;ID, 'last_name', $wpdb-&gt;escape($user-&gt;user_lastname) );
</ins><span class="cx">                 if ( !empty( $user-&gt;user_nickname ) )
</span><del>-                        update_usermeta( $user-&gt;ID, 'nickname', $wpdb-&gt;escape($user-&gt;user_nickname) );
</del><ins>+                        update_user_meta( $user-&gt;ID, 'nickname', $wpdb-&gt;escape($user-&gt;user_nickname) );
</ins><span class="cx">                 if ( !empty( $user-&gt;user_level ) )
</span><del>-                        update_usermeta( $user-&gt;ID, $wpdb-&gt;prefix . 'user_level', $user-&gt;user_level );
</del><ins>+                        update_user_meta( $user-&gt;ID, $wpdb-&gt;prefix . 'user_level', $user-&gt;user_level );
</ins><span class="cx">                 if ( !empty( $user-&gt;user_icq ) )
</span><del>-                        update_usermeta( $user-&gt;ID, 'icq', $wpdb-&gt;escape($user-&gt;user_icq) );
</del><ins>+                        update_user_meta( $user-&gt;ID, 'icq', $wpdb-&gt;escape($user-&gt;user_icq) );
</ins><span class="cx">                 if ( !empty( $user-&gt;user_aim ) )
</span><del>-                        update_usermeta( $user-&gt;ID, 'aim', $wpdb-&gt;escape($user-&gt;user_aim) );
</del><ins>+                        update_user_meta( $user-&gt;ID, 'aim', $wpdb-&gt;escape($user-&gt;user_aim) );
</ins><span class="cx">                 if ( !empty( $user-&gt;user_msn ) )
</span><del>-                        update_usermeta( $user-&gt;ID, 'msn', $wpdb-&gt;escape($user-&gt;user_msn) );
</del><ins>+                        update_user_meta( $user-&gt;ID, 'msn', $wpdb-&gt;escape($user-&gt;user_msn) );
</ins><span class="cx">                 if ( !empty( $user-&gt;user_yim ) )
</span><del>-                        update_usermeta( $user-&gt;ID, 'yim', $wpdb-&gt;escape($user-&gt;user_icq) );
</del><ins>+                        update_user_meta( $user-&gt;ID, 'yim', $wpdb-&gt;escape($user-&gt;user_icq) );
</ins><span class="cx">                 if ( !empty( $user-&gt;user_description ) )
</span><del>-                        update_usermeta( $user-&gt;ID, 'description', $wpdb-&gt;escape($user-&gt;user_description) );
</del><ins>+                        update_user_meta( $user-&gt;ID, 'description', $wpdb-&gt;escape($user-&gt;user_description) );
</ins><span class="cx"> 
</span><span class="cx">                 if ( isset( $user-&gt;user_idmode ) ):
</span><span class="cx">                         $idmode = $user-&gt;user_idmode;
</span><span class="lines">@@ -702,11 +702,11 @@
</span><span class="cx">                 endif;
</span><span class="cx"> 
</span><span class="cx">                 // FIXME: RESET_CAPS is temporary code to reset roles and caps if flag is set.
</span><del>-                $caps = get_usermeta( $user-&gt;ID, $wpdb-&gt;prefix . 'capabilities');
</del><ins>+                $caps = get_user_meta( $user-&gt;ID, $wpdb-&gt;prefix . 'capabilities');
</ins><span class="cx">                 if ( empty($caps) || defined('RESET_CAPS') ) {
</span><del>-                        $level = get_usermeta($user-&gt;ID, $wpdb-&gt;prefix . 'user_level');
</del><ins>+                        $level = get_user_meta($user-&gt;ID, $wpdb-&gt;prefix . 'user_level');
</ins><span class="cx">                         $role = translate_level_to_role($level);
</span><del>-                        update_usermeta( $user-&gt;ID, $wpdb-&gt;prefix . 'capabilities', array($role =&gt; true) );
</del><ins>+                        update_user_meta( $user-&gt;ID, $wpdb-&gt;prefix . 'capabilities', array($role =&gt; true) );
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">         endforeach;
</span></span></pre></div>
<a id="trunkwpadminmseditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-edit.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-edit.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/ms-edit.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">                                 foreach ( (array)$move_users as $user_id ) {
</span><span class="cx">                                         remove_user_from_blog($user_id, get_site_option( 'dashboard_blog' ) );
</span><span class="cx">                                         add_user_to_blog( $dashboard_blog_id, $user_id, get_site_option( 'default_user_role', 'subscriber' ) );
</span><del>-                                        update_usermeta( $user_id, 'primary_blog', $dashboard_blog_id );
</del><ins>+                                        update_user_meta( $user_id, 'primary_blog', $dashboard_blog_id );
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/plugins.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> if ( !in_array($status, array('all', 'active', 'inactive', 'recent', 'upgrade', 'network', 'mustuse', 'dropins', 'search')) )
</span><span class="cx">         $status = 'all';
</span><span class="cx"> if ( $status != $default_status &amp;&amp; 'search' != $status )
</span><del>-        update_usermeta($current_user-&gt;ID, 'plugins_last_view', $status);
</del><ins>+        update_user_meta($current_user-&gt;ID, 'plugins_last_view', $status);
</ins><span class="cx"> 
</span><span class="cx"> $page = isset($_REQUEST['paged']) ? $_REQUEST['paged'] : 1;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminusereditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/user-edit.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/user-edit.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-admin/user-edit.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx">         if ( !isset( $errors ) || ( isset( $errors ) &amp;&amp; is_object( $errors ) &amp;&amp; false == $errors-&gt;get_error_codes() ) )
</span><span class="cx">                 $errors = edit_user($user_id);
</span><span class="cx">         if ( $delete_role ) // stops users being added to current blog when they are edited
</span><del>-                update_usermeta( $user_id, $blog_prefix . 'capabilities' , '' );
</del><ins>+                update_user_meta( $user_id, $blog_prefix . 'capabilities' , '' );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> if ( !is_wp_error( $errors ) ) {
</span></span></pre></div>
<a id="trunkwpincludescapabilitiesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/capabilities.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/capabilities.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-includes/capabilities.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -567,7 +567,7 @@
</span><span class="cx">          */
</span><span class="cx">         function add_role( $role ) {
</span><span class="cx">                 $this-&gt;caps[$role] = true;
</span><del>-                update_usermeta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</del><ins>+                update_user_meta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</ins><span class="cx">                 $this-&gt;get_role_caps();
</span><span class="cx">                 $this-&gt;update_user_level_from_caps();
</span><span class="cx">         }
</span><span class="lines">@@ -584,7 +584,7 @@
</span><span class="cx">                 if ( empty( $this-&gt;roles[$role] ) || ( count( $this-&gt;roles ) &lt;= 1 ) )
</span><span class="cx">                         return;
</span><span class="cx">                 unset( $this-&gt;caps[$role] );
</span><del>-                update_usermeta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</del><ins>+                update_user_meta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</ins><span class="cx">                 $this-&gt;get_role_caps();
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -609,7 +609,7 @@
</span><span class="cx">                 } else {
</span><span class="cx">                         $this-&gt;roles = false;
</span><span class="cx">                 }
</span><del>-                update_usermeta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</del><ins>+                update_user_meta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</ins><span class="cx">                 $this-&gt;get_role_caps();
</span><span class="cx">                 $this-&gt;update_user_level_from_caps();
</span><span class="cx">                 do_action( 'set_user_role', $this-&gt;ID, $role );
</span><span class="lines">@@ -656,7 +656,7 @@
</span><span class="cx">         function update_user_level_from_caps() {
</span><span class="cx">                 global $wpdb;
</span><span class="cx">                 $this-&gt;user_level = array_reduce( array_keys( $this-&gt;allcaps ), array( &amp;$this, 'level_reduction' ), 0 );
</span><del>-                update_usermeta( $this-&gt;ID, $wpdb-&gt;prefix . 'user_level', $this-&gt;user_level );
</del><ins>+                update_user_meta( $this-&gt;ID, $wpdb-&gt;prefix . 'user_level', $this-&gt;user_level );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -670,7 +670,7 @@
</span><span class="cx">          */
</span><span class="cx">         function add_cap( $cap, $grant = true ) {
</span><span class="cx">                 $this-&gt;caps[$cap] = $grant;
</span><del>-                update_usermeta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</del><ins>+                update_user_meta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -685,7 +685,7 @@
</span><span class="cx">                 if ( empty( $this-&gt;caps[$cap] ) )
</span><span class="cx">                         return;
</span><span class="cx">                 unset( $this-&gt;caps[$cap] );
</span><del>-                update_usermeta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</del><ins>+                update_user_meta( $this-&gt;ID, $this-&gt;cap_key, $this-&gt;caps );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -697,8 +697,8 @@
</span><span class="cx">         function remove_all_caps() {
</span><span class="cx">                 global $wpdb;
</span><span class="cx">                 $this-&gt;caps = array();
</span><del>-                update_usermeta( $this-&gt;ID, $this-&gt;cap_key, '' );
-                update_usermeta( $this-&gt;ID, $wpdb-&gt;prefix . 'user_level', '' );
</del><ins>+                update_user_meta( $this-&gt;ID, $this-&gt;cap_key, '' );
+                update_user_meta( $this-&gt;ID, $wpdb-&gt;prefix . 'user_level', '' );
</ins><span class="cx">                 $this-&gt;get_role_caps();
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-functions.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-functions.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-includes/ms-functions.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -77,25 +77,25 @@
</span><span class="cx">         if ( empty( $blogs ) ) {
</span><span class="cx">                 $details = get_dashboard_blog();
</span><span class="cx">                 add_user_to_blog( $details-&gt;blog_id, $user_id, 'subscriber' );
</span><del>-                update_usermeta( $user_id, 'primary_blog', $details-&gt;blog_id );
</del><ins>+                update_user_meta( $user_id, 'primary_blog', $details-&gt;blog_id );
</ins><span class="cx">                 wp_cache_delete( $user_id, 'users' );
</span><span class="cx">                 return $details;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        $primary_blog = get_usermeta( $user_id, &quot;primary_blog&quot; );
</del><ins>+        $primary_blog = get_user_meta( $user_id, &quot;primary_blog&quot; );
</ins><span class="cx">         $details = get_dashboard_blog();
</span><span class="cx">         if ( $primary_blog ) {
</span><span class="cx">                 $blogs = get_blogs_of_user( $user_id );
</span><span class="cx">                 if ( isset( $blogs[ $primary_blog ] ) == false ) {
</span><span class="cx">                         add_user_to_blog( $details-&gt;blog_id, $user_id, 'subscriber' );
</span><del>-                        update_usermeta( $user_id, 'primary_blog', $details-&gt;blog_id );
</del><ins>+                        update_user_meta( $user_id, 'primary_blog', $details-&gt;blog_id );
</ins><span class="cx">                         wp_cache_delete( $user_id, 'users' );
</span><span class="cx">                 } else {
</span><span class="cx">                         $details = get_blog_details( $primary_blog );
</span><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="cx">                 add_user_to_blog( $details-&gt;blog_id, $user_id, 'subscriber' ); // Add subscriber permission for dashboard blog
</span><del>-                update_usermeta( $user_id, 'primary_blog', $details-&gt;blog_id );
</del><ins>+                update_user_meta( $user_id, 'primary_blog', $details-&gt;blog_id );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ( ( is_object( $details ) == false ) || ( is_object( $details ) &amp;&amp; $details-&gt;archived == 1 || $details-&gt;spam == 1 || $details-&gt;deleted == 1 ) ) {
</span><span class="lines">@@ -109,12 +109,12 @@
</span><span class="cx">                                 if ( is_object( $details ) &amp;&amp; $details-&gt;archived == 0 &amp;&amp; $details-&gt;spam == 0 &amp;&amp; $details-&gt;deleted == 0 ) {
</span><span class="cx">                                         $ret = $blog;
</span><span class="cx">                                         $changed = false;
</span><del>-                                        if ( get_usermeta( $user_id , 'primary_blog' ) != $blog_id ) {
-                                                update_usermeta( $user_id, 'primary_blog', $blog_id );
</del><ins>+                                        if ( get_user_meta( $user_id , 'primary_blog' ) != $blog_id ) {
+                                                update_user_meta( $user_id, 'primary_blog', $blog_id );
</ins><span class="cx">                                                 $changed = true;
</span><span class="cx">                                         }
</span><del>-                                        if ( !get_usermeta($user_id , 'source_domain') ) {
-                                                update_usermeta( $user_id, 'source_domain', $blog-&gt;domain );
</del><ins>+                                        if ( !get_user_meta($user_id , 'source_domain') ) {
+                                                update_user_meta( $user_id, 'source_domain', $blog-&gt;domain );
</ins><span class="cx">                                                 $changed = true;
</span><span class="cx">                                         }
</span><span class="cx">                                         if ( $changed )
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx">                         // Should never get here
</span><span class="cx">                         $dashboard_blog = get_dashboard_blog();
</span><span class="cx">                         add_user_to_blog( $dashboard_blog-&gt;blog_id, $user_id, 'subscriber' ); // Add subscriber permission for dashboard blog
</span><del>-                        update_usermeta( $user_id, 'primary_blog', $dashboard_blog-&gt;blog_id );
</del><ins>+                        update_user_meta( $user_id, 'primary_blog', $dashboard_blog-&gt;blog_id );
</ins><span class="cx">                         return $dashboard_blog;
</span><span class="cx">                 }
</span><span class="cx">                 return $ret;
</span><span class="lines">@@ -248,10 +248,10 @@
</span><span class="cx">         if ( empty($user) )
</span><span class="cx">                 return new WP_Error('user_does_not_exist', __('That user does not exist.'));
</span><span class="cx"> 
</span><del>-        if ( !get_usermeta($user_id, 'primary_blog') ) {
-                update_usermeta($user_id, 'primary_blog', $blog_id);
</del><ins>+        if ( !get_user_meta($user_id, 'primary_blog') ) {
+                update_user_meta($user_id, 'primary_blog', $blog_id);
</ins><span class="cx">                 $details = get_blog_details($blog_id);
</span><del>-                update_usermeta($user_id, 'source_domain', $details-&gt;domain);
</del><ins>+                update_user_meta($user_id, 'source_domain', $details-&gt;domain);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         $user-&gt;set_role($role);
</span><span class="lines">@@ -270,7 +270,7 @@
</span><span class="cx"> 
</span><span class="cx">         // If being removed from the primary blog, set a new primary if the user is assigned
</span><span class="cx">         // to multiple blogs.
</span><del>-        $primary_blog = get_usermeta($user_id, 'primary_blog');
</del><ins>+        $primary_blog = get_user_meta($user_id, 'primary_blog');
</ins><span class="cx">         if ( $primary_blog == $blog_id ) {
</span><span class="cx">                 $new_id = '';
</span><span class="cx">                 $new_domain = '';
</span><span class="lines">@@ -283,8 +283,8 @@
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                update_usermeta($user_id, 'primary_blog', $new_id);
-                update_usermeta($user_id, 'source_domain', $new_domain);
</del><ins>+                update_user_meta($user_id, 'primary_blog', $new_id);
+                update_user_meta($user_id, 'source_domain', $new_domain);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // wp_revoke_user($user_id);
</span><span class="lines">@@ -293,8 +293,8 @@
</span><span class="cx"> 
</span><span class="cx">         $blogs = get_blogs_of_user($user_id);
</span><span class="cx">         if ( count($blogs) == 0 ) {
</span><del>-                update_usermeta($user_id, 'primary_blog', '');
-                update_usermeta($user_id, 'source_domain', '');
</del><ins>+                update_user_meta($user_id, 'primary_blog', '');
+                update_user_meta($user_id, 'source_domain', '');
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ( $reassign != '' ) {
</span><span class="lines">@@ -826,8 +826,8 @@
</span><span class="cx">         add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
</span><span class="cx">         update_option( 'blog_public', $meta['public'] );
</span><span class="cx"> 
</span><del>-        if ( !is_super_admin() &amp;&amp; get_usermeta( $user_id, 'primary_blog' ) == get_site_option( 'dashboard_blog', 1 ) )
-                update_usermeta( $user_id, 'primary_blog', $blog_id );
</del><ins>+        if ( !is_super_admin() &amp;&amp; get_user_meta( $user_id, 'primary_blog' ) == get_site_option( 'dashboard_blog', 1 ) )
+                update_user_meta( $user_id, 'primary_blog', $blog_id );
</ins><span class="cx"> 
</span><span class="cx">         restore_current_blog();
</span><span class="cx">         do_action( 'wpmu_new_blog', $blog_id, $user_id );
</span><span class="lines">@@ -1306,7 +1306,7 @@
</span><span class="cx">                 $role = $meta[ 'new_role' ];
</span><span class="cx">                 remove_user_from_blog($user_id, $current_site-&gt;blogid); // remove user from main blog.
</span><span class="cx">                 add_user_to_blog( $blog_id, $user_id, $role );
</span><del>-                update_usermeta( $user_id, 'primary_blog', $blog_id );
</del><ins>+                update_user_meta( $user_id, 'primary_blog', $blog_id );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesregistrationphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/registration.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/registration.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-includes/registration.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -202,20 +202,20 @@
</span><span class="cx">                 $user_id = (int) $wpdb-&gt;insert_id;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        update_usermeta( $user_id, 'first_name', $first_name);
-        update_usermeta( $user_id, 'last_name', $last_name);
-        update_usermeta( $user_id, 'nickname', $nickname );
-        update_usermeta( $user_id, 'description', $description );
-        update_usermeta( $user_id, 'rich_editing', $rich_editing);
-        update_usermeta( $user_id, 'comment_shortcuts', $comment_shortcuts);
-        update_usermeta( $user_id, 'admin_color', $admin_color);
-        update_usermeta( $user_id, 'use_ssl', $use_ssl);
</del><ins>+        update_user_meta( $user_id, 'first_name', $first_name);
+        update_user_meta( $user_id, 'last_name', $last_name);
+        update_user_meta( $user_id, 'nickname', $nickname );
+        update_user_meta( $user_id, 'description', $description );
+        update_user_meta( $user_id, 'rich_editing', $rich_editing);
+        update_user_meta( $user_id, 'comment_shortcuts', $comment_shortcuts);
+        update_user_meta( $user_id, 'admin_color', $admin_color);
+        update_user_meta( $user_id, 'use_ssl', $use_ssl);
</ins><span class="cx"> 
</span><span class="cx">         foreach ( _wp_get_user_contactmethods() as $method =&gt; $name ) {
</span><span class="cx">                 if ( empty($$method) )
</span><span class="cx">                         $$method = '';
</span><span class="cx"> 
</span><del>-                update_usermeta( $user_id, $method, $$method );
</del><ins>+                update_user_meta( $user_id, $method, $$method );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ( isset($role) ) {
</span></span></pre></div>
<a id="trunkwpincludesuserphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/user.php (13310 => 13311)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/user.php        2010-02-22 20:27:14 UTC (rev 13310)
+++ trunk/wp-includes/user.php        2010-02-22 21:25:32 UTC (rev 13311)
</span><span class="lines">@@ -267,7 +267,7 @@
</span><span class="cx">         global $wpdb;
</span><span class="cx">         if ( !$global )
</span><span class="cx">                 $option_name = $wpdb-&gt;prefix . $option_name;
</span><del>-        return update_usermeta( $user_id, $option_name, $newvalue );
</del><ins>+        return update_user_meta( $user_id, $option_name, $newvalue );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre>
</div>
</div>

</body>
</html>