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:
parent
1d0cffb593
commit
83e1634d5e
@ -980,7 +980,7 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar
|
|||||||
$check_urls = array( $widgets[$widget_id]['url'] );
|
$check_urls = array( $widgets[$widget_id]['url'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
$locale = get_locale();
|
$locale = get_user_locale();
|
||||||
$cache_key = 'dash_' . md5( $widget_id . '_' . $locale );
|
$cache_key = 'dash_' . md5( $widget_id . '_' . $locale );
|
||||||
if ( false !== ( $output = get_transient( $cache_key ) ) ) {
|
if ( false !== ( $output = get_transient( $cache_key ) ) ) {
|
||||||
echo $output;
|
echo $output;
|
||||||
|
Loading…
Reference in New Issue
Block a user