function widget($args, $instance)
 {
     // Checking Visualization filter.
     if (SpecialRecentPostsFree::visualizationCheck($instance, 'widget')) {
         // Extracting arguments.
         extract($args, EXTR_SKIP);
         // Printing pre-widget stuff.
         echo $before_widget;
         // Creating an instance of Special Recent Posts Class.
         $srp = new SpecialRecentPostsFree($instance, $this->id);
         // Displaying posts.
         if (is_object($srp)) {
             $srp->displayPosts(true, 'print');
         }
         // Printing after widget stuff.
         echo $after_widget;
     }
 }
function srp_shortcode($atts)
{
    // Including external widget values.
    global $srp_default_widget_values;
    // Checking Visualization filter.
    if (SpecialRecentPostsFree::visualizationCheck($srp_default_widget_values, 'shortcode')) {
        // If shortcode comes without parameters, make $atts a valid array.
        if (!is_array($atts)) {
            $atts = array();
        }
        // Assembling default widget options with available shortcode options.
        extract(shortcode_atts($srp_default_widget_values, $atts));
        // Creating an instance of Special Posts Class with widget args passed in manual mode.
        $srp = new SpecialRecentPostsFree($atts);
        // Displaying Posts.
        return $srp->displayPosts(NULL, 'return');
    }
}