Delicious Readings plugin goes 2.0

Yesterday I pushed to the WordPress repository a new version of my plugin Delicious Readings. If you don’t know this plugin, Delicious Readings lets you publish on your blog a collection of Delicious bookmarks stored with a particular tagged of your choice. So, for example, you can publish your bookmarks stored under “readings” or “pets” or “sushi” and so on.

The new version 2.0 adds the shortcode, in order to publish this list on a page or on a post. The idea comes from a user on the WordPress forums, who asked if there were the possibility to publish this list on a page rather than on a widget in the sidebar (already full of stuff). I was replying that he could call the plugin’s main function directly in the PHP code, but I thought it were better to add a shortcode for use in the writing panel.

Usage as shortcode

The shortcode accepts the full range of options of the core function. The only mandatory option is the address of the feed. So, for example, if your username is joe and the tag is books the shortcode will be:

[dreadings feed_url=""]

The plugin will show the last 5 bookmarks by default. If you want to show 10 bookmarks, change the shortcode as follows:

[dreadings feed_url="" quantity=10]

The tags aren’t displayed by default. If you want to show them, change the line in this way:

[dreadings feed_url="" quantity=10 display_tags=true]

This is the full set of options you can use (the value shown here is the default one):

date_text="Stored on:"
archive_text="More posts"

Change default values according to your needs.

Usage as PHP function

As I already said, you can use the plugin calling the main function directly in your PHP files:

<?php if ( function_exists( &#039;dr_fetch_feed&#039; ) ) {
    $args = array(
        &#039;feed_url&#039;         => &#039;&#039;,
        &#039;quantity&#039;         => 5,
        &#039;display_desc&#039;     => false,
        &#039;truncate&#039;         => 0,
        &#039;display_date&#039;     => false,
        &#039;date_text&#039;        => &#039;Stored on:&#039;,
        &#039;display_tags&#039;     => false,
        &#039;tags_text&#039;        => &#039;Tags:&#039;,
        &#039;display_hashtag&#039;  => true,
        &#039;display_arrow&#039;    => false,
        &#039;display_archive&#039;  => true,
        &#039;archive_text&#039;     => &#039;More posts&#039;,
        &#039;display_arch_arr&#039; => true,
        &#039;new_tab&#039;          => false,
        &#039;nofollow&#039;         => true,
    dr_fetch_feed( $args );
} ?>

Make sure to check if the opening <?php and closing ?> PHP tags are needed in your code. This is the full range of options — you can obviously use only those who need change.

The plugin is available on the WordPress repository and on GitHub.

Published by aldolat

A WordPress fanatic.