After Ma.gnolia went down I was so disappointed that I decided to take matters into my own hands. I thought, why not use WordPress to store my bookmarks. It has all the neat features of most popular bookmarking sites, and even some more (XFN, for example).
Of course, I could just post a link whenever I saw one but it panged me to think that I would be putting to waste that wonderful link schema that the folks at WordPress have put so much thought into. And then Smashing Magazine reminded me about shortcodes. I had used them before in plugins but I never thought about just adding one off short codes to my functions.php
file.
It turns out that this was the perfect solution to my problem. With one tiny little shortcode I was able to utilize the bookmarks system in WordPress and publish my links as normal. Here is how I did it.
1. The shortcode code
First you want to start by adding the following code somewhere in your functions.php
file.
[php]
/**
* Get a bookmark and display it
*
* usage: [magnolia id=”bookmarkid”]
*
* @return string
*/
function magnolia_rip($atts) {
extract(shortcode_atts(array(
‘ids’ => ‘1’,
), $atts));
$idarr = explode(‘,’,$ids);
$bookmarks = ”;
foreach ($idarr as $id) {
$bookmark = get_bookmark($id,ARRAY_A);
extract($bookmark);
$bookmarks .= <<
$link_notes