Make WordPress Core


Ignore:
Timestamp:
10/17/2022 05:46:39 PM (2 years ago)
Author:
audrasjb
Message:

Grouped backports to the 5.8 branch.

  • Editor: Bump @wordpress packages for the 5.9 branch,
  • Media: Refactor search by filename within the admin,
  • REST API: Lockdown post parameter of the terms endpoint,
  • Customize: Escape blogname option in underscores templates,
  • Query: Validate relation in WP_Date_Query,
  • Users: Revert use of shared objects for current user,
  • Posts, Post types: Apply KSES to post-by-email content,
  • General: Validate host on "Are you sure?" screen,
  • Posts, Post types: Remove emails from post-by-email logs,
  • Pings/trackbacks: Apply KSES to all trackbacks,
  • Mail: Reset PHPMailer properties between use,
  • Comments: Apply kses when editing comments,
  • Widgets: Escape RSS error messages for display.

Merges [54521-54530] to the 5.8 branch.
Props audrasjb, costdev, cu121, dd32, davidbaumwald, ehtis, johnbillion, johnjamesjacoby, martinkrcho, matveb, oztaser, paulkevan, peterwilsoncc, ravipatel, SergeyBiryukov, talldanwp, timothyblynjacobs, tykoted, voldemortensen, vortfu, xknown.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/src/wp-includes/user.php

    r51411 r54548  
    15721572 * @since 3.0.0
    15731573 * @since 4.4.0 'clean_user_cache' action was added.
    1574  * @since 5.8.0 Refreshes the global user instance if cleaning the user cache for the current user.
    1575  *
    1576  * @global WP_User $current_user The current user object which holds the user data.
    15771574 *
    15781575 * @param WP_User|int $user User object or ID to be cleaned from the cache
    15791576 */
    15801577function clean_user_cache( $user ) {
    1581     global $current_user;
    1582 
    15831578    if ( is_numeric( $user ) ) {
    15841579        $user = new WP_User( $user );
     
    16031598     */
    16041599    do_action( 'clean_user_cache', $user->ID, $user );
    1605 
    1606     // Refresh the global user instance if the cleaning current user.
    1607     if ( get_current_user_id() === (int) $user->ID ) {
    1608         $user_id      = (int) $user->ID;
    1609         $current_user = null;
    1610         wp_set_current_user( $user_id, '' );
    1611     }
    16121600}
    16131601
Note: See TracChangeset for help on using the changeset viewer.