'widget_klasik_features', 'description' => __('KlasikTheme Features','klasik') ); $this->WP_Widget('klasik-features-widget', __('KlasikTheme Features','klasik'), $widget_ops); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title']); $category = apply_filters('widget_category', $instance['category']); $cols = apply_filters('widget_cols', empty($instance['cols']) ? '' : $instance['cols']); $showposts = apply_filters('widget_showpost', empty($instance['showpost']) ? '' : $instance['showpost']); $longdesc = apply_filters('widget_longdesc', empty($instance['longdesc']) ? '' : $instance['longdesc']); $customclass = apply_filters('widget_customclass', empty($instance['customclass']) ? '' : $instance['customclass']); $instance['category'] = esc_attr(isset($instance['category'])? $instance['category'] : ""); global $wp_query; $longdesc = (!is_numeric($longdesc) || empty($longdesc))? 0 : $longdesc; $showposts = (!is_numeric($showposts))? get_option('posts_per_page') : $showposts; $cols = intval($cols); if(!is_numeric($cols) || $cols < 1 || $cols > 6){ $cols = 4; } echo $before_widget; if ( $title!='' ) echo $before_title . esc_html($title) . $after_title; $output = ""; $output .='