query("update $wpdb->links SET link_category='$category' WHERE link_id IN ($all_links)"); wp_redirect($this_file); exit; break; case 'add' : check_admin_referer('add-bookmark'); add_link(); wp_redirect( wp_get_referer() . '?added=true' ); exit; break; case 'save' : $link_id = (int) $_POST['link_id']; check_admin_referer('update-bookmark_' . $link_id); edit_link($link_id); wp_redirect($this_file); exit; break; case 'delete' : $link_id = (int) $_GET['link_id']; check_admin_referer('delete-bookmark_' . $link_id); wp_delete_link($link_id); wp_redirect($this_file); exit; break; case 'edit' : $parent_file = 'link-manager.php'; $submenu_file = 'link-manager.php'; $title = __('Edit Link'); $link_id = (int) $_GET['link_id']; if (!$link = get_link_to_edit($link_id)) wp_die(__('Link not found.')); include ('edit-link-form.php'); include ('admin-footer.php'); break; default : break; } ?>