From 7154852c940d6f8f286d8439e9b289cfb50b92f1 Mon Sep 17 00:00:00 2001
From: ryan
' . __('This dashboard widget queries Google Blog Search so that when another blog links to your site it will show up here. It has found no incoming links… yet. It’s okay — there is no rush.') . "
\n"; + $rss->__destruct(); + unset($rss); return; } @@ -682,7 +686,8 @@ function wp_dashboard_incoming_links_output() { } echo "\n"; - + $rss->__destruct(); + unset($rss); } function wp_dashboard_incoming_links_control() { @@ -737,12 +742,18 @@ function wp_dashboard_secondary_output() { printf(__('RSS Error: %s'), $rss->get_error_message()); echo ''; } + $rss->__destruct(); + unset($rss); } elseif ( !$rss->get_item_quantity() ) { + $rss->__destruct(); + unset($rss); return false; } else { echo ' '; + $rss->__destruct(); + unset($rss); } } @@ -825,6 +836,9 @@ function wp_dashboard_plugins_output() { echo "$description
\n"; + + $$feed->__destruct(); + unset($$feed); } } @@ -922,6 +936,8 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); else $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); + $rss->__destruct(); + unset($rss); } update_option( 'dashboard_widget_options', $widget_options ); } diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 27c3b3cfa..a0cc15a23 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -732,6 +732,8 @@ class WP_Widget_RSS extends WP_Widget { echo $before_title . $title . $after_title; wp_widget_rss_output( $rss, $instance ); echo $after_widget; + $rss->__destruct(); + unset($rss); } function update($new_instance, $old_instance) { @@ -770,7 +772,8 @@ function wp_widget_rss_output( $rss, $args = array() ) { if ( is_wp_error($rss) ) { if ( is_admin() || current_user_can('manage_options') ) echo '' . sprintf( __('RSS Error: %s'), $rss->get_error_message() ) . '
'; - + $rss->__destruct(); + unset($rss); return; } @@ -787,6 +790,8 @@ function wp_widget_rss_output( $rss, $args = array() ) { if ( !$rss->get_item_quantity() ) { echo '