'widget_news_archive', 'description' => __( 'Use this widget to list your Link posts.', 'fruitful' ), ) ); } /** * Outputs the HTML for this widget. * * @param array An array of standard parameters for widgets in this theme * @param array An array of settings for this widget instance * @return void Echoes it's output **/ public function widget( $args, $instance ) { $id_item = 0; if (!isset( $args['widget_id'] ) ) $args['widget_id'] = null; if (isset( $cache[$args['widget_id']] ) ) { echo $cache[$args['widget_id']]; return; } $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'News-Archive', 'fruitful' ) : $instance['title'], $instance, $this->id_base); $number = empty( $instance['number'] ) ? 10 : absint( $instance['number'] ); $custom_content = empty ($instance['textarea_newsarchiv']) ? null : stripslashes($instance['textarea_newsarchiv']); $r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => -1, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) ); if ($r->have_posts()) : ?>