'allvideogallery', 'description' => __('Use this widget to add All Video Gallery to your site\'s sidebar.', 'allvideogallery') ); $control_ops = array( 'width' => 290, 'height' => 350, 'id_base' => 'allvideogallery' ); $this->WP_Widget( 'allvideogallery', 'All Video Gallery', $widget_ops, $control_ops ); } /*****************************************************************/ /* How to display the widget on the screen ******************************************************************/ function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', $instance['title'] ); echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; $gallery = new Widget(); echo $gallery->buildGallery( $instance ); echo $after_widget; } /*****************************************************************/ /* Update the widget settings ******************************************************************/ function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['thumb_width'] = $new_instance['thumb_width']; $instance['thumb_height'] = $new_instance['thumb_height']; $instance['count'] = $new_instance['count']; $instance['custom_id'] = $new_instance['custom_id']; $instance['css'] = $new_instance['css']; $instance['category'] = strip_tags( $new_instance['category'] ); $instance['gallery'] = $new_instance['gallery']; $instance['link'] = $new_instance['link']; $instance['more'] = ( isset( $new_instance['more'] ) ? 1 : 0 ); return $instance; } /*****************************************************************/ /* Displays the widget settings controls on the widget panel ******************************************************************/ function form( $instance ) { $defaults = array( 'title' => '', 'thumb_width' => 75, 'thumb_height' => 50, 'count' => 4, 'custom_id' => 'avs_widget_gallery', 'css' => "#avs_widget_gallery .avs_thumb {\r\n border-bottom:1px solid #E7E7E7;\r\n margin:0px;\r\n padding:7px;\r\n float:left;\r\n width:99%;\r\n}\r\n#avs_widget_gallery a {\r\n text-decoration:none;\r\n}\r\n#avs_widget_gallery .avs_thumb:hover {\r\n background-color:#F1F1F1;\r\n}\r\n#avs_widget_gallery .avs_thumb .left {\r\n float:left;\r\n}\r\n#avs_widget_gallery .avs_thumb .right {\r\n width:100px;\r\n margin-left:5px;\r\n float:left;\r\n}\r\n#avs_widget_gallery .avs_thumb .arrow {\r\n position:absolute;\r\n opacity:0.5;\r\n filter:alpha(opacity=50);\r\n}\r\n#avs_widget_gallery .avs_thumb .title {\r\n display:block;\r\n font-size:12px;\r\n color:#444;\r\n}\r\n#avs_widget_gallery .avs_thumb .hits {\r\n display:block;\r\n font-size:10px;\r\n color:#777;\r\n}\r\n#avs_widget_gallery .more {\r\n border-bottom:1px solid #E7E7E7; \r\n padding:7px;\r\n width:99%;\r\n text-align:center;\r\n}\r\n#avs_widget_gallery .more a {\r\n width:32px;\r\n}", 'category' => '', 'gallery' => 'latest', 'link' => '', 'more' => 1 ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>

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