Ticket #11074: 11074.patch
| File 11074.patch, 3.2 KB (added by arena, 4 years ago) |
|---|
-
wp-admin/includes/dashboard.php
620 620 printf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message()); 621 621 echo '</p>'; 622 622 } 623 $rss->__destruct(); 624 unset($rss); 623 625 return; 624 626 } 625 627 626 628 if ( !$rss->get_item_quantity() ) { 627 629 echo '<p>' . __('This dashboard widget queries <a href="http://blogsearch.google.com/">Google Blog Search</a> 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.') . "</p>\n"; 630 $rss->__destruct(); 631 unset($rss); 628 632 return; 629 633 } 630 634 … … 678 682 } 679 683 680 684 echo "</ul>\n"; 681 685 $rss->__destruct(); 686 unset($rss); 682 687 } 683 688 684 689 function wp_dashboard_incoming_links_control() { … … 733 738 printf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message()); 734 739 echo '</p></div>'; 735 740 } 741 $rss->__destruct(); 742 unset($rss); 736 743 } elseif ( !$rss->get_item_quantity() ) { 744 $rss->__destruct(); 745 unset($rss); 737 746 return false; 738 747 } else { 739 748 echo '<div class="rss-widget">'; 740 749 wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); 741 750 echo '</div>'; 751 $rss->__destruct(); 752 unset($rss); 742 753 } 743 754 } 744 755 … … 822 833 echo "<h5><a href='$link'>$title</a></h5> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n"; 823 834 echo "<p>$description</p>\n"; 824 835 } 836 $popular->__destruct(); $new->__destruct(); $updated->__destruct(); 837 unset($popular, $new, $updated); 825 838 } 826 839 827 840 /** … … 918 931 $widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title())); 919 932 else 920 933 $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); 934 $rss->__destruct(); 935 unset($rss); 921 936 } 922 937 update_option( 'dashboard_widget_options', $widget_options ); 923 938 } -
wp-includes/default-widgets.php
732 732 echo $before_title . $title . $after_title; 733 733 wp_widget_rss_output( $rss, $instance ); 734 734 echo $after_widget; 735 $rss->__destruct(); 736 unset($rss); 735 737 } 736 738 737 739 function update($new_instance, $old_instance) { … … 770 772 if ( is_wp_error($rss) ) { 771 773 if ( is_admin() || current_user_can('manage_options') ) 772 774 echo '<p>' . sprintf( __('<strong>RSS Error</strong>: %s'), $rss->get_error_message() ) . '</p>'; 773 775 $rss->__destruct(); 776 unset($rss); 774 777 return; 775 778 } 776 779 … … 787 790 788 791 if ( !$rss->get_item_quantity() ) { 789 792 echo '<ul><li>' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '</li></ul>'; 793 $rss->__destruct(); 794 unset($rss); 790 795 return; 791 796 } 792 797 … … 838 843 } 839 844 } 840 845 echo '</ul>'; 846 $rss->__destruct(); 847 unset($rss); 841 848 } 842 849 843 850 … … 947 954 while ( stristr($link, 'http') != $link ) 948 955 $link = substr($link, 1); 949 956 } 957 $rss->__destruct(); 958 unset($rss); 950 959 } 951 960 952 961 return compact( 'title', 'url', 'link', 'items', 'error', 'show_summary', 'show_author', 'show_date' );