'Add HTML/Javascript', 'text' => 'HTML/Jvascript content goes here' ); } // Display the widget! echo $before_widget; echo $before_title; echo $options['title']; echo $after_title; //Our Widget Content echo ($options['text']); echo $after_widget; } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function widget_add_html_java_control() { // We need to grab any preset options $options = get_option("widget_add_html_java"); // No options? No problem! We set them here. if (!is_array( $options )) { $options = array( 'title' => 'Widget Title goes here', 'text' => 'Widget Content' ); } // Is the user has set the options and clicked save, // Then we grab them using the $_POST function. if ($_POST['widget_add_html_java_submit']) { $options['title'] = stripslashes($_POST['widget_add_html_java_title']); $options['text'] = stripslashes($_POST['widget_add_html_java_text']); // And we also update the options in the Wordpress Database update_option("widget_add_html_java", $options); } ?>


Edit in WYSIWYG editor