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

git-svn-id: https://develop.svn.wordpress.org/trunk@7728 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-04-17 20:42:47 +00:00
parent 714c276a62
commit f0c73873c4
1 changed files with 8 additions and 4 deletions

View File

@ -864,10 +864,12 @@ function wp_widget_categories_upgrade() {
}
function wp_widget_recent_entries($args) {
if ( $output = wp_cache_get('widget_recent_entries', 'widget') )
return print($output);
if ( '%BEG_OF_TITLE%' != $args['before_title'] ) {
if ( $output = wp_cache_get('widget_recent_entries', 'widget') )
return print($output);
ob_start();
}
ob_start();
extract($args);
$options = get_option('widget_recent_entries');
$title = empty($options['title']) ? __('Recent Posts') : $options['title'];
@ -892,7 +894,9 @@ function wp_widget_recent_entries($args) {
<?php
wp_reset_query(); // Restore global post data stomped by the_post().
endif;
wp_cache_add('widget_recent_entries', ob_get_flush(), 'widget');
if ( '%BEG_OF_TITLE%' != $args['before_title'] )
wp_cache_add('widget_recent_entries', ob_get_flush(), 'widget');
}
function wp_flush_widget_recent_entries() {