/**
 * Process and return shortcode for Pinterest Pin Widget
 *
 * @since     1.0.0
 * @modified  1.0.1
 * 
 * @return    string
 */
function pw_pin_widget($attr)
{
    extract(shortcode_atts(array('url' => 'http://www.pinterest.com/pin/99360735500167749/'), $attr));
    $before_html = '';
    $html = '<div class="pw-wrap pw-shortcode">' . pw_pin_link($url, '', 'embedPin') . '</div>';
    $after_html = '';
    $before_html = apply_filters('pw_pin_widget_shortcode_before', $before_html);
    $html = apply_filters('pw_pin_widget_shortcode_html', $html);
    $after_html = apply_filters('pw_pin_widget_shortcode_after', $after_html);
    return $before_html . $html . $after_html;
}
 /**
  * Return public facing code for the Pinterest Pin Widget
  *
  * @since     1.0.0
  * @modified  1.0.1
  * 
  * @return    string
  */
 public function widget($args, $instance)
 {
     // public facing widget code
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     $pin_url = !empty($instance['pin_url']) ? $instance['pin_url'] : 'http://www.pinterest.com/pin/99360735500167749/';
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     $html = '<div class="pw-wrap pw-widget pw-pin-widget">' . pw_pin_link($pin_url, '', 'embedPin') . '</div>';
     do_action('pw_pin_widget_before');
     echo apply_filters('pw_pin_widget_html', $html);
     do_action('pw_pin_widget_after');
     echo $after_widget;
 }