'; echo $after_widget; } // This is the function that outputs the form to let the users edit // the widget's title and other options. function widget_ldblogbox_control() { // Get our options and see if we're handling a form submission. $options = get_option('widget_ldblogbox'); if ( !is_array($options) ) $options = array('title'=>'','list'=>'on','char'=>'','background'=>'','target'=>''); if ( $_POST['ldblogbox-submit'] ) { // Sanitize and format use input appropriately. $options['title'] = strip_tags(stripslashes($_POST['ldblogbox-title'])); $options['list'] = strip_tags(stripslashes($_POST['ldblogbox-list'])); $options['char'] = strip_tags(stripslashes($_POST['ldblogbox-char'])); $options['background'] = strip_tags(stripslashes($_POST['ldblogbox-background'])); $options['target'] = strip_tags(stripslashes($_POST['ldblogbox-target'])); update_option('widget_ldblogbox', $options); } // Format options to be valid HTML attributes. $title = htmlspecialchars($options['title'], ENT_QUOTES); $list = htmlspecialchars($options['list'], ENT_QUOTES); $char = htmlspecialchars($options['char'], ENT_QUOTES); $background = htmlspecialchars($options['background'], ENT_QUOTES); $target = htmlspecialchars($options['target'], ENT_QUOTES); // Form segment. This will be embedded into the existing form. echo '
Leave this blank if you do not want a header.
';
echo '