public function __construct()
 {
     parent::__construct();
     $this->settings = array('title' => array('type' => 'text', 'std' => __('Products', 'woocommerce'), 'label' => __('Title', 'woocommerce')), 'number' => array('type' => 'number', 'step' => 1, 'min' => 1, 'max' => '', 'std' => 5, 'label' => __('Number of products to show', 'woocommerce')), 'show' => array('type' => 'select', 'std' => '', 'label' => __('Show', 'woocommerce'), 'options' => array('best_selling' => 'Best Selling', 'featured_product' => 'Featured Products', 'top_rate' => 'Top Rate', 'recent_product' => 'Recent Products', 'on_sale' => 'On Sale', 'recent_review' => 'Recent Review')), 'orderby' => array('type' => 'select', 'std' => 'date', 'label' => __('Order by', 'woocommerce'), 'options' => array('date' => __('Date', 'woocommerce'), 'price' => __('Price', 'woocommerce'), 'rand' => __('Random', 'woocommerce'), 'sales' => __('Sales', 'woocommerce'))), 'order' => array('type' => 'select', 'std' => 'desc', 'label' => _x('Order', 'Sorting order', 'woocommerce'), 'options' => array('asc' => __('ASC', 'woocommerce'), 'desc' => __('DESC', 'woocommerce'))), 'hide_free' => array('type' => 'checkbox', 'std' => 0, 'label' => __('Hide free products', 'woocommerce')), 'show_hidden' => array('type' => 'checkbox', 'std' => 0, 'label' => __('Show hidden products', 'woocommerce')));
 }
Esempio n. 2
0
 function widget($args, $instance)
 {
     ob_start();
     parent::widget($args, $instance);
     $output = ob_get_clean();
     echo Everything::woocommerceWidgetParseList($output);
 }