WP_Widget_Search::__construct() WordPress Method
Search widgets are a great way to help your visitors find the content they're looking for on your website. The WP_Widget_Search::__construct() method allows you to create a search widget for your WordPress site. This method takes two arguments: the id of the widget and the name of the widget.
WP_Widget_Search::__construct() #
Sets up a new Search widget instance.
Source
File: wp-includes/widgets/class-wp-widget-search.php
	public function __construct() {
		$widget_ops = array(
			'classname'                   => 'widget_search',
			'description'                 => __( 'A search form for your site.' ),
			'customize_selective_refresh' => true,
			'show_instance_in_rest'       => true,
		);
		parent::__construct( 'search', _x( 'Search', 'Search widget' ), $widget_ops );
	}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description | 
|---|---|
| 2.8.0 | Introduced. |