Ticket #12439: 12439.3.diff
File 12439.3.diff, 1.9 KB (added by , 15 years ago) |
---|
-
wp-includes/user.php
203 203 if ( !empty( $deprecated ) ) 204 204 _deprecated_argument( __FUNCTION__, '3.0' ); 205 205 206 $option = preg_replace('|[^a-z0-9_]|i', '', $option);207 206 if ( empty($user) ) 208 207 $user = wp_get_current_user(); 209 208 else … … 237 236 */ 238 237 function update_user_option( $user_id, $option_name, $newvalue, $global = false ) { 239 238 global $wpdb; 239 240 240 if ( !$global ) 241 241 $option_name = $wpdb->prefix . $option_name; 242 242 return update_user_meta( $user_id, $option_name, $newvalue ); … … 666 666 wp_cache_delete($user->user_nicename, 'userslugs'); 667 667 } 668 668 669 ?> 670 No newline at end of file 669 ?> -
wp-admin/admin-ajax.php
1019 1019 die('-1'); 1020 1020 1021 1021 if ( is_array($closed) ) 1022 update_user_ meta($user->ID, 'closedpostboxes_'.$page, $closed);1022 update_user_option($user->ID, "closedpostboxes_$page", $closed); 1023 1023 1024 1024 if ( is_array($hidden) ) { 1025 1025 $hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv') ); // postboxes that are always shown 1026 update_user_ meta($user->ID, 'meta-box-hidden_'.$page, $hidden);1026 update_user_option($user->ID, "meta-box-hidden_$page", $hidden); 1027 1027 } 1028 1028 1029 1029 die('1'); … … 1041 1041 die('-1'); 1042 1042 1043 1043 if ( is_array($hidden) ) 1044 update_user_ meta($user->ID, "manage-$page-columns-hidden", $hidden);1044 update_user_option($user->ID, "manage-$page-columns-hidden", $hidden); 1045 1045 1046 1046 die('1'); 1047 1047 break; … … 1061 1061 update_user_option($user->ID, "meta-box-order_$page", $order); 1062 1062 1063 1063 if ( $page_columns ) 1064 update_user_ meta($user->ID, "screen_layout_$page", $page_columns);1064 update_user_option($user->ID, "screen_layout_$page", $page_columns); 1065 1065 1066 1066 die('1'); 1067 1067 break;