FALSE, 'addError'=>FALSE); if($_POST['addLinkSubmit']) { $nonce= $_REQUEST['addlink-nonce']; if (!wp_verify_nonce($nonce, 'addlink-nonce') ) die('Security check failed. Please use the back button and try resubmitting the information.'); if($options['useAddLinkPassword'] && ($_POST['addLinkPassword'] != $options['addLinkPassword'])) $errors['passwordError'] = TRUE; else { if ( $options['addLinkCategory'] ) $categoryID = $options['addLinkCategory']; else if(class_exists("FeedWordPress")) $categoryID = FeedWordPress :: link_category_id(); else $categoryID = get_option('default_link_category'); $link = strip_tags(stripslashes($_POST['addLinkLink'])); $sitename = strip_tags(stripslashes($_POST['addLinkName'])); $feed = strip_tags(stripslashes($_POST['addLinkFeed'])); // add link; if link not added then 0 will be returned $linkID = wp_insert_link(array( "link_name" => $sitename, "link_url" => $link, "link_rss" => $feed, "link_category" => array($categoryID) )); if($linkID == 0) $errors['addError'] = TRUE; else $errors['addError'] = FALSE; } } $addLinkTitle = $options['addLinkTitle']; $addLinkMessage = $options['addLinkMessage']; $useAddLinkPassword = $options['useAddLinkPassword']; $addLinkAlign = $options['addLinkAlign']; echo $before_widget . $before_title . $addLinkTitle . $after_title; ?>

Password incorrect!

"); elseif($errors['addError']) print("

Not added!

"); else print("

Added successfully!

"); } ?>


Password:

'Add Link', 'addLinkMessage'=>'Link:', 'useAddLinkPassword'=>TRUE, 'addLinkPassword'=>'passw0rd', 'addLinkAlign'=>'left', 'addLinkButtonText'=>'Add Link'); if($_POST['vn_add_link_submit']) { $nonce= $_REQUEST['addlink-nonce']; if (!wp_verify_nonce($nonce, 'addlink-nonce') ) die('Security check failed. Please use the back button and try resubmitting the information.'); // remember to sanitize and format user input appropriately. $options['addLinkTitle'] = strip_tags(stripslashes($_POST['addLinkTitle'])); $options['addLinkMessage'] = strip_tags(stripslashes($_POST['addLinkMessage'])); if($_POST['useAddLinkPassword'] == "yes") $options['useAddLinkPassword'] = TRUE; else $options['useAddLinkPassword'] = FALSE; $options['addLinkPassword'] = $_POST['addLinkPassword']; $options['addLinkAlign'] = $_POST['addLinkAlign']; $options['addLinkButtonText'] = $_POST['addLinkButtonText']; $options['addLinkCategory'] = $_POST['addLinkCategory']; update_option('vn_add_link_widget', $options); } ?>

Widget Alignment:


Message (type "<br />" without quotes for a new line):

/>