Dashboard: Change the cache key for dashboard RSS widget; remove the unnecessary database upgrade routine.
Props iandunn, ocean90. See #40702. Built from https://develop.svn.wordpress.org/trunk@40803 git-svn-id: http://core.svn.wordpress.org/trunk@40661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -981,7 +981,7 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar
|
||||
}
|
||||
|
||||
$locale = get_user_locale();
|
||||
$cache_key = 'dash_' . md5( $widget_id . '_' . $locale );
|
||||
$cache_key = 'dash_v2_' . md5( $widget_id . '_' . $locale );
|
||||
if ( false !== ( $output = get_transient( $cache_key ) ) ) {
|
||||
echo $output;
|
||||
return true;
|
||||
@@ -1063,7 +1063,7 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) {
|
||||
}
|
||||
update_option( 'dashboard_widget_options', $widget_options );
|
||||
$locale = get_user_locale();
|
||||
$cache_key = 'dash_' . md5( $widget_id . '_' . $locale );
|
||||
$cache_key = 'dash_v2_' . md5( $widget_id . '_' . $locale );
|
||||
delete_transient( $cache_key );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user