diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 0d743354a9..0cf21a0e4f 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -520,6 +520,20 @@ function get_link_to_edit($link_id) { return $link; } +function get_default_link_to_edit() { + if ( isset($_GET['linkurl']) ) + $link->link_url = wp_specialchars($_GET['linkurl'], 1); + else + $link->link_url = ''; + + if ( isset($_GET['name']) ) + $link->link_name = wp_specialchars($_GET['name'], 1); + else + $link->link_name = ''; + + return $link; +} + function add_link() { return edit_link(); } @@ -799,6 +813,23 @@ function wp_dropdown_cats($currentcat = 0, $currentparent = 0, $parent = 0, $lev } } +function link_category_dropdown($fieldname, $selected = 0) { + global $wpdb; + + $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle FROM $wpdb->linkcategories ORDER BY cat_id"); + echo "\n\n"; +} + function wp_create_thumbnail($file, $max_side, $effect = '') { // 1 = GIF, 2 = JPEG, 3 = PNG diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php new file mode 100644 index 0000000000..09cb3ad0a2 --- /dev/null +++ b/wp-admin/edit-link-form.php @@ -0,0 +1,234 @@ +'; +} else { + $editing = false; + $heading = __('Add a link:'); + $submit_text = __('Add Link »'); + $form = '