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

git-svn-id: http://svn.automattic.com/wordpress/trunk@7728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-04-17 20:42:47 +00:00
parent 3821189be8
commit 3389df53f2
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() {