function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     echo $before_widget;
     $title = empty($instance['title']) ? 'Latest Blog' : apply_filters('widget_title', $instance['title']);
     $entry_numb = empty($instance['entry_numb']) ? 5 : apply_filters('widget_entry_numb', $instance['entry_numb']);
     $use_thumbnail = empty($instance['use_thumbnail']) ? false : true;
     $use_excerpt = empty($instance['use_excerpt']) ? false : true;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     $e_length = 74;
     if ($use_thumbnail) {
         $e_length = 45;
     }
     echo wipfr_latest_blog($entry_numb, $use_thumbnail, $use_excerpt, $e_length);
     echo $after_widget;
 }
 function _content_for_column($type, $fields = "")
 {
     $colContent = "";
     switch ($type) {
         case 'paragraph-text':
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] != "") ? isset($fields[2]) && $fields[2] !== '' ? apply_filters('the_content', stripslashes(wptexturize($fields[1]))) : stripslashes(wptexturize($fields[1])) : '';
             break;
         case 'latest-post':
             $count = $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] != "") ? $fields[1] : 5;
             $usethumbnail = $fields != "" && is_array($fields) && (isset($fields[2]) && $fields[2] !== "") ? true : false;
             $showexcerpt = $fields != "" && is_array($fields) && (isset($fields[3]) && $fields[3] !== "") ? true : false;
             $catID = isset($fields[4]) && $fields[4] == 'all' ? 0 : intval($fields[4]);
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             $colContent .= wipfr_latest_blog($count, $usethumbnail, $showexcerpt, 66, $catID);
             break;
         case 'latest-portfolio-thumbnail':
             $count = $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] != "") ? $fields[1] : 6;
             $catID = isset($fields[2]) && $fields[2] == 'all' ? 0 : intval($fields[2]);
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             $colContent .= wipfr_latest_portfolio_thumbnail($count, $catID);
             break;
         case 'latest-product':
             $count = $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] != "") ? $fields[1] : 6;
             $catID = isset($fields[2]) && $fields[2] == 'all' ? 0 : intval($fields[2]);
             $featured = $fields != "" && is_array($fields) && (isset($fields[3]) && $fields[3] != "") ? true : false;
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             if (woocommerce_found()) {
                 $colContent .= _wip_latest_woo_product($count, $catID, $featured);
             } else {
                 $colContent .= __('Please activate WooCommerce Plugin!', 'wip');
             }
             break;
         case 'latest-post-column':
             $count = $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] != "") ? $fields[1] : 3;
             $catID = isset($fields[2]) && $fields[2] == 'all' ? 0 : intval($fields[2]);
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             $colContent .= wip_layout_helper::_print_column_blog_lists($count, $catID);
             break;
         case 'latest-tweet':
             $count = $fields != "" && is_array($fields) && (isset($fields[2]) && $fields[2] != "") ? $fields[2] : 4;
             $twitterUser = $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] !== "") ? esc_attr($fields[1]) : '';
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             if ($twitterUser != "") {
                 $colContent .= _wip_display_tweets($twitterUser, $count);
             } else {
                 $colContent .= __('Cannot process request! Twitter username is blank!', 'wip');
             }
             break;
         case 'flickr-photo':
             $count = $fields != "" && is_array($fields) && (isset($fields[2]) && $fields[2] != "") ? $fields[2] : 9;
             $flickrID = $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] !== "") ? esc_attr($fields[1]) : '';
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             if ($flickrID != "") {
                 $colContent .= wip_display_flickr($flickrID, $count);
             } else {
                 $colContent .= __('Cannot process request! Please enter your Flickr ID!', 'wip');
             }
             break;
         case 'box-testimonial':
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] != "") ? wpautop(stripslashes(wptexturize('<span class="before_quote">&#8220;</span>' . $fields[1] . '<span class="after_quote">&#8222;</span>'))) : '';
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[2]) && $fields[2] != "") ? stripslashes(wptexturize('<span class="testi_writer">&#8212; ' . $fields[2] . '</span>')) : '<span class="testi_writer">&#8212; No Body</span>';
             break;
         case 'latest-product-column':
             $count = $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] != "") ? $fields[1] : 3;
             $prodCat = isset($fields[2]) && $fields[2] == 'all' ? 0 : intval($fields[2]);
             $featured = $fields != "" && is_array($fields) && (isset($fields[3]) && $fields[3] != "") ? true : false;
             $colContent .= $fields != "" && is_array($fields) && (isset($fields[0]) && $fields[0] != "") ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             if (woocommerce_found()) {
                 $colContent .= _wip_show_product_lists_for_manager(34, $count, $prodCat, $featured, false);
             } else {
                 $colContent .= __('Please activate WooCommerce Plugin!', 'wip');
             }
             break;
         case 'latest-portfolio-column':
             $count = $fields != "" && is_array($fields) && (isset($fields[1]) && $fields[1] != "") ? $fields[1] : 3;
             $portCat = isset($fields[2]) && $fields[2] == 'all' ? 0 : intval($fields[2]);
             $colContent .= isset($fields[0]) && $fields[0] != "" ? '<h3 class="section_title">' . stripslashes(esc_attr($fields[0])) . '</h3>' . "\n" : '';
             $colContent .= wip_layout_helper::_print_column_portfolio_lists($count, $portCat);
             break;
     }
     return $colContent;
 }