예제 #1
0
 function widget($args, $instance)
 {
     $title = apply_filters('xt_widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     switch ($instance['dataType']) {
         case 'taobao':
             _xt_widget_grid_taobao($args, $instance);
             break;
         case 'paipai':
             _xt_widget_grid_paipai($args, $instance);
             break;
         case 'share':
             _xt_widget_grid_share($args, $instance);
         case 'coupon':
             _xt_widget_grid_coupon($args, $instance);
             break;
         case 'temai':
             _xt_widget_grid_temai($args, $instance);
             break;
         case 'bijia':
             _xt_widget_grid_bijia($args, $instance);
         default:
             break;
     }
 }
예제 #2
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('xt_widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     global $wp;
     $params = $wp->query_vars['xt_param'];
     $page_no = intval($params['page_no']);
     $cid = $params['cid'];
     $keyword = $params['keyword'];
     $shop_type = $instance['shop_type'];
     $sort = $instance['sort'];
     $row = intval($instance['row']);
     $size = isset($instance['size']) ? $instance['size'] : 'big';
     _xt_widget_grid_coupon($args, array('title' => $title, 'size' => $size, 'page_no' => $page_no, 'row' => $row, 'coupon' => array('cid' => $cid, 'keyword' => $keyword, 'shop_type' => $shop_type, 'sort' => $sort)));
 }
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     global $wp_query;
     $xt_coupons_param = $wp_query->query_vars['xt_param'];
     $xt_coupons_param['start_commissionRate'] = isset($instance['start_commissionRate']) ? intval($instance['start_commissionRate']) : '';
     $xt_coupons_param['end_commissionRate'] = isset($instance['end_commissionRate']) ? intval($instance['end_commissionRate']) : '';
     _xt_widget_grid_coupon($args, array('dataType' => 'coupon', 'page_no' => $xt_coupons_param['page_no'], 'page_size' => $instance['count'], 'size' => 'big', 'coupon' => $xt_coupons_param, 'urlType' => isset($instance['urlType']) ? $instance['urlType'] : 'jump'));
 }