SearchAvailabilityWidget extends BaseWidget
in package

Table of Contents

$adults  : int
$attributes  : array<string|int, mixed>
$checkInDate  : DateTime
$checkOutDate  : DateTime
$children  : int
$uniqid  : string
__construct()  : mixed
Register widget with WordPress.
enqueueStylesScripts()  : mixed
form()  : mixed
Back-end widget form.
init()  : mixed
register()  : mixed
renderDateHiddenInputs()  : mixed
renderHiddenInputs()  : mixed
update()  : array<string|int, mixed>
Sanitize widget form values as they are saved.
widget()  : mixed
Front-end display of widget.
sanitizeDate()  : string
sanitizeInt()  : string
sanitizeText()  : mixed
fillStoredSearchParameters()  : array<string|int, mixed>
fixInstanceDateFormat()  : array<string|int, mixed>
Convert user input date format to date transfer format
parseAttributes()  : mixed
renderMain()  : mixed

Properties

$adults

private int $adults

$checkInDate

private DateTime $checkInDate

$checkOutDate

private DateTime $checkOutDate

$children

private int $children

$uniqid

private string $uniqid

Methods

__construct()

Register widget with WordPress.

public __construct() : mixed
Return values
mixed

enqueueStylesScripts()

public enqueueStylesScripts() : mixed
Return values
mixed

form()

Back-end widget form.

public form(array<string|int, mixed> $instance) : mixed
Parameters
$instance : array<string|int, mixed>

Previously saved values from database.

Tags
see
WP_Widget::form()
since
3.8.1

added new action - "{$widget_id}_after_controls".

Return values
mixed

init()

public static init() : mixed
Return values
mixed

register()

public static register() : mixed
Return values
mixed

renderDateHiddenInputs()

public renderDateHiddenInputs() : mixed
Return values
mixed

renderHiddenInputs()

public static renderHiddenInputs() : mixed
Return values
mixed

update()

Sanitize widget form values as they are saved.

public update(array<string|int, mixed> $new_instance, array<string|int, mixed> $old_instance) : array<string|int, mixed>
Parameters
$new_instance : array<string|int, mixed>

Values just sent to be saved.

$old_instance : array<string|int, mixed>

Previously saved values from database.

Tags
see
WP_Widget::update()
since
3.8.1

added new filter - "{$widget_id}_before_update".

Return values
array<string|int, mixed>

Updated safe values to be saved.

widget()

Front-end display of widget.

public widget(array<string|int, mixed> $args, array<string|int, mixed> $instance) : mixed
Parameters
$args : array<string|int, mixed>

Widget arguments.

$instance : array<string|int, mixed>

Saved values from database.

Tags
see
WP_Widget::widget()
Return values
mixed

sanitizeDate()

protected sanitizeDate(string $date[, mixed $inFormat = false ][, mixed $outFormat = false ]) : string
Parameters
$date : string
$inFormat : mixed = false
$outFormat : mixed = false
Return values
string

sanitizeInt()

protected sanitizeInt(string|int $value[, int|false $min = false ][, int|false $max = false ]) : string
Parameters
$value : string|int
$min : int|false = false
$max : int|false = false
Return values
string

Empty string for uncorrect value

sanitizeText()

protected sanitizeText(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

fillStoredSearchParameters()

private fillStoredSearchParameters(array<string|int, mixed> $atts) : array<string|int, mixed>
Parameters
$atts : array<string|int, mixed>
Return values
array<string|int, mixed>

fixInstanceDateFormat()

Convert user input date format to date transfer format

private fixInstanceDateFormat(array<string|int, mixed> $instance) : array<string|int, mixed>
Parameters
$instance : array<string|int, mixed>
Return values
array<string|int, mixed>

parseAttributes()

private parseAttributes(mixed $attributes) : mixed
Parameters
$attributes : mixed
Return values
mixed

renderMain()

private renderMain(array<string|int, mixed> $instance) : mixed
Parameters
$instance : array<string|int, mixed>
Tags
since
3.8.1

added new filter - "{$widget_id}_template_args".

Return values
mixed

Search results