本文整理汇总了PHP中WC_Widget类的典型用法代码示例。如果您正苦于以下问题:PHP WC_Widget类的具体用法?PHP WC_Widget怎么用?PHP WC_Widget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WC_Widget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* constructor
*
* @see WC_Widget_Product_Categories
*
* @access public
* @return void
*/
public function __construct()
{
$this->widget_cssclass = 'woocommerce widget_product_categories widget_category_diagram';
$this->widget_description = __('A list or dropdown of product categories with a diagram image and legend.', 'woocommerce-category-diagram-widget');
$this->widget_id = 'woocommerce_product_category_diagram';
$this->widget_name = __('WooCommerce Categories w/ Diagram', 'woocommerce-category-diagram-widget');
$this->settings = array('title' => array('type' => 'text', 'std' => __('Product Categories', 'woocommerce'), 'label' => __('Title', 'woocommerce')), 'orderby' => array('type' => 'select', 'std' => 'name', 'label' => __('Order by', 'woocommerce'), 'options' => array('order' => __('Category Order', 'woocommerce'), 'name' => __('Name', 'woocommerce'))), 'diagram_position' => array('type' => 'select', 'std' => 'below', 'label' => __('Diagram Position', 'woocommerce-category-diagram-widget'), 'options' => array('above' => __('Above Filter', 'woocommerce-category-diagram-widget'), 'below' => __('Below Filter', 'woocommerce-category-diagram-widget'))), 'dropdown' => array('type' => 'checkbox', 'std' => 0, 'label' => __('Show as dropdown', 'woocommerce')), 'count' => array('type' => 'checkbox', 'std' => 0, 'label' => __('Show product counts', 'woocommerce')), 'hierarchical' => array('type' => 'checkbox', 'std' => 1, 'label' => __('Show hierarchy', 'woocommerce')), 'show_children_only' => array('type' => 'checkbox', 'std' => 0, 'label' => __('Only show children of the current category', 'woocommerce')));
parent::__construct();
}
示例2: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'nm_widget nm_widget_color_filter woocommerce widget_layered_nav';
$this->widget_description = __('Shows "color" attributes in a widget which lets you narrow down the list of products when viewing products. ', 'woocommerce');
$this->widget_id = 'nm_woocommerce_color_filter';
$this->widget_name = __('WooCommerce Color Filter', 'woocommerce');
parent::__construct();
}
示例3: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'nm_widget nm_widget_price_filter woocommerce widget_price_filter';
$this->widget_description = __('Shows a price filter list in a widget which lets you narrow down the list of shown products when viewing product categories.', 'woocommerce');
$this->widget_id = 'nm_woocommerce_price_filter';
$this->widget_name = __('WooCommerce Price Filter List', 'woocommerce');
$this->settings = array('title' => array('type' => 'text', 'std' => __('Filter by price', 'woocommerce'), 'label' => __('Title', 'woocommerce')), 'price_range_size' => array('type' => 'number', 'step' => 1, 'min' => 1, 'max' => '', 'std' => 50, 'label' => __('Price range size', 'nm-framework-admin')), 'max_price_ranges' => array('type' => 'number', 'step' => 1, 'min' => 1, 'max' => '', 'std' => 10, 'label' => __('Max price ranges', 'nm-framework-admin')), 'hide_empty_ranges' => array('type' => 'checkbox', 'std' => 1, 'label' => __('Hide empty price ranges', 'nm-framework-admin')));
parent::__construct();
}
示例4: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'woocommerce widget_top_rated_products';
$this->widget_description = __('Display a list of your top rated products on your site.', 'woocommerce');
$this->widget_id = 'woocommerce_top_rated_products';
$this->widget_name = __('WooCommerce Top Rated Products', 'woocommerce');
$this->settings = array('title' => array('type' => 'text', 'std' => __('Top Rated Products', 'woocommerce'), 'label' => __('Title', 'woocommerce')), 'number' => array('type' => 'number', 'step' => 1, 'min' => 1, 'max' => '', 'std' => 5, 'label' => __('Number of products to show', 'woocommerce')));
parent::__construct();
}
示例5: __construct
/**
* Constructor.
*/
public function __construct()
{
$this->widget_cssclass = 'woocommerce widget_recent_reviews';
$this->widget_description = __('Display a list of your most recent reviews on your site.', 'woocommerce');
$this->widget_id = 'woocommerce_recent_reviews';
$this->widget_name = __('WooCommerce recent reviews', 'woocommerce');
$this->settings = array('title' => array('type' => 'text', 'std' => __('Recent reviews', 'woocommerce'), 'label' => __('Title', 'woocommerce')), 'number' => array('type' => 'number', 'step' => 1, 'min' => 1, 'max' => '', 'std' => 10, 'label' => __('Number of reviews to show', 'woocommerce')));
parent::__construct();
}
示例6: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'nm_widget nm_widget_product_sorting woocommerce';
$this->widget_description = __('Display a product sorting list.', 'nm-framework');
$this->widget_id = 'nm_woocommerce_widget_product_sorting';
$this->widget_name = __('WooCommerce Product Sorting', 'nm-framework');
$this->settings = array('title' => array('type' => 'text', 'std' => __('Sort By', 'nm-framework'), 'label' => __('Title', 'nm-framework')));
parent::__construct();
}
示例7: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'woocommerce widget_product_search';
$this->widget_description = __('A Search box for products only.', 'woocommerce');
$this->widget_id = 'woocommerce_product_search';
$this->widget_name = __('WooCommerce Product Search', 'woocommerce');
$this->settings = array('title' => array('type' => 'text', 'std' => '', 'label' => __('Title', 'woocommerce')));
parent::__construct();
}
示例8: __construct
public function __construct()
{
$this->widget_cssclass = 'woocommerce woocommerce_gzd widget_trusted_shops_reviews';
$this->widget_description = _x("Display your Trusted Shops Reviews as graphic.", 'trusted-shops', 'woocommerce-germanized');
$this->widget_id = 'woocommerce_gzd_widget_trusted_shops_reviews';
$this->widget_name = _x('Trusted Shops Reviews', 'trusted-shops', 'woocommerce-germanized');
$this->settings = array('title' => array('type' => 'text', 'std' => _x('Trusted Shops Reviews', 'trusted-shops', 'woocommerce-germanized'), 'label' => __('Title', 'woocommerce')));
parent::__construct();
}
开发者ID:ronzeiller,项目名称:woocommerce-germanized,代码行数:9,代码来源:class-wc-gzd-widget-trusted-shops-reviews.php
示例9: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'woocommerce widget_brands_filter';
$this->widget_description = __('Shows brands in a widget which lets you narrow down the list of products when viewing product categories.', 'media_center');
$this->widget_id = 'mc_brands_filter';
$this->widget_name = __('MediaCenter Brands Filter', 'media_center');
$this->settings = array('title' => array('type' => 'text', 'std' => __('Filter by', 'media_center'), 'label' => __('Title', 'media_center')), 'display_type' => array('type' => 'select', 'std' => 'list', 'label' => __('Display type', 'media_center'), 'options' => array('list' => __('List', 'media_center'), 'dropdown' => __('Dropdown', 'media_center'))), 'query_type' => array('type' => 'select', 'std' => 'and', 'label' => __('Query type', 'media_center'), 'options' => array('and' => __('AND', 'media_center'), 'or' => __('OR', 'media_center'))));
parent::__construct();
}
示例10: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'stm_widget_top_rated_products';
$this->widget_description = __('Display a list of your top rated products on your site with course expert.', STM_DOMAIN);
$this->widget_id = 'stm_widget_top_rated_products';
$this->widget_name = __('STM WooCommerce Top Rated Products', STM_DOMAIN);
$this->settings = array('title' => array('type' => 'text', 'std' => __('Popular courses', STM_DOMAIN), 'label' => __('Title', STM_DOMAIN)), 'style' => array('type' => 'select', 'std' => __('style_1', STM_DOMAIN), 'options' => array('style_1' => 'Style 1', 'style_2' => 'Style 2'), 'label' => __('Style', STM_DOMAIN)), 'number' => array('type' => 'number', 'step' => 1, 'min' => 1, 'max' => '', 'std' => 5, 'label' => __('Number of products to show', STM_DOMAIN)));
parent::__construct();
}
示例11: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'woocommerce widget_products';
$this->widget_description = __('Display a list of recommended products for the current user on your site.', 'wc-graphflow');
$this->widget_id = 'graphflow_recommendations_widget';
$this->widget_name = __('WooCommerce Graphflow Recommended Products', 'wc-graphflow');
$this->settings = array('title' => array('type' => 'text', 'std' => __('Recommended For You', 'wc-graphflow'), 'label' => __('Title', 'wc-graphflow')), 'number' => array('type' => 'number', 'step' => 1, 'min' => 1, 'max' => 10, 'std' => 5, 'label' => __('Number of products to show', 'wc-graphflow')));
parent::__construct();
}
开发者ID:asafmaoz1234,项目名称:woocommerce-recommendations-by-graphflow,代码行数:12,代码来源:class-wc-widget-graphflow-recommended-products.php
示例12: __construct
/**
* Constructor.
*/
public function __construct()
{
$this->widget_cssclass = 'woocommerce widget_cruxstore_price_filter';
$this->widget_description = esc_html__('Shows a price filter slider in a widget which lets you narrow down the list of shown products when viewing product categories.', 'woocommerce');
$this->widget_id = 'wc_cruxstore_price_filter';
$this->widget_name = esc_html__('KT: WooCommerce Price Filter', 'woocommerce');
$this->settings = array('title' => array('type' => 'text', 'std' => esc_html__('Filter by price', 'woocommerce'), 'label' => esc_html__('Title', 'woocommerce')), 'range_size' => array('type' => 'number', 'min' => 1, 'max' => '', 'step' => 1, 'std' => 50, 'label' => esc_html__('Price range size', 'cruxstore')), 'max_ranges' => array('type' => 'number', 'min' => 1, 'max' => '', 'step' => 1, 'std' => 5, 'label' => esc_html__('Max price ranges', 'cruxstore')));
parent::__construct();
}
示例13: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'vertical-menu';
$this->widget_description = __('Home Page like vertical menu.', 'media_center');
$this->widget_id = 'media_center_vertical_menu';
$this->widget_name = __('Media Center Vertical Menu', 'media_center');
$this->settings = array('title' => array('type' => 'text', 'std' => __('Shop By Departments', 'media_center'), 'label' => __('Title for vertical menu', 'media_center')), 'icon_class' => array('type' => 'text', 'std' => 'fa-list', 'label' => sprintf(__('Fontawesome Icon Class. Default icon is <em>fa-list</em>. For complete list of icon classes %s', 'media_center'), '<a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank">' . __('Click here', 'media_center') . '</a>')), 'menu' => array('type' => 'text', 'std' => '', 'label' => __('Menu ID, slug, or name. Leave it empty to pull all product categories.', 'media_center')), 'dropdown_trigger' => array('type' => 'select', 'std' => 'click', 'label' => __('Dropdown Trigger', 'media_center'), 'options' => array('click' => __('Click', 'media_center'), 'hover' => __('Hover', 'media_center'))), 'dropdown_animation' => array('type' => 'select', 'std' => 'none', 'label' => __('Dropdown Animation', 'media_center'), 'options' => array('none' => __('No Animation', 'media_center'), 'bounceIn' => __('BounceIn', 'media_center'), 'bounceInDown' => __('BounceInDown', 'media_center'), 'bounceInLeft' => __('BounceInLeft', 'media_center'), 'bounceInRight' => __('BounceInRight', 'media_center'), 'bounceInUp' => __('BounceInUp', 'media_center'), 'fadeIn' => __('FadeIn', 'media_center'), 'fadeInDown' => __('FadeInDown', 'media_center'), 'fadeInDownBig' => __('FadeInDown Big', 'media_center'), 'fadeInLeft' => __('FadeInLeft', 'media_center'), 'fadeInLeftBig' => __('FadeInLeft Big', 'media_center'), 'fadeInRight' => __('FadeInRight', 'media_center'), 'fadeInRightBig' => __('FadeInRight Big', 'media_center'), 'fadeInUp' => __('FadeInUp', 'media_center'), 'fadeInUpBig' => __('FadeInUp Big', 'media_center'), 'flipInX' => __('FlipInX', 'media_center'), 'flipInY' => __('FlipInY', 'media_center'), 'lightSpeedIn' => __('Light SpeedIn', 'media_center'), 'rotateIn' => __('RotateIn', 'media_center'), 'rotateInDownLeft' => __('RotateInDown Left', 'media_center'), 'rotateInDownRight' => __('RotateInDown Right', 'media_center'), 'rotateInUpLeft' => __('RotateInUp Left', 'media_center'), 'rotateInUpRight' => __('RotateInUp Right', 'media_center'), 'roleIn' => __('RoleIn', 'media_center'), 'zoomIn' => __('ZoomIn', 'media_center'), 'zoomInDown' => __('ZoomInDown', 'media_center'), 'zoomInLeft' => __('ZoomInLeft', 'media_center'), 'zoomInRight' => __('ZoomInRight', 'media_center'), 'zoomInUp' => __('ZoomInUp', 'media_center'))), 'el_class' => array('type' => 'text', 'std' => '', 'label' => __('Extra Class', 'media_center')));
parent::__construct();
}
示例14: __construct
/**
* Constructor
*/
public function __construct()
{
$this->widget_cssclass = 'tab-holder';
$this->widget_description = __('A list or dropdown of product categories.', 'media_center');
$this->widget_id = 'media_center_home_tabs';
$this->widget_name = __('Media Center Home Tabs', 'media_center');
$this->settings = array('title_tab_1' => array('type' => 'text', 'std' => __('Featured', 'media_center'), 'label' => __('Tab #1 Title', 'media_center')), 'content_tab_1' => array('type' => 'select', 'std' => 'featured_products', 'label' => __('Show', 'media_center'), 'options' => array('featured_products' => __('Featured Products', 'media_center'), 'sale_products' => __('On Sale Products', 'media_center'), 'top_rated_products' => __('Top Rated Products', 'media_center'), 'recent_products' => __('Recent Products', 'media_center'), 'best_selling_products' => __('Best Selling Products', 'media_center'))), 'title_tab_2' => array('type' => 'text', 'std' => __('New Arrivals', 'media_center'), 'label' => __('Tab #2 Title', 'media_center')), 'content_tab_2' => array('type' => 'select', 'std' => 'recent_products', 'label' => __('Show', 'media_center'), 'options' => array('featured_products' => __('Featured Products', 'media_center'), 'sale_products' => __('On Sale Products', 'media_center'), 'top_rated_products' => __('Top Rated Products', 'media_center'), 'recent_products' => __('Recent Products', 'media_center'), 'best_selling_products' => __('Best Selling Products', 'media_center'))), 'title_tab_3' => array('type' => 'text', 'std' => __('Top Sales', 'media_center'), 'label' => __('Tab #3 Title', 'media_center')), 'content_tab_3' => array('type' => 'select', 'std' => 'best_selling_products', 'label' => __('Show', 'media_center'), 'options' => array('featured_products' => __('Featured Products', 'media_center'), 'sale_products' => __('On Sale Products', 'media_center'), 'top_rated_products' => __('Top Rated Products', 'media_center'), 'recent_products' => __('Recent Products', 'media_center'), 'best_selling_products' => __('Best Selling Products', 'media_center'))), 'product_item_size' => array('type' => 'select', 'std' => 'size-medium', 'label' => __('Product Item Size', 'media_center'), 'options' => array('size-big' => __('Size Big', 'media_center'), 'size-medium' => __('Size Medium', 'media_center'), 'size-small' => __('Size Small', 'media_center'))), 'screen_width' => array('type' => 'select', 'std' => '100', 'label' => __('Layout Type', 'media_center'), 'options' => array('100' => __('Full Width', 'media_center'), '75' => __('Has Sidebar', 'media_center'))));
parent::__construct();
}
示例15: __construct
/**
* Constructor.
*/
public function __construct()
{
$this->widget_cssclass = 'woocommerce widget_product_categories';
$this->widget_description = 'Перечень главных категорий каталога';
$this->widget_id = 'wpm_categs';
$this->widget_name = 'Разделы товаров';
$this->settings = array('title' => array('type' => 'text', 'std' => __('Product Categories', 'woocommerce'), 'label' => __('Title', 'woocommerce')), 'orderby' => array('type' => 'select', 'std' => 'name', 'label' => __('Order by', 'woocommerce'), 'options' => array('order' => __('Category Order', 'woocommerce'), 'name' => __('Name', 'woocommerce'))), 'hide_empty' => array('type' => 'checkbox', 'std' => 0, 'label' => __('Hide empty categories', 'woocommerce')));
parent::__construct();
}