'widget_blogger_letest_post', 'description' => __('This widget for sidebar for display Blog Posts of category wise and order by date, title etc.', 'bloggers-lite'))); $this->alt_option_name = 'widget_blogger_letest_post'; add_action('save_post', array($this, 'flush_widget_blogger_letest_post')); add_action('deleted_post', array($this, 'flush_widget_blogger_letest_post')); add_action('switch_theme', array($this, 'flush_widget_blogger_letest_post')); add_action('after_setup_theme', array(&$this, 'BloggerResizeImage')); } /** * @since Bloggers Lite 1.0 * @desc resize image to display feature images at front side and admin side */ function BloggerResizeImage() { add_image_size('bloggers-lite-blog-img', 75, 75, true); } /** * @since Bloggers Lite 1.0 * @param array $args arguments from sidebar * @param array $instance instance of widget * @return return html for front end display */ public function widget($args, $instance) { $title = !empty($instance['title']) ? $instance['title'] : ''; $sub_title = (!empty($instance['subtitle']) ) ? $instance['subtitle'] : ''; $numberofpost = isset($instance['numberofpost']) ? absint($instance['numberofpost']) : '-1'; $display_date = isset($instance['display_date']) ? (bool) $instance['display_date'] : false; $display_comment = isset($instance['display_comment']) ? (bool) $instance['display_comment'] : false; $show_excerpt = isset($instance['show_excerpt']) ? $instance['show_excerpt'] : false; $no_of_column = (!empty($instance['no_of_column']) ) ? $instance['no_of_column'] : ''; $show_readmore = isset($instance['show_readmore']) ? $instance['show_readmore'] : false; $readmore = (!empty($instance['readmore']) ) ? $instance['readmore'] : __('readmore', 'bloggers-lite'); $excerpt = (!empty($instance['excerpt']) ) ? absint($instance['excerpt']) : 30; if (!$excerpt) $excerpt = 30; $speed = (!empty($instance['speed']) ) ? $instance['speed'] : 500; $auto_slide = isset($instance['auto_slide']) ? $instance['auto_slide'] : false; $show_slider = isset($instance['show_slider']) ? $instance['show_slider'] : false; $infinite_slide = isset($instance['infinite_slide']) ? $instance['infinite_slide'] : false; $before_widget = $args['before_widget']; $before_title = $args['before_title']; $after_title = $args['after_title']; $after_widget = $args['after_widget']; $bg_image_style = ''; $content_class = ''; $button_class = ''; echo $before_widget; $mt_rand = mt_rand(); /** * Filter the arguments for the Blog post widget * @see WP_Query::get_posts() * @param array $args An array of arguments used to retrieve the Clients Testimonial. */ $argc = array( 'post_type' => 'post', 'orderby' => 'date', 'order' => 'DESC', 'posts_per_page' => $numberofpost, 'post_status' => 'publish', 'ignore_sticky_posts' => true ); $the_query = new WP_Query($argc); $published_posts = wp_count_posts('post')->publish; if ($published_posts == 0) { ?> have_posts()) { if ($infinite_slide == 1) { $infinite_slide1 = 'true'; } else { $infinite_slide1 = 'false'; } if ($auto_slide == 1) { $auto_slide1 = 'true'; } else { $auto_slide1 = 'false'; } if ($show_slider) { ?>

have_posts()) { $the_query->the_post(); $post_format = get_post_format(); ?>
= 100 ? absint($instance['speed']) : '500'; $auto_slide = isset($instance['auto_slide']) ? (bool) $instance['auto_slide'] : true; $show_slider = isset($instance['show_slider']) ? (bool) $instance['show_slider'] : true; $infinite_slide = isset($instance['infinite_slide']) ? (bool) $instance['infinite_slide'] : true; ?>

id="get_field_id('display_date'); ?>" name="get_field_name('display_date'); ?>" />