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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40793 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2017-05-19 14:35:03 +00:00
parent 1d0cffb593
commit 83e1634d5e
1 changed files with 1 additions and 1 deletions

View File

@ -980,7 +980,7 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar
$check_urls = array( $widgets[$widget_id]['url'] );
}
$locale = get_locale();
$locale = get_user_locale();
$cache_key = 'dash_' . md5( $widget_id . '_' . $locale );
if ( false !== ( $output = get_transient( $cache_key ) ) ) {
echo $output;