'd_postlist', 'description' => '图文展示(最新文章+热门文章+随机文章)' ); $this->WP_Widget( 'd_postlist', 'Yusi-聚合文章', $widget_ops, $control_ops ); } function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_name', $instance['title']); $limit = $instance['limit']; $cat = $instance['cat']; $orderby = $instance['orderby']; $more = $instance['more']; $link = $instance['link']; $img = $instance['img']; $mo=''; $style=''; if( $more!='' && $link!='' ) $mo=''.$more.''; if( !$img ) $style = ' class="nopic"'; echo $before_widget; echo $before_title.$mo.$title.$after_title; echo '
DESC, 'cat' => $cat, 'orderby' => $orderby, 'showposts' => $limit, 'caller_get_posts' => 1 ); query_posts($args); while (have_posts()) : the_post(); ?>