]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/default-widgets.php
WordPress 3.7.2-scripts
[autoinstalls/wordpress.git] / wp-includes / default-widgets.php
index 09d5811f1c26fa8f22a9a9c505bcff8296be001f..84bc7af68627e822668deead1e34f184bdf86375 100644 (file)
@@ -574,7 +574,7 @@ class WP_Widget_Recent_Posts extends WP_Widget {
                <ul>
                <?php while ( $r->have_posts() ) : $r->the_post(); ?>
                        <li>
-                               <a href="<?php the_permalink() ?>" title="<?php echo esc_attr( get_the_title() ? get_the_title() : get_the_ID() ); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a>
+                               <a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title() : the_ID(); ?></a>
                        <?php if ( $show_date ) : ?>
                                <span class="post-date"><?php echo get_the_date(); ?></span>
                        <?php endif; ?>
@@ -643,6 +643,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {
                        add_action( 'wp_head', array($this, 'recent_comments_style') );
 
                add_action( 'comment_post', array($this, 'flush_widget_cache') );
+               add_action( 'edit_comment', array($this, 'flush_widget_cache') );
                add_action( 'transition_comment_status', array($this, 'flush_widget_cache') );
        }
 
@@ -928,7 +929,7 @@ function wp_widget_rss_form( $args, $inputs = null ) {
        $default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true );
        $inputs = wp_parse_args( $inputs, $default_inputs );
        extract( $args );
-       extract( $inputs, EXTR_SKIP);
+       extract( $inputs, EXTR_SKIP );
 
        $number = esc_attr( $number );
        $title  = esc_attr( $title );
@@ -999,11 +1000,11 @@ function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
        $items = (int) $widget_rss['items'];
        if ( $items < 1 || 20 < $items )
                $items = 10;
-       $url           = esc_url_raw(strip_tags( $widget_rss['url'] ));
-       $title         = trim(strip_tags( $widget_rss['title'] ));
-       $show_summary  = isset($widget_rss['show_summary']) ? (int) $widget_rss['show_summary'] : 0;
-       $show_author   = isset($widget_rss['show_author']) ? (int) $widget_rss['show_author'] :0;
-       $show_date     = isset($widget_rss['show_date']) ? (int) $widget_rss['show_date'] : 0;
+       $url           = esc_url_raw( strip_tags( $widget_rss['url'] ) );
+       $title         = isset( $widget_rss['title'] ) ? trim( strip_tags( $widget_rss['title'] ) ) : '';
+       $show_summary  = isset( $widget_rss['show_summary'] ) ? (int) $widget_rss['show_summary'] : 0;
+       $show_author   = isset( $widget_rss['show_author'] ) ? (int) $widget_rss['show_author'] :0;
+       $show_date     = isset( $widget_rss['show_date'] ) ? (int) $widget_rss['show_date'] : 0;
 
        if ( $check_feed ) {
                $rss = fetch_feed($url);
@@ -1133,7 +1134,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
                $nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
 
                // Get menus
-               $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
+               $menus = wp_get_nav_menus( array( 'orderby' => 'name' ) );
 
                // If no menus exists, direct the user to go and create some.
                if ( !$menus ) {