'nrelate-related-widget', 'description' => __('Show related posts', 'nrelate') ); $control_ops = array( 'width' => 230, 'height' => 350, 'id_base' => 'nrelate-related' ); $this->WP_Widget( 'nrelate-related', __('nrelate Related Widget', 'nrelate'), $widget_ops, $control_ops ); } function widget( $args, $instance ) { extract( $args ); echo "\n\t\t\t" . $before_widget; //Load the main function echo nrelate_related(true); echo "\n\t\t\t" . $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['style'] = $new_instance['style']; return $instance; } function form( $instance ) { //Defaults $defaults = array( 'title' => __('Related Posts:', 'nrelate') ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>