get_links_list [ WordPress Function ]
get_links_list ( $order = 'name' )
| Parameters: |
|
| See: | |
| Defined at: |
|
Output entire list of links by category.
Output a list of all links, listed by category, using the settings in $wpdb->linkcategories and output it as a nested HTML unordered list.
Source
<?php
function get_links_list($order = 'name') {
_deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );
$order = strtolower($order);
// Handle link category sorting
$direction = 'ASC';
if ( '_' == substr($order,0,1) ) {
$direction = 'DESC';
$order = substr($order,1);
}
if ( !isset($direction) )
$direction = '';
$cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0));
// Display each category
if ( $cats ) {
foreach ( (array) $cats as $cat ) {
// Handle each category.
// Display the category name
echo ' <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n";
// Call get_links() with all the appropriate params
get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);
// Close the last category
echo "\n\t</ul>\n</li>\n";
}
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/get links list « WordPress Codex
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions.
codex.wordpress.org - WordPress › New get_links_list() function
Aug 26, 2003 ... function get_links_list() * * added by Dougal * * Output a list of all links, listed by category, using the * settings in $tablelinkcategories and output ...
wordpress.org - WordPress › Support » Tags — get_links_list
(forgot?) Register · WordPress › Support » get_links_list ...
wordpress.org - Remove title "Linklist" from <?php get_links_list(); ?> in ... - WordPress
Hi! Im trying to costumize my linklist title or better yet remove it, im using wp's default function <?php get_links_list(); ?> to ge the list .. but it prits the title " Linklists" ...
wordpress.org
Kullanýcý Tartýþmalarý [ wordpress.org ]
- BloggerDesign on "What's the new get_links_list function?"
- Khairil Zhafri on "What's the new get_links_list function?"
- BloggerDesign on "What's the new get_links_list function?"
- hitmanuk2k on "Edit Links Display"
- hitmanuk2k on "Edit Links Display"
- Sainty on "Function to get array of links"
- Navjot Singh on "Function to get array of links"
- michelem on "Function to get array of links"
- adminbarnhardnl on "how to exclude one category from links on sidebar"
- snakefoot on "Function to get array of links"