/** * Output the widgets settings form */ function form($opts) { //get default settings $opts = wp_parse_args((array) $opts, $this->defaults()); $f = new WidgetForm(); echo '<div>'; # show title echo $f->text(array('name' => $this->get_field_name('title'), 'id' => $this->get_field_id('title'), 'descr' => __('Title', 'widgetKing'), 'title' => __('The title above this widget', 'widgetKing'), 'val' => esc_html($opts['title']))); echo $f->checkbox(array('name' => $this->get_field_name('use_php'), 'id' => $this->get_field_id('use_php'), 'descr' => __('Use PHP in Text', 'widgetKing'), 'title' => __('If checked the inserted code is evaluated as php. PHP Code MUST be enclosed in <?php and ?> tags! You can also insert Wordpress Code if you have not found a Widget for it yet.', 'widgetKing'), 'val' => $opts['use_php'])); // if ( !current_user_can('unfiltered_html') ) // $newoptions[$number]['text'] = stripslashes(wp_filter_post_kses($newoptions[$number]['text'])); echo $f->textarea(array('name' => $this->get_field_name('text'), 'id' => $this->get_field_id('text'), 'descr' => __('Text or HTML', 'widgetKing'), 'title' => __('Insert your Text Freely. This can be bannercode, images or whatever you like. The HTML gets stripped if you do not have the right to insert unfiltered html.', 'widgetKing'), 'val' => $opts['text'], 'cols' => "20", 'rows' => "16")); echo '</div> <h3><a href="#">' . __('Show', 'widgetKing') . '</a></h3> <div>'; # Where To Show Options Panel $f->where_to_show($this, $opts); echo '</div> <h3><a href="#">' . __('HTML', 'widgetKing') . '</a></h3> <div>'; # show html options $f->html_opts($this, $opts); echo '</div> <h3><a href="#">' . __('Import / Export', 'widgetKing') . '</a></h3> <div>'; #import $f->export_opts($this, $opts); echo '</div>'; }