[wp-hackers] wrapping link name between span tags in blogroll
fris
fris at fris.net
Thu Jun 9 16:02:08 UTC 2011
I would create a custom widget using get_bookmarks, so you could format it
that way.
Bad idea to hack core files
-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of danilo
Sent: Thursday, June 09, 2011 9:26 AM
To: wp-hackers
Subject: [wp-hackers] wrapping link name between span tags in blogroll
Hello,
using the standard blogroll widget I needed the link name to be wrapped in
<span> tags while using link images, so I tried looking for a valid filter
to do so but was unable to find it.
here's the standard output of the wp_list_bookmarks function used in the
blogroll widget:
<li><a href=".."><img ... /> linkname</a></li>
and here's what I needed to achieve:
<li><a href=".."><img ... /><span class="link_name">linkname</span></a></li>
Since I couldn't find a clean way of achieving this I decided to have a look
at wp-includes/bookmark-template.php and I made a few modifications.
here's the patch I've made, it's on pastebin so that you could have a look
at it and tell me if it's worth submitting it to trac.
http://pastebin.com/TaVyZWzQ
Thanks a lot in advance
--
Danilo aka danix
http://danixland.net
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list