__CLASS__, 'description' => __('Display the transcription of the current post if there is one. (used in comic sidebars)','comicpress') ); $this->WP_Widget(__CLASS__, __('ComicPress Transcript','comicpress'), $widget_ops); } } function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $transtype = empty($instance['transtype']) ? 'empty' : apply_filters('widget_transtype', $instance['transtype']); if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; the_transcript($transtype); echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['transtype'] = strip_tags($new_instance['transtype']); return $instance; } function form($instance) { $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'transtype' => '' ) ); $title = strip_tags($instance['title']); $transtype = strip_tags($instance['transtype']); if (empty($transtype)) $transtype = 'styled'; ?>