2011-08-10 17:11:11 +00:00
|
|
|
<?php
|
2014-11-19 17:12:56 +00:00
|
|
|
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2011-08-10 17:11:11 +00:00
|
|
|
/**
|
2015-11-03 13:31:20 +00:00
|
|
|
* Product Search Widget.
|
2012-08-14 17:37:50 +00:00
|
|
|
*
|
2014-11-15 01:12:59 +00:00
|
|
|
* @author WooThemes
|
|
|
|
* @category Widgets
|
|
|
|
* @package WooCommerce/Widgets
|
|
|
|
* @version 2.3.0
|
|
|
|
* @extends WC_Widget
|
2011-08-10 17:11:11 +00:00
|
|
|
*/
|
2013-05-24 15:51:58 +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
|
|
|
*/
|
2013-05-24 15:51:58 +00:00
|
|
|
public function __construct() {
|
|
|
|
$this->widget_cssclass = 'woocommerce widget_product_search';
|
2017-08-25 11:07:17 +00:00
|
|
|
$this->widget_description = __( 'A search form for your store.', 'woocommerce' );
|
2013-05-24 15:51:58 +00:00
|
|
|
$this->widget_id = 'woocommerce_product_search';
|
2017-08-25 11:07:17 +00:00
|
|
|
$this->widget_name = __( 'Product Search', 'woocommerce' );
|
2013-05-24 15:51:58 +00:00
|
|
|
$this->settings = array(
|
|
|
|
'title' => array(
|
|
|
|
'type' => 'text',
|
2014-11-15 01:12:59 +00:00
|
|
|
'std' => '',
|
2016-08-27 01:46:45 +00:00
|
|
|
'label' => __( 'Title', 'woocommerce' ),
|
|
|
|
),
|
2013-05-24 15:51:58 +00:00
|
|
|
);
|
2014-11-15 01:12:59 +00:00
|
|
|
|
2013-05-24 15:51:58 +00:00
|
|
|
parent::__construct();
|
2011-08-10 17:11:11 +00:00
|
|
|
}
|
|
|
|
|
2012-08-14 17:37:50 +00:00
|
|
|
/**
|
2016-01-06 18:58:38 +00:00
|
|
|
* Output widget.
|
2012-08-14 17:37:50 +00:00
|
|
|
*
|
|
|
|
* @see WP_Widget
|
2014-11-15 01:12:59 +00:00
|
|
|
*
|
2012-08-14 17:37:50 +00:00
|
|
|
* @param array $args
|
|
|
|
* @param array $instance
|
|
|
|
*/
|
2016-04-26 17:26:56 +00:00
|
|
|
public function widget( $args, $instance ) {
|
2014-11-15 01:12:59 +00:00
|
|
|
$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
|
|
|
|
2014-11-15 01:12:59 +00:00
|
|
|
$this->widget_end( $args );
|
2011-08-10 17:11:11 +00:00
|
|
|
}
|
2013-05-24 15:51:58 +00:00
|
|
|
}
|