RoomsWidget
extends BaseWidget
in package
Table of Contents
- $isShowBookButton : mixed
- $isShowDetails : mixed
- $isShowExcerpt : mixed
- $isShowFeaturedImage : mixed
- $isShowPricePerNight : mixed
- $isShowTitle : mixed
- $roomTypeIds : mixed
- __construct() : mixed
- Register widget with WordPress.
- form() : mixed
- Back-end widget form.
- init() : mixed
- register() : mixed
- sanitizeRoomTypeId() : string
- update() : array<string|int, mixed>
- Sanitize widget form values as they are saved.
- widget() : mixed
- Front-end display of widget.
- sanitizeDate() : string
- sanitizeInt() : string
- sanitizeRoomTypeIdsArray() : mixed
- sanitizeText() : mixed
- enqueueScriptStyles() : mixed
- getMainQuery() : mixed
- isValidRoom() : mixed
- renderRoom() : mixed
Properties
$isShowBookButton
private
mixed
$isShowBookButton
$isShowDetails
private
mixed
$isShowDetails
$isShowExcerpt
private
mixed
$isShowExcerpt
$isShowFeaturedImage
private
mixed
$isShowFeaturedImage
$isShowPricePerNight
private
mixed
$isShowPricePerNight
$isShowTitle
private
mixed
$isShowTitle
$roomTypeIds
private
mixed
$roomTypeIds
Methods
__construct()
Register widget with WordPress.
public
__construct() : 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
Return values
mixed —init()
public
static init() : mixed
Return values
mixed —register()
public
static register() : mixed
Return values
mixed —sanitizeRoomTypeId()
public
sanitizeRoomTypeId(string $value) : string
Parameters
- $value : string
Return values
string —Empty string for uncorrect value
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
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
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
sanitizeRoomTypeIdsArray()
protected
sanitizeRoomTypeIdsArray(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —sanitizeText()
protected
sanitizeText(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —enqueueScriptStyles()
private
enqueueScriptStyles() : mixed
Return values
mixed —getMainQuery()
private
getMainQuery() : mixed
Return values
mixed —isValidRoom()
private
isValidRoom(mixed $id) : mixed
Parameters
- $id : mixed
Return values
mixed —renderRoom()
private
renderRoom() : mixed