[wp-trac] [WordPress Trac] #18781: Idea - Links as a post type
WordPress Trac
wp-trac at lists.automattic.com
Mon Sep 26 16:14:01 UTC 2011
#18781: Idea - Links as a post type
--------------------------+-----------------------------
Reporter: sanchothefat | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords: dev-feedback
--------------------------+-----------------------------
'''I don't know if this has come up before but given the way WP is now
would it make sense for links to be a post type?'''
I already have a drop-in which does this that I use in my projects.
Essentially permalinks are created from post meta using the get_permalink
filter and checking the post type. In a standard loop you get the title
and so long as the_permalink() or get_permalink() are used the link url is
written out rather than a link to the post page.
There are a couple of advantages to this:
- categorisation: adding or removing taxonomies etc... is possible
- adding post meta or custom functionality is easier
- featured image functionality
- templates for links would be far more configurable eg. a file called
loop-links.php could be used by the built in function if available.
archive-links.php would be the links page etc...
- link categorisation UI would be consistent with post type categorisation
UI
While my drop in works for me there is more code relating to it for
listing items so there would be some extra work to do to put this into
core:
- alternative or rewritten functions to wp_list_bookmarks() - I'd say a
new set of functions eg. wp_list_links() etc...
- a conversion routine from old style links to the post type
- consideration of how best to make link templates easy to work into
themes
- new/rewritten links widget
I'm just looking for your thoughts on this and any feedback, caveats,
advantages, things to consider, +1s etc... before I code this up and
submit it for possible inclusion in the core.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18781>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list