* @license http://wiki.envato.com/support/legal-terms/licensing-terms/ * @version 1.7.3 */ $extra_post_class = oxy_get_option('blog_post_icons') == 'on' ? 'post-showinfo' : ''; ?> <article id="post-<?php the_ID(); ?> " <?php post_class($extra_post_class); ?> > <?php if (oxy_get_option('blog_post_icons') === 'on') { ?> <header class="post-head small-screen-center no-title"> <span class="post-icon"> <?php oxy_post_icon($post->ID, true); ?> </span> </header> <?php } ?> <div class="post-body"> <?php echo oxy_shortcode_blockquote(array('who' => get_the_title(), 'margin_top' => 'no-top', 'margin_bottom' => 'no-bottom'), get_the_content()); ?> </div> </article>
public function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts', 'lambda-td') : $instance['title'], $instance, $this->id_base); if (empty($instance['number']) || !($number = absint($instance['number']))) { $number = 10; } $show_date = isset($instance['show_date']) ? $instance['show_date'] : false; $r = new WP_Query(apply_filters('widget_posts_args', array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true))); if ($r->have_posts()) { echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } ?> <ul> <?php while ($r->have_posts()) { $r->the_post(); ?> <?php if ('link' == get_post_format()) { $post_link = oxy_get_external_link(); } else { $post_link = get_permalink(); } ?> <li class="clearfix"> <div class="post-icon"> <a href="<?php echo $post_link; ?> " title="<?php the_title(); ?> "> <?php if (has_post_thumbnail()) { ?> <?php the_post_thumbnail('thumbnail'); ?> <?php } else { ?> <?php oxy_post_icon(get_the_ID()); ?> <?php } ?> </a> </div> <a href="<?php echo $post_link; ?> " title="<?php the_title(); ?> "><?php the_title(); ?> </a> <small class="post-date"> <?php if ($show_date) { the_time(get_option('date_format')); } ?> </small> </li> <?php } ?> </ul> <?php echo $after_widget; wp_reset_postdata(); } }