<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; ?>
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') );
}
$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 );
$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);
$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 ) {