예제 #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;
     }
 }
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     global $wp_query;
     $xt_taobaos_param = $wp_query->query_vars['xt_param'];
     $xt_taobaos_param['start_commissionRate'] = isset($instance['start_commissionRate']) ? intval($instance['start_commissionRate']) : '';
     $xt_taobaos_param['end_commissionRate'] = isset($instance['end_commissionRate']) ? intval($instance['end_commissionRate']) : '';
     _xt_widget_grid_taobao($args, array('dataType' => 'taobao', 'page_no' => $xt_taobaos_param['page_no'], 'page_size' => $instance['count'], 'size' => 'big', 'taobao' => $xt_taobaos_param, 'urlType' => isset($instance['urlType']) ? $instance['urlType'] : 'jump'));
 }