I have this plugin that displays category featured image thumbnails for each post via shortcodes.. like so,
[categorythumbnaillist 3] (3 being the category of course)
I would like it to only show posts with the tag "news".. only if you set the tag value to "news" via the shortcode. So if you entered in...
[categorythumbnaillist 3 tag="news"]
Then it should only show posts with the news tag in it. If no tag is entered, it should then display the posts for the respective category like the plugin already does.
Here is the code I made for displaying the results.
$args=array(
'showposts'=> 5,
'category'=> $listCatId[1],
'orderby'=> $categoryThumbnailList_OrderType,
'order'=> $categoryThumbnailList_Order
);
$myposts = get_posts( $args);
$output = '<div class="categoryThumbnailList">';
foreach($myposts as $post) :
I tried to read and understand Wordpress's shortcode API, but I just couldn't seem to wrap my head around it.
There are more functions from the plugin, So I have provided the full plugin code here: http://pastebin.com/QHrB8xUn
Any help to getting my plugin shortcode to filter results by the tag news (if entered) would truely be appreciated. :)

shortcode_atts()function – bungeshea Dec 3 '12 at 20:07