Ma.gnolia WordPress plugin 1.1

[Edit: The latest version of this plugin can be found here.]

So here’s a few extra features – some requested, others invented.

A note to new readers, this is a plugin for WordPress which lets you display the latest links from your Ma.gnolia account. You can now also display links matching one of your tags instead, if you like.

The new syntax gives many more options – they are, in order:

  1. Ma.gnolia username (required)
  2. Number of links to show (optional, can be any integer from 0-20, default is 10)
  3. Whether to include the H2 tag with the “Ma.gnolia” title above the list of links (optional, 1 or 0, default is 1)
  4. Whether to show the description of each link (optional, 1 or 0, default is 0)
  5. Whether to show the date you published each link (optional, 1 or 0, default is 0)
  6. Whether to link to the Ma.gnolia page of each link, instead of the links themselves (optional, 1 or 0, default is 0)
  7. Whether to just show links marked with a certain tag (type the name of the tag in quotes if you want to do this, default is none)

So to just show your last 10 links, with a “Ma.gnolia->[your username]” title above them, you only need supply your username:

<?php magnolia('barryprice'); ?>

Or to make it more interesting, to show the H2 title, then the last 15 links I published, with descriptions, without dates, and linking to the Ma.gnolia page for each, I would do this:

<?php magnolia('barryprice', 15, 1, 1, 0, 1); ?>

Or to omit the H2 title (just outputting a UL/LI structure, like e.cordero wanted), then show 20 links, without descriptions or dates, linking to the actual link URLs, we would do this:

<?php magnolia('barryprice', 20, 0, 0, 0, 0); ?>

Of course, the default setting for those last three arguments is 0 anyway, so this would also work:

<?php magnolia('barryprice', 20, 0); ?>

Finally, to do the same thing but only for entries tagged with “apple”, we would do:

<?php magnolia('barryprice', 20, 0, 0, 0, 0, 'apple'); ?>

Download Ma.gnolia plugin 1.1