__('Descr', 'ecwd')) ); } function widget($args, $instance) { extract($args); //Output before widget stuff echo $before_widget; //Output title stuff $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); $id = $instance['id']; if (!empty($title)) { echo $before_title . $title . $after_title; } echo do_shortcode('[wd_ads '.$id.']'); //Output after widget stuff echo $after_widget; } function form($instance) { $type = WD_ADS_PLUGIN_PREFIX . '_ads'; $args = array( 'post_type' => $type, 'post_status' => 'publish', 'posts_per_page' => -1, 'ignore_sticky_posts' => 1, 'numberposts'=>'-1' ); $ads_posts = get_posts($args); $groups=$terms = get_terms('wd_ads_manage_groups') ; $title = (isset($instance['title'])) ? $instance['title'] : ''; $ids = (isset($instance['id'])) ? $instance['id'] : ''; ?>