SearchShortcode extends AbstractShortcode
in package

Table of Contents

$name  : mixed
$adults  : mixed
$attributes  : mixed
$checkInDate  : mixed
$checkOutDate  : mixed
$children  : mixed
$uniqid  : mixed
__construct()  : mixed
addActions()  : mixed
fillStoredSearchParameters()  : array<string|int, mixed>
generateShortcode()  : string
getName()  : mixed
register()  : mixed
render()  : string
renderDateHiddenInputs()  : mixed
renderHiddenInputs()  : mixed
buildOrderQuery()  : array<string|int, mixed>
fixAttsDateFormat()  : array<string|int, mixed>
Convert user input date format to date transfer format
renderMain()  : mixed
sanitizeAdults()  : mixed
sanitizeAttributes()  : mixed
sanitizeCheckInDate()  : DateTime|null
sanitizeCheckOutDate()  : DateTime|null
sanitizeChildren()  : mixed
setup()  : mixed

Properties

$name

protected mixed $name = 'mphb_availability_search'

$adults

private mixed $adults

$attributes

private mixed $attributes

$checkInDate

private mixed $checkInDate

$checkOutDate

private mixed $checkOutDate

$children

private mixed $children

$uniqid

private mixed $uniqid = ''

Methods

__construct()

public __construct() : mixed
Return values
mixed

addActions()

public addActions() : mixed
Return values
mixed

fillStoredSearchParameters()

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

generateShortcode()

public generateShortcode([array<string|int, mixed> $attrs = array() ]) : string
Parameters
$attrs : array<string|int, mixed> = array()

Attributes of shortcode

Return values
string

getName()

public getName() : mixed
Return values
mixed

register()

public register() : mixed
Return values
mixed

render()

public render(array<string|int, mixed> $atts, string $content, string $shortcodeName) : string
Parameters
$atts : array<string|int, mixed>
$content : string
$shortcodeName : string
Return values
string

renderDateHiddenInputs()

public renderDateHiddenInputs() : mixed
Return values
mixed

renderHiddenInputs()

public static renderHiddenInputs() : mixed
Return values
mixed

buildOrderQuery()

protected buildOrderQuery(array<string|int, mixed> $atts, array<string|int, mixed> $defaults) : array<string|int, mixed>
Parameters
$atts : array<string|int, mixed>

Shortcode attributes.

$defaults : array<string|int, mixed>

Default values of "orderby" and "order" attributes.

Tags
see
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
Return values
array<string|int, mixed>

fixAttsDateFormat()

Convert user input date format to date transfer format

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

renderMain()

private renderMain() : mixed
Return values
mixed

sanitizeAdults()

private sanitizeAdults(mixed $adults) : mixed
Parameters
$adults : mixed
Return values
mixed

sanitizeAttributes()

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

sanitizeCheckInDate()

private sanitizeCheckInDate(string $date) : DateTime|null
Parameters
$date : string
Return values
DateTime|null

sanitizeCheckOutDate()

private sanitizeCheckOutDate(string $date) : DateTime|null
Parameters
$date : string
Return values
DateTime|null

sanitizeChildren()

private sanitizeChildren(mixed $children) : mixed
Parameters
$children : mixed
Return values
mixed

setup()

private setup(mixed $atts) : mixed
Parameters
$atts : mixed
Return values
mixed

Search results