Make WordPress Core

Ticket #43339: 43339.2.diff

File 43339.2.diff, 4.8 KB (added by zkancs, 7 years ago)
  • src/wp-admin/includes/ajax-actions.php

    diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
    index ab521ba0ad..128c6d58a8 100644
    a b function wp_ajax_get_community_events() { 
    304304                 * The location is stored network-wide, so that the user doesn't have to set it on each site.
    305305                 */
    306306                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'] );
    308308                }
    309309
    310310                wp_send_json_success( $events );
  • src/wp-admin/includes/upgrade.php

    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' ) ) : 
    7979                        $user_password = wp_generate_password( 12, false );
    8080                        $message       = __( '<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.' );
    8181                        $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 );
    8383                        $email_password = true;
    8484                } elseif ( ! $user_id ) {
    8585                        // Password has been provided
  • src/wp-admin/includes/user.php

    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 ) { 
    464464        // get_user_setting = JS saved UI setting. else no-js-fallback code.
    465465        if ( 'hide' == get_user_setting( 'default_password_nag' ) || isset( $_GET['default_password_nag'] ) && '0' == $_GET['default_password_nag'] ) {
    466466                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 );
    468468        }
    469469}
    470470
    function default_password_nag_edit_user( $user_ID, $old_data ) { 
    485485        // Remove the nag if the password has been changed.
    486486        if ( $new_data->user_pass != $old_data->user_pass ) {
    487487                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 );
    489489        }
    490490}
    491491
  • src/wp-includes/script-loader.php

    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() { 
    13111311         */
    13121312        if ( $saved_ip_address && $current_ip_address && $current_ip_address !== $saved_ip_address ) {
    13131313                $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 );
    13151315        }
    13161316
    13171317        $events_client = new WP_Community_Events( $user_id, $saved_location );
  • src/wp-includes/user.php

    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 ) { 
    13701370
    13711371/**
    13721372 * Determines whether the given username exists.
    1373  * 
     1373 *
    13741374 * 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/
    13761376 * Conditional Tags} article in the Theme Developer Handbook.
    13771377 *
    13781378 * @since 2.0.0
    function username_exists( $username ) { 
    14001400
    14011401/**
    14021402 * Determines whether the given email exists.
    1403  * 
     1403 *
    14041404 * 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/
    14061406 * Conditional Tags} article in the Theme Developer Handbook.
    14071407 *
    14081408 * @since 2.1.0
    function reset_password( $user, $new_pass ) { 
    23762376        do_action( 'password_reset', $user, $new_pass );
    23772377
    23782378        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 );
    23802380
    23812381        /**
    23822382         * Fires after the user's password is reset.
    function register_new_user( $user_login, $user_email ) { 
    24802480                return $errors;
    24812481        }
    24822482
    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.
    24842484
    24852485        /**
    24862486         * Fires after a new user registration has been recorded.