'Aadi Latest Posts'); $control_ops = array('width' => 300, 'height' => 300); parent::__construct(false, $name='Aadi Latest Posts',$widget_ops,$control_ops); } /* Displays the Widget in the front-end */ function widget($args, $instance){ extract($args); global $post; $title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title']); $posts_number = empty($instance['posts_number']) ? '' : $instance['posts_number']; ?>

'Latest Posts', 'posts_number'=>'4') ); $title = htmlspecialchars($instance['title']); $posts_number = (int) $instance['posts_number']; # Title echo '

'; echo '

'; } }// end ShowPosts class function ShowLatestPostsInit() { register_widget('LatestPosts'); } add_action('widgets_init', 'ShowLatestPostsInit'); ?>