WordPress.org

Make WordPress Core

Ticket #7080: widgets.patch

File widgets.patch, 638 bytes (added by msi08, 10 years ago)
  • widgets.php

    old new  
    891891}
    892892
    893893function wp_widget_recent_entries($args) {
     894        global $post;
     895        $postBackup = $post;
     896
    894897        if ( '%BEG_OF_TITLE%' != $args['before_title'] ) {
    895898                if ( $output = wp_cache_get('widget_recent_entries', 'widget') )
    896899                        return print($output);
     
    924927
    925928        if ( '%BEG_OF_TITLE%' != $args['before_title'] )
    926929                wp_cache_add('widget_recent_entries', ob_get_flush(), 'widget');
     930
     931        $post = $postBackup;
     932        setup_postdata( $post );
    927933}
    928934
    929935function wp_flush_widget_recent_entries() {