WordPress.org

Make WordPress Core

Ticket #16927: 16927.delete_transient.patch

File 16927.delete_transient.patch, 762 bytes (added by ocean90, 4 years ago)
  • wp-admin/includes/dashboard.php

     
    10421042                $check_urls = array( $widgets[$widget_id]['url'] ); 
    10431043        } 
    10441044 
    1045         $cache_key = 'dash_' . md5( $callback . implode(',', $check_urls) ); 
     1045        $cache_key = 'dash_' . md5( $widget_id ); 
    10461046        if ( false !== ( $output = get_transient( $cache_key ) ) ) { 
    10471047                echo $output; 
    10481048                return true; 
     
    11181118                        } 
    11191119                } 
    11201120                update_option( 'dashboard_widget_options', $widget_options ); 
     1121                $cache_key = 'dash_' . md5( $widget_id ); 
     1122                delete_transient( $cache_key ); 
    11211123        } 
    11221124 
    11231125        wp_widget_rss_form( $widget_options[$widget_id], $form_inputs );