WordPress.org

Make WordPress Core

Changeset 40793


Ignore:
Timestamp:
05/19/17 14:35:03 (5 months ago)
Author:
ocean90
Message:

Dashboard: Use get_user_locale() for the news feed cache key.

Since the feed URL can be localized the cache key has to be built with the same locale as the current user is using.

Props iandunn.
Fixes #40417.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r40790 r40793  
    981981    } 
    982982 
    983     $locale = get_locale(); 
     983    $locale = get_user_locale(); 
    984984    $cache_key = 'dash_' . md5( $widget_id . '_' . $locale ); 
    985985    if ( false !== ( $output = get_transient( $cache_key ) ) ) { 
Note: See TracChangeset for help on using the changeset viewer.