'amty_thumb', 'description' => __('It displays recently published posts with thumbnail', 'amty_thumb_recent') ); /* 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 Recent', 'amty_thumb_recent'), $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']; //$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']; return $instance; } function form( $instance ) { /* Set up some default widget settings. */ $defaults = array( 'title' => __('Amty Thumb Recent', 'amty_thumb_recent'), 'width' => __('70', 'amty_thumb_recent'), 'height' => __('70', 'amty_thumb_recent'), 'border' => __('1', 'amty_thumb_recent'), 'icon' => 'yes', 'show_icon' => true, 'icontype' => 'any', 'imagepath' => __('', 'amty_thumb_recent'), 'pretag' => __('', 'amty_thumb_recent'), 'posttag' => __('', 'amty_thumb_recent'), 'titlelen' => __(50, 'amty_thumb_recent'), 'displaytype' => __('Vertically', 'amty_thumb_recent'), 'templateItems' => __('image', 'amty_thumb_recent'), 'itemwidth' => __('50', 'amty_thumb_recent'), 'itemheight' => __('50', 'amty_thumb_recent'), 'itemborder' => __('0', 'amty_thumb_recent'), 'maxpost' => __('5', 'amty_thumb_recent') ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>
First Image.
id="get_field_id( 'show_default'); ?>" name="get_field_name( 'show_default'); ?>" /> */?>
View: Show first.
In case of Vertical view