[wp-hackers] get_links_list() and get_links() can be improved.

Carthik Sharma carthik at gmail.com
Fri Jul 9 13:46:59 UTC 2004


Makes perfect sense, Mike, and as for the repeated question about
get_links() things are much clearer now, thanks to the reply to the
other mail that you posted. I do wish all the options related to links
would be at one place, like link-manager.php, instead of some being at
the Options page, and some at link-manager.php and so on.

Thanks,
Carthik.

On Fri, 09 Jul 2004 10:50:35 +0100, Mike Little <mike at zed1.com> wrote:
> Carthik Sharma wrote:
> 
> > The function (okay, template tag) get_links_list() allows one to order
> > the link categories by name or id, right now...
> > It does not let one specify the order in which the links themselves
> > are displayed. It may be useful to add parameters to help decide this
> > order and the other things that get_links() uses.
> > get_links_list is the default template tag in the wp index.php file,
> > which is why it would be nice to be able to specify more parameters,
> > if needed.
> >
> 
> Again, this function will use the settings configured for each category
> in the link category admin page.
> 
> > Also ,
> >
> > get_links shows links in reverse order of freshness if  'updated' is
> > specified as the order-by parameter, and shows them newest on top if
> > '_updated' is specified as the parameter, though the inline comments
> > in wp-includes/links.php says that adding _ before the param will
> > reverse the order. This behaviour might confuse an end user.
> >
> 
> There is nothing confusing here. If you specify 'name' as the sort order
> it displays the links in ascending alphabetical order. Similarly if you
> select 'updated' as the sort order is displays them in ascending updated
> date order.
> 
> Now, you will probably /want/ to always specify 'updated' to be reversed
> so that it displays the newest ones first, but that is no reason to
> change the logic of the function for that one case.
> You might say the same for 'rating', in that you would probably want to
> display the links with the highest rated ones first, but then you have
> two special cases, and things start to get out of hand...
> 
> Mike
> --
> Mike Little
> http://zed1.com/journalized/
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
When nothing is done, nothing is left undone -- 老子 Lǎozi

University of Central Florida
Homepage: http://carthik.net



More information about the hackers mailing list