WordPress.org

Make WordPress Core

Changeset 7727


Ignore:
Timestamp:
04/17/2008 08:42:33 PM (10 years ago)
Author:
ryan
Message:

don't cache during title extraction. Props mdawaffe. fixes #6694 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-includes/widgets.php

    r7723 r7727  
    865865
    866866function wp_widget_recent_entries($args) {
    867     if ( $output = wp_cache_get('widget_recent_entries', 'widget') )
    868         return print($output);
    869 
    870     ob_start();
     867    if ( '%BEG_OF_TITLE%' != $args['before_title'] ) {
     868        if ( $output = wp_cache_get('widget_recent_entries', 'widget') )
     869            return print($output);
     870        ob_start();
     871    }
     872
    871873    extract($args);
    872874    $options = get_option('widget_recent_entries');
     
    893895        wp_reset_query();  // Restore global post data stomped by the_post().
    894896    endif;
    895     wp_cache_add('widget_recent_entries', ob_get_flush(), 'widget');
     897
     898    if ( '%BEG_OF_TITLE%' != $args['before_title'] )
     899        wp_cache_add('widget_recent_entries', ob_get_flush(), 'widget');
    896900}
    897901
Note: See TracChangeset for help on using the changeset viewer.