Recent

Search_Box class

Create a WordPress Widget with the search box.

Namespace: WebberZone\Better_Search\Frontend\Widgets
Since: 3.3.0
Source: includes/frontend/widgets/class-search-box.php line 23 Extends: WP_Widget

Methods

__construct()

Sets up the widgets name etc

Line: 28

public function __construct(  );

widget()

Outputs the content of the widget

Line: 53

public function widget( $args, $instance );
TypeNameDescription
array$argsDisplay arguments including ‘before_title’, ‘after_title’,
array$instanceThe settings for the particular instance of the widget.

form()

Outputs the options form on admin

Line: 99

public function form( $instance );
TypeNameDescription
array$instanceThe settings for the particular instance of the widget.

update()

Processing widget options on save

Line: 125

public function update( $new_instance, $old_instance ): array;
TypeNameDescription
array$new_instanceNew settings for this instance as input by the user via
array$old_instanceOld settings for this instance.

Returns: array — Settings to save.

front_end_styles()

Add styles to the front end if the widget is active.

Since: 3.0.0
Line: 146

public function front_end_styles(  );