class-wc-widget-brand-description.php
1 year ago
class-wc-widget-brand-nav.php
7 months ago
class-wc-widget-brand-thumbnails.php
1 year ago
class-wc-widget-cart.php
3 years ago
class-wc-widget-layered-nav-filters.php
2 years ago
class-wc-widget-layered-nav.php
3 months ago
class-wc-widget-price-filter.php
8 months ago
class-wc-widget-product-categories.php
7 months ago
class-wc-widget-product-search.php
5 years ago
class-wc-widget-product-tag-cloud.php
5 years ago
class-wc-widget-products.php
1 year ago
class-wc-widget-rating-filter.php
5 years ago
class-wc-widget-recent-reviews.php
2 months ago
class-wc-widget-recently-viewed.php
1 year ago
class-wc-widget-top-rated-products.php
5 years ago
class-wc-widget-product-search.php
51 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Product Search Widget. |
| 4 | * |
| 5 | * @package WooCommerce\Widgets |
| 6 | * @version 2.3.0 |
| 7 | */ |
| 8 | |
| 9 | defined( 'ABSPATH' ) || exit; |
| 10 | |
| 11 | /** |
| 12 | * Widget product search class. |
| 13 | */ |
| 14 | class WC_Widget_Product_Search extends WC_Widget { |
| 15 | |
| 16 | /** |
| 17 | * Constructor. |
| 18 | */ |
| 19 | public function __construct() { |
| 20 | $this->widget_cssclass = 'woocommerce widget_product_search'; |
| 21 | $this->widget_description = __( 'A search form for your store.', 'woocommerce' ); |
| 22 | $this->widget_id = 'woocommerce_product_search'; |
| 23 | $this->widget_name = __( 'Product Search', 'woocommerce' ); |
| 24 | $this->settings = array( |
| 25 | 'title' => array( |
| 26 | 'type' => 'text', |
| 27 | 'std' => '', |
| 28 | 'label' => __( 'Title', 'woocommerce' ), |
| 29 | ), |
| 30 | ); |
| 31 | |
| 32 | parent::__construct(); |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Output widget. |
| 37 | * |
| 38 | * @see WP_Widget |
| 39 | * |
| 40 | * @param array $args Arguments. |
| 41 | * @param array $instance Widget instance. |
| 42 | */ |
| 43 | public function widget( $args, $instance ) { |
| 44 | $this->widget_start( $args, $instance ); |
| 45 | |
| 46 | get_product_search_form(); |
| 47 | |
| 48 | $this->widget_end( $args ); |
| 49 | } |
| 50 | } |
| 51 |