'widget_shortcodes', 'description' => __( 'Show shortcodes' ) ); /* Create the widget */ $this->WP_Widget( 'shortcodes-widget', __( 'Shortcodes' ), $widget_ops ); } /** * Displaying the widget * * Handle the display of the widget * @param array * @param array */ function widget( $args, $instance ) { extract ($args); echo $before_widget; echo $before_title . $instance['title'] . $after_title; echo do_shortcode($instance['shortcodes']); echo $after_widget; } /** * Update and save widget * * @param array $new_instance * @param array $old_instance * @return array New widget values */ function update ( $new_instance, $old_instance ) { $old_instance['title'] = strip_tags( $new_instance['title'] ); $old_instance['shortcodes'] = strip_tags( $new_instance['shortcodes'] ); return $old_instance; } /** * Creates widget controls or settings * * @param array Return widget options form */ function form ( $instance ) { ?>