WordPress.org

Make WordPress Core

Ticket #47851: users.php.diff

File users.php.diff, 1.5 KB (added by mt8.biz, 15 months ago)
  • src/wp-admin/users.php

     
    234234                        $userids = array_map( 'intval', (array) $_REQUEST['users'] );
    235235                }
    236236
     237                //exclude current user id
     238                if ( in_array( get_current_user_id(), $userids ) ) {
     239                        $userids = array_diff( $userids, array( get_current_user_id() ) );
     240                        $userids = array_values( $userids );
     241                }
     242
    237243                /**
    238244                 * Filters whether the users being deleted have additional content
    239245                 * associated with them outside of the `post_author` and `link_owner` relationships.
  • src/wp-includes/load.php

     
    14021402}
    14031403
    14041404/**
     1405 * Determines whether the current request is a WordPress autosave request.
     1406 *
     1407 * @since
     1408 *
     1409 * @return bool True if it's a WordPress autosave request, false otherwise.
     1410 */
     1411function wp_doing_autosave() {
     1412        /**
     1413         * Filters whether the current request is a WordPress autosave request.
     1414         *
     1415         * @since
     1416         *
     1417         * @param bool wp_doing_autosave Whether the current request is a WordPress autosave request.
     1418         */
     1419        return apply_filters( 'wp_doing_autosave', defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE );
     1420}
     1421
     1422/**
    14051423 * Check whether variable is a WordPress Error.
    14061424 *
    14071425 * Returns true if $thing is an object of the WP_Error class.