Make WordPress Core


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

Grouped backports to the 5.9 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.9 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.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

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

    r52398 r54545  
    17111711 * @since 3.0.0
    17121712 * @since 4.4.0 'clean_user_cache' action was added.
    1713  * @since 5.8.0 Refreshes the global user instance if cleaning the user cache for the current user.
    1714  *
    1715  * @global WP_User $current_user The current user object which holds the user data.
    17161713 *
    17171714 * @param WP_User|int $user User object or ID to be cleaned from the cache
    17181715 */
    17191716function clean_user_cache( $user ) {
    1720     global $current_user;
    1721 
    17221717    if ( is_numeric( $user ) ) {
    17231718        $user = new WP_User( $user );
     
    17421737     */
    17431738    do_action( 'clean_user_cache', $user->ID, $user );
    1744 
    1745     // Refresh the global user instance if the cleaning current user.
    1746     if ( get_current_user_id() === (int) $user->ID ) {
    1747         $user_id      = (int) $user->ID;
    1748         $current_user = null;
    1749         wp_set_current_user( $user_id, '' );
    1750     }
    17511739}
    17521740
Note: See TracChangeset for help on using the changeset viewer.