diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
index ab521ba0ad..5551fe2a61 100644
a
|
b
|
function wp_ajax_get_community_events() { |
304 | 304 | * The location is stored network-wide, so that the user doesn't have to set it on each site. |
305 | 305 | */ |
306 | 306 | if ( $ip_changed || $search ) { |
307 | | update_user_option( $user_id, 'community-events-location', $events['location'], true ); |
| 307 | update_user_meta( $user_id, 'community-events-location', $events['location'] ); |
308 | 308 | } |
309 | 309 | |
310 | 310 | wp_send_json_success( $events ); |
… |
… |
function wp_ajax_closed_postboxes() { |
1545 | 1545 | } |
1546 | 1546 | |
1547 | 1547 | if ( is_array( $closed ) ) { |
1548 | | update_user_option( $user->ID, "closedpostboxes_$page", $closed, true ); |
| 1548 | update_user_meta( $user->ID, "closedpostboxes_$page", $closed ); |
1549 | 1549 | } |
1550 | 1550 | |
1551 | 1551 | if ( is_array( $hidden ) ) { |
1552 | 1552 | $hidden = array_diff( $hidden, array( 'submitdiv', 'linksubmitdiv', 'manage-menu', 'create-menu' ) ); // postboxes that are always shown |
1553 | | update_user_option( $user->ID, "metaboxhidden_$page", $hidden, true ); |
| 1553 | update_user_meta( $user->ID, "metaboxhidden_$page", $hidden ); |
1554 | 1554 | } |
1555 | 1555 | |
1556 | 1556 | wp_die( 1 ); |
… |
… |
function wp_ajax_hidden_columns() { |
1574 | 1574 | } |
1575 | 1575 | |
1576 | 1576 | $hidden = ! empty( $_POST['hidden'] ) ? explode( ',', $_POST['hidden'] ) : array(); |
1577 | | update_user_option( $user->ID, "manage{$page}columnshidden", $hidden, true ); |
| 1577 | update_user_meta( $user->ID, "manage{$page}columnshidden", $hidden ); |
1578 | 1578 | |
1579 | 1579 | wp_die( 1 ); |
1580 | 1580 | } |
… |
… |
function wp_ajax_meta_box_order() { |
1727 | 1727 | } |
1728 | 1728 | |
1729 | 1729 | if ( $order ) { |
1730 | | update_user_option( $user->ID, "meta-box-order_$page", $order, true ); |
| 1730 | update_user_meta( $user->ID, "meta-box-order_$page", $order ); |
1731 | 1731 | } |
1732 | 1732 | |
1733 | 1733 | if ( $page_columns ) { |
1734 | | update_user_option( $user->ID, "screen_layout_$page", $page_columns, true ); |
| 1734 | update_user_meta( $user->ID, "screen_layout_$page", $page_columns ); |
1735 | 1735 | } |
1736 | 1736 | |
1737 | 1737 | wp_die( 1 ); |
diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php
index 5b8bfd7e00..dcd058ff0b 100644
a
|
b
|
function wp_nav_menu_setup() { |
148 | 148 | // If first time editing, disable advanced items by default. |
149 | 149 | if ( false === get_user_option( 'managenav-menuscolumnshidden' ) ) { |
150 | 150 | $user = wp_get_current_user(); |
151 | | update_user_option( |
| 151 | update_user_meta( |
152 | 152 | $user->ID, 'managenav-menuscolumnshidden', |
153 | 153 | array( |
154 | 154 | 0 => 'link-target', |
… |
… |
function wp_nav_menu_setup() { |
156 | 156 | 2 => 'xfn', |
157 | 157 | 3 => 'description', |
158 | 158 | 4 => 'title-attribute', |
159 | | ), |
160 | | true |
| 159 | ) |
161 | 160 | ); |
162 | 161 | } |
163 | 162 | } |
… |
… |
function wp_initial_nav_menu_meta_boxes() { |
192 | 191 | } |
193 | 192 | |
194 | 193 | $user = wp_get_current_user(); |
195 | | update_user_option( $user->ID, 'metaboxhidden_nav-menus', $hidden_meta_boxes, true ); |
| 194 | update_user_meta( $user->ID, 'metaboxhidden_nav-menus', $hidden_meta_boxes ); |
196 | 195 | } |
197 | 196 | |
198 | 197 | /** |
… |
… |
function wp_nav_menu_item_post_type_meta_box( $object, $box ) { |
435 | 434 | </li> |
436 | 435 | </ul><!-- .posttype-tabs --> |
437 | 436 | |
438 | | <div id="tabs-panel-posttype-<?php echo $post_type_name; ?>-most-recent" class="tabs-panel |
| 437 | <div id="tabs-panel-posttype-<?php echo $post_type_name; ?>-most-recent" class="tabs-panel |
439 | 438 | <?php |
440 | 439 | echo ( 'most-recent' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); |
441 | 440 | ?> |
… |
… |
function wp_nav_menu_item_post_type_meta_box( $object, $box ) { |
473 | 472 | </ul> |
474 | 473 | </div><!-- /.tabs-panel --> |
475 | 474 | |
476 | | <div class="tabs-panel |
| 475 | <div class="tabs-panel |
477 | 476 | <?php |
478 | 477 | echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); |
479 | 478 | ?> |
… |
… |
function wp_nav_menu_item_post_type_meta_box( $object, $box ) { |
515 | 514 | </ul> |
516 | 515 | </div><!-- /.tabs-panel --> |
517 | 516 | |
518 | | <div id="<?php echo $post_type_name; ?>-all" class="tabs-panel tabs-panel-view-all |
| 517 | <div id="<?php echo $post_type_name; ?>-all" class="tabs-panel tabs-panel-view-all |
519 | 518 | <?php |
520 | 519 | echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); |
521 | 520 | ?> |
… |
… |
function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { |
771 | 770 | </li> |
772 | 771 | </ul><!-- .taxonomy-tabs --> |
773 | 772 | |
774 | | <div id="tabs-panel-<?php echo $taxonomy_name; ?>-pop" class="tabs-panel |
| 773 | <div id="tabs-panel-<?php echo $taxonomy_name; ?>-pop" class="tabs-panel |
775 | 774 | <?php |
776 | 775 | echo ( 'most-used' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); |
777 | 776 | ?> |
… |
… |
function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { |
792 | 791 | </ul> |
793 | 792 | </div><!-- /.tabs-panel --> |
794 | 793 | |
795 | | <div id="tabs-panel-<?php echo $taxonomy_name; ?>-all" class="tabs-panel tabs-panel-view-all |
| 794 | <div id="tabs-panel-<?php echo $taxonomy_name; ?>-all" class="tabs-panel tabs-panel-view-all |
796 | 795 | <?php |
797 | 796 | echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); |
798 | 797 | ?> |
… |
… |
function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { |
815 | 814 | <?php endif; ?> |
816 | 815 | </div><!-- /.tabs-panel --> |
817 | 816 | |
818 | | <div class="tabs-panel |
| 817 | <div class="tabs-panel |
819 | 818 | <?php |
820 | 819 | echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); |
821 | 820 | ?> |
diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
index 7ab369dc7b..d81908fec2 100644
a
|
b
|
if ( ! function_exists( 'wp_install' ) ) : |
79 | 79 | $user_password = wp_generate_password( 12, false ); |
80 | 80 | $message = __( '<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.' ); |
81 | 81 | $user_id = wp_create_user( $user_name, $user_password, $user_email ); |
82 | | update_user_option( $user_id, 'default_password_nag', true, true ); |
| 82 | update_user_meta( $user_id, 'default_password_nag', true ); |
83 | 83 | $email_password = true; |
84 | 84 | } elseif ( ! $user_id ) { |
85 | 85 | // Password has been provided |
diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php
index 269d64fb26..073f087d1a 100644
a
|
b
|
function default_password_nag_handler( $errors = false ) { |
464 | 464 | // get_user_setting = JS saved UI setting. else no-js-fallback code. |
465 | 465 | if ( 'hide' == get_user_setting( 'default_password_nag' ) || isset( $_GET['default_password_nag'] ) && '0' == $_GET['default_password_nag'] ) { |
466 | 466 | delete_user_setting( 'default_password_nag' ); |
467 | | update_user_option( $user_ID, 'default_password_nag', false, true ); |
| 467 | update_user_meta( $user_ID, 'default_password_nag', false ); |
468 | 468 | } |
469 | 469 | } |
470 | 470 | |
… |
… |
function default_password_nag_edit_user( $user_ID, $old_data ) { |
485 | 485 | // Remove the nag if the password has been changed. |
486 | 486 | if ( $new_data->user_pass != $old_data->user_pass ) { |
487 | 487 | delete_user_setting( 'default_password_nag' ); |
488 | | update_user_option( $user_ID, 'default_password_nag', false, true ); |
| 488 | update_user_meta( $user_ID, 'default_password_nag', false ); |
489 | 489 | } |
490 | 490 | } |
491 | 491 | |
diff --git a/src/wp-admin/my-sites.php b/src/wp-admin/my-sites.php
index 588afb06a0..97532470d2 100644
a
|
b
|
if ( 'updateblogsettings' == $action && isset( $_POST['primary_blog'] ) ) { |
27 | 27 | |
28 | 28 | $blog = get_site( (int) $_POST['primary_blog'] ); |
29 | 29 | if ( $blog && isset( $blog->domain ) ) { |
30 | | update_user_option( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true ); |
| 30 | update_user_meta( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'] ); |
31 | 31 | $updated = true; |
32 | 32 | } else { |
33 | 33 | wp_die( __( 'The primary site you chose does not exist.' ) ); |
diff --git a/src/wp-admin/network/site-new.php b/src/wp-admin/network/site-new.php
index bc4809e005..383d28ff3d 100644
a
|
b
|
if ( isset( $_REQUEST['action'] ) && 'add-site' == $_REQUEST['action'] ) { |
139 | 139 | $wpdb->show_errors(); |
140 | 140 | if ( ! is_wp_error( $id ) ) { |
141 | 141 | if ( ! is_super_admin( $user_id ) && ! get_user_option( 'primary_blog', $user_id ) ) { |
142 | | update_user_option( $user_id, 'primary_blog', $id, true ); |
| 142 | update_user_meta( $user_id, 'primary_blog', $id ); |
143 | 143 | } |
144 | 144 | |
145 | 145 | wp_mail( |
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index 225f1869be..97a20b6ce9 100644
a
|
b
|
function wp_localize_community_events() { |
1311 | 1311 | */ |
1312 | 1312 | if ( $saved_ip_address && $current_ip_address && $current_ip_address !== $saved_ip_address ) { |
1313 | 1313 | $saved_location['ip'] = $current_ip_address; |
1314 | | update_user_option( $user_id, 'community-events-location', $saved_location, true ); |
| 1314 | update_user_meta( $user_id, 'community-events-location', $saved_location ); |
1315 | 1315 | } |
1316 | 1316 | |
1317 | 1317 | $events_client = new WP_Community_Events( $user_id, $saved_location ); |
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index dd5d5367ba..6ee1d2977d 100644
a
|
b
|
function clean_user_cache( $user ) { |
1370 | 1370 | |
1371 | 1371 | /** |
1372 | 1372 | * Determines whether the given username exists. |
1373 | | * |
| 1373 | * |
1374 | 1374 | * For more information on this and similar theme functions, check out |
1375 | | * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ |
| 1375 | * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ |
1376 | 1376 | * Conditional Tags} article in the Theme Developer Handbook. |
1377 | 1377 | * |
1378 | 1378 | * @since 2.0.0 |
… |
… |
function username_exists( $username ) { |
1400 | 1400 | |
1401 | 1401 | /** |
1402 | 1402 | * Determines whether the given email exists. |
1403 | | * |
| 1403 | * |
1404 | 1404 | * For more information on this and similar theme functions, check out |
1405 | | * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ |
| 1405 | * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ |
1406 | 1406 | * Conditional Tags} article in the Theme Developer Handbook. |
1407 | 1407 | * |
1408 | 1408 | * @since 2.1.0 |
… |
… |
function reset_password( $user, $new_pass ) { |
2376 | 2376 | do_action( 'password_reset', $user, $new_pass ); |
2377 | 2377 | |
2378 | 2378 | wp_set_password( $new_pass, $user->ID ); |
2379 | | update_user_option( $user->ID, 'default_password_nag', false, true ); |
| 2379 | update_user_meta( $user->ID, 'default_password_nag', false ); |
2380 | 2380 | |
2381 | 2381 | /** |
2382 | 2382 | * Fires after the user's password is reset. |
… |
… |
function register_new_user( $user_login, $user_email ) { |
2480 | 2480 | return $errors; |
2481 | 2481 | } |
2482 | 2482 | |
2483 | | update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag. |
| 2483 | update_user_meta( $user->ID, 'default_password_nag', true ); //Set up the Password change nag. |
2484 | 2484 | |
2485 | 2485 | /** |
2486 | 2486 | * Fires after a new user registration has been recorded. |