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_temais_param = $wp_query->query_vars['xt_param']; _xt_widget_grid_temai($args, array('dataType' => 'temai', 'page_no' => $xt_temais_param['page_no'], 'page_size' => 48, 'size' => 'big', 'temai' => $xt_temais_param, 'urlType' => isset($instance['urlType']) ? $instance['urlType'] : 'jump')); }