'widget_gallery', 'description' => 'A widget that show gallery' ); /* Create the widget. */ parent::__construct( 'rst-gallery-widget', 'Angilla - Gallery', $widget_ops); } function widget($args, $instance) { $html = ''; $html .= $args['before_widget']; if( !empty($instance['title']) ) { $html .= $args['before_title']; $html .= $instance['title']; $html .= $args['after_title']; } if( $instance['gallery'] ){ $html .= ''; } $html .= $args['after_widget']; echo force_balance_tags($html); } function update($new_instance, $old_instance) { return $new_instance; } function form($instance) { ?>


$this->get_field_name( 'gallery' ), 'value' => isset($instance['gallery']) ? $instance['gallery'] : '' ) ); rs::ajaxTrigger(); } } add_action( 'widgets_init', 'angllia_create_gallery_widget' ); function angllia_create_gallery_widget(){ return register_widget("angllia_gallery_widget"); }