From fdedc153f57d2b97c3ef0a9c4db17b207a4519de Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 4 Dec 2006 00:44:18 +0000 Subject: [PATCH] Make link manager hookable. Props donncha. fixes #3422 git-svn-id: https://develop.svn.wordpress.org/trunk@4594 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/link-manager.php | 90 ++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 35 deletions(-) diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index c4de0dbf9b..6ac0029322 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -93,6 +93,17 @@ printf(__('Currently showing %1$s links ordered by %2$s'), $select_cat, $select_ ?>

+ '' . __('Name') . '', + 'url' => '' . __('URL') . '', + 'categories' => '' . __('Categories') . '', + 'rel' => '' . __('rel') . '', + 'visible' => '' . __('Visible') . '', + 'action' => '' . __('Action') . '', +); +$link_columns = apply_filters('manage_link_columns', $link_columns); +?> - - - - - - - + + @@ -136,35 +144,47 @@ if ( $links ) { $visible = ($link->link_visible == 'Y') ? __('Yes') : __('No'); ++ $i; $style = ($i % 2) ? '' : ' class="alternate"'; -?> - > - link_name; ?>
- >$column_display_name) { + switch($column_name) { + case 'name': + ?>link_name; ?>
link_description . ""; + break; + case 'url': + echo "link_name)."'>$short_url"; + break; + case 'categories': + ?>link_category as $category) { + $cat_name = get_the_category_by_ID($category); + $cat_name = wp_specialchars($cat_name); + if ( $cat_id != $category ) + $cat_name = "$cat_name"; + $cat_names[] = $cat_name; + } + echo implode(', ', $cat_names); + ?> link_rel; ?>'.__('Edit').''; + echo 'link_id , '".js_escape(sprintf(__("You are about to delete the "%s" link to %s.\n"Cancel" to stop, "OK" to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').''; + break; + default: + ?> + + link_description . ""; - echo "link_url\" title=\"".sprintf(__('Visit %s'), $link->link_name)."\">$short_url"; - ?> - - link_category as $category) { - $cat_name = get_the_category_by_ID($category); - $cat_name = wp_specialchars($cat_name); - if ( $cat_id != $category ) - $cat_name = "$cat_name"; - $cat_names[] = $cat_name; + } } - echo implode(', ', $cat_names); - ?> - - link_rel; ?> - -'.__('Edit').''; - echo 'link_id , '".js_escape(sprintf(__("You are about to delete the "%s" link to %s.\\n"Cancel" to stop, "OK" to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').''; echo ''; echo "\n \n"; } @@ -174,7 +194,7 @@ if ( $links ) {
-

')" />

+

')" />