'amty_thumb', 'description' => __('It displays recently published posts with thumbnail', 'amtyThumb_posts') ); /* Widget control settings. */ $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'amty-thumb-recent' ); /* Create the widget. */ $this->WP_Widget( 'amty-thumb-recent', __('Amty Thumb Posts', 'amtyThumb_posts'), $widget_ops, $control_ops ); } function update( $new_instance, $old_instance ) { $instance = $old_instance; /* Strip tags for title and width & Height to remove HTML (important for text inputs). */ $instance['title'] = strip_tags( $new_instance['title'] ); $instance['maxpost'] = strip_tags( $new_instance['maxpost'] ); $instance['width'] = strip_tags( $new_instance['width'] ); $instance['height'] = strip_tags( $new_instance['height'] ); $instance['border'] = strip_tags( $new_instance['border'] ); $instance['itemwidth'] = strip_tags( $new_instance['itemwidth'] ); $instance['itemheight'] = strip_tags( $new_instance['itemheight'] ); $instance['itemborder'] = strip_tags( $new_instance['itemborder'] ); $instance['titlelen'] = strip_tags( $new_instance['titlelen'] ); /* No need to strip tags for icon */ $instance['icon'] = $new_instance['icon']; $instance['icontype'] = $new_instance['icontype']; //'uploaded','attached','referenced' //$instance['show_default'] = $new_instance['show_default']; $instance['imagepath'] = $new_instance['imagepath']; $instance['pretag'] = $new_instance['pretag']; $instance['posttag'] = $new_instance['posttag']; $instance['displaytype'] = $new_instance['displaytype']; $instance['templateItems'] = $new_instance['templateItems']; $instance['category'] = $new_instance['category']; $instance['widgettype'] = $new_instance['widgettype']; return $instance; } function form( $instance ) { /* Set up some default widget settings. */ $defaults = array( 'title' => __('Amty Thumb Posts', 'amtyThumb_posts'), 'width' => __('70', 'amtyThumb_posts'), 'height' => __('70', 'amtyThumb_posts'), 'border' => __('1', 'amtyThumb_posts'), 'icon' => 'yes', 'icontype' => 'any', //'uploaded','referenced','attached','any' 'imagepath' => __('', 'amtyThumb_posts'), 'pretag' => __('', 'amtyThumb_posts'), 'posttag' => __('', 'amtyThumb_posts'), 'titlelen' => __(50, 'amtyThumb_posts'), 'displaytype' => __('Vertically', 'amtyThumb_posts'), 'templateItems' => __('image', 'amtyThumb_posts'), 'itemwidth' => __('50', 'amtyThumb_posts'), 'itemheight' => __('50', 'amtyThumb_posts'), 'itemborder' => __('0', 'amtyThumb_posts'), 'maxpost' => __('5', 'amtyThumb_posts'), 'category' => __('All','amtyThumb_posts'), 'widgettype' => __('Recent','amtyThumb_posts') ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>
Posts, Category :
First Image.
id="get_field_id( 'show_default'); ?>" name="get_field_name( 'show_default'); ?>" /> */?>
View: Show first.
In case of Horizontal view