woocommerce/includes/widgets/class-wc-widget-product-sea...

51 lines
1.0 KiB
PHP
Raw Normal View History

2011-08-10 17:11:11 +00:00
<?php
/**
2015-11-03 13:31:20 +00:00
* Product Search Widget.
2012-08-14 17:37:50 +00:00
*
* @package WooCommerce/Widgets
* @version 2.3.0
*/
defined( 'ABSPATH' ) || exit;
/**
* Widget product search class.
2011-08-10 17:11:11 +00:00
*/
class WC_Widget_Product_Search extends WC_Widget {
2012-08-14 17:37:50 +00:00
/**
2015-11-03 13:31:20 +00:00
* Constructor.
2012-08-14 17:37:50 +00:00
*/
public function __construct() {
$this->widget_cssclass = 'woocommerce widget_product_search';
$this->widget_description = __( 'A search form for your store.', 'woocommerce' );
$this->widget_id = 'woocommerce_product_search';
$this->widget_name = __( 'Product Search', 'woocommerce' );
$this->settings = array(
'title' => array(
'type' => 'text',
'std' => '',
'label' => __( 'Title', 'woocommerce' ),
),
);
parent::__construct();
2011-08-10 17:11:11 +00:00
}
2012-08-14 17:37:50 +00:00
/**
* Output widget.
2012-08-14 17:37:50 +00:00
*
* @see WP_Widget
*
* @param array $args Arguments.
* @param array $instance Widget instance.
2012-08-14 17:37:50 +00:00
*/
public function widget( $args, $instance ) {
$this->widget_start( $args, $instance );
2012-08-14 17:37:50 +00:00
2012-04-16 13:32:58 +00:00
get_product_search_form();
2012-08-14 17:37:50 +00:00
$this->widget_end( $args );
2011-08-10 17:11:11 +00:00
}
}