template-functions.php

Table of Contents

mphb_tmpl_the_room_type_default_price()  : mixed
Display the room type default (average minimal) price for min days stay
mphb_tmpl_has_room_type_default_price()  : bool
mphb_tmpl_the_room_type_price_for_dates()  : string
Display the room type minimal price for dates
mphb_tmpl_get_day_by_key()  : string
Retrieve dayname for key
mphb_tmpl_get_room_type_total_capacity()  : int
mphb_tmpl_get_room_type_adults_capacity()  : int
Retrieve the room type adults capacity
mphb_tmpl_get_room_type_children_capacity()  : int
Retrieve the room type children capacity
mphb_tmpl_get_room_type_bed_type()  : string
Retrieve the room type bed type
mphb_tmpl_get_room_type_facilities()  : array<string|int, mixed>
Retrieve the room type facilities
mphb_tmpl_get_room_type_attributes()  : array<string|int, mixed>
Retrieve the room type attributes
mphb_tmpl_get_room_type_size()  : string
Retrieve the room type size
mphb_tmpl_get_room_type_categories()  : array<string|int, mixed>
Retrieve the room type categories
mphb_tmpl_get_room_type_view()  : string
Retrieve the room type view
mphb_tmpl_has_room_type_gallery()  : bool
Check is current room type has gallery.
mphb_tmpl_get_room_type_gallery_ids()  : array<string|int, mixed>
mphb_tmpl_the_room_type_galery()  : mixed
mphb_tmpl_the_single_room_type_gallery()  : mixed
mphb_tmpl_the_room_type_flexslider_gallery()  : mixed
mphb_the_flexslider_gallery()  : mixed
mphb_tmpl_the_room_type_featured_image()  : mixed
mphb_tmpl_get_room_type_image()  : string
Retrieve single room type featured image
mphb_tmpl_the_loop_room_type_thumbnail()  : mixed
Retrieve in-loop room type thumbnail
mphb_tmpl_the_loop_room_type_book_button()  : mixed
mphb_tmpl_the_loop_room_type_book_button_form()  : mixed
mphb_tmpl_the_loop_room_type_view_details_button()  : mixed
mphb_tmpl_the_room_type_calendar()  : mixed
Display room type calendar
mphb_tmpl_the_room_reservation_form()  : mixed
Display room type reservation form
mphb_tmpl_the_loop_service_thumbnail()  : mixed
Retrieve in-loop service thumbnail
mphb_tmpl_the_service_price()  : mixed
mphb_tmpl_get_filtered_post_class()  : array<string|int, mixed>
Retrieve the classes for the post div as an array.
mphb_tmpl_the_reserved_rooms_details()  : mixed
mphb_tmpl_the_payments_table()  : mixed
mphb_tmpl_select_html()  : mixed
mphb_tmpl_multicheck_html()  : mixed
mphb_tmpl_render_select()  : string
mphb_tmpl_render_select_options()  : string
mphb_tmpl_render_atts()  : string
mphb_tmpl_the_room_type_price_for_dates_output()  : mixed
mphb_tmpl_the_total_recommended_price_for_dates_output()  : mixed
mphb_recommended_room_types_items_for_dates_output()  : mixed
renderTaxesAndFeesOutput()  : mixed
mphb_tax_price_classes()  : mixed

Functions

mphb_tmpl_the_room_type_default_price()

Display the room type default (average minimal) price for min days stay

mphb_tmpl_the_room_type_default_price([int $id = null ]) : mixed
Parameters
$id : int = null

Optional. Current room type by default.

mphb_tmpl_has_room_type_default_price()

mphb_tmpl_has_room_type_default_price([int $id = null ]) : bool
Parameters
$id : int = null

Optional. Current room type by default.

mphb_tmpl_the_room_type_price_for_dates()

Display the room type minimal price for dates

mphb_tmpl_the_room_type_price_for_dates(DateTime $checkInDate, DateTime $checkOutDate) : string
Parameters
$checkInDate : DateTime
$checkOutDate : DateTime

mphb_tmpl_get_day_by_key()

Retrieve dayname for key

mphb_tmpl_get_day_by_key(string|int $key) : string
Parameters
$key : string|int

number from 0 to 6

mphb_tmpl_get_room_type_total_capacity()

mphb_tmpl_get_room_type_total_capacity() : int
Tags
since
3.7.2

mphb_tmpl_get_room_type_adults_capacity()

Retrieve the room type adults capacity

mphb_tmpl_get_room_type_adults_capacity() : int

mphb_tmpl_get_room_type_children_capacity()

Retrieve the room type children capacity

mphb_tmpl_get_room_type_children_capacity() : int

mphb_tmpl_get_room_type_bed_type()

Retrieve the room type bed type

mphb_tmpl_get_room_type_bed_type() : string

mphb_tmpl_get_room_type_facilities()

Retrieve the room type facilities

mphb_tmpl_get_room_type_facilities() : array<string|int, mixed>

mphb_tmpl_get_room_type_attributes()

Retrieve the room type attributes

mphb_tmpl_get_room_type_attributes() : array<string|int, mixed>

mphb_tmpl_get_room_type_size()

Retrieve the room type size

mphb_tmpl_get_room_type_size([ $withUnits = true ]) : string
Parameters
$withUnits : = true

Optional. Add units to size. TRUE by default.

Tags
since
3.6.1

added optional parameter $withUnits.

mphb_tmpl_get_room_type_categories()

Retrieve the room type categories

mphb_tmpl_get_room_type_categories() : array<string|int, mixed>

mphb_tmpl_get_room_type_view()

Retrieve the room type view

mphb_tmpl_get_room_type_view() : string

Check is current room type has gallery.

mphb_tmpl_has_room_type_gallery() : bool
mphb_tmpl_get_room_type_gallery_ids([bool $withFeaturedImage = false ]) : array<string|int, mixed>
Parameters
$withFeaturedImage : bool = false

mphb_tmpl_the_room_type_galery()

mphb_tmpl_the_room_type_galery([array<string|int, mixed> $atts = array() ]) : mixed
Parameters
$atts : array<string|int, mixed> = array()

@see gallery_shortcode

mphb_tmpl_the_single_room_type_gallery() : mixed
mphb_tmpl_the_room_type_flexslider_gallery() : mixed
mphb_the_flexslider_gallery(array<string|int, int> $ids, array<string|int, mixed> $atts[, array<string|int, mixed> $flexsliderAtts = array() ]) : mixed
Parameters
$ids : array<string|int, int>

Id of attachments

$atts : array<string|int, mixed>
$flexsliderAtts : array<string|int, mixed> = array()
mphb_tmpl_the_room_type_featured_image() : mixed

mphb_tmpl_get_room_type_image()

Retrieve single room type featured image

mphb_tmpl_get_room_type_image([mixed $postID = null ][, string $size = null ]) : string
Parameters
$postID : mixed = null
$size : string = null

Optional. Size of image.

mphb_tmpl_the_loop_room_type_thumbnail()

Retrieve in-loop room type thumbnail

mphb_tmpl_the_loop_room_type_thumbnail([string $size = null ]) : mixed
Parameters
$size : string = null

mphb_tmpl_the_loop_room_type_book_button()

mphb_tmpl_the_loop_room_type_book_button([string $buttonText = null ]) : mixed
Parameters
$buttonText : string = null

mphb_tmpl_the_loop_room_type_book_button_form()

mphb_tmpl_the_loop_room_type_book_button_form([string $buttonText = null ]) : mixed
Parameters
$buttonText : string = null

mphb_tmpl_the_loop_room_type_view_details_button()

mphb_tmpl_the_loop_room_type_view_details_button([string $buttonText = null ]) : mixed
Parameters
$buttonText : string = null

mphb_tmpl_the_room_type_calendar()

Display room type calendar

mphb_tmpl_the_room_type_calendar(mixed $roomTypeId[, mixed $monthsToShow = '' ][, mixed $isShowPrices = false ][, mixed $isTruncatePrices = true ][, mixed $isShowPricesCurrency = false ]) : mixed
Parameters
$roomTypeId : mixed
$monthsToShow : mixed = ''
$isShowPrices : mixed = false
$isTruncatePrices : mixed = true
$isShowPricesCurrency : mixed = false

mphb_tmpl_the_room_reservation_form()

Display room type reservation form

mphb_tmpl_the_room_reservation_form(mixed $roomTypeId) : mixed
Parameters
$roomTypeId : mixed

mphb_tmpl_the_loop_service_thumbnail()

Retrieve in-loop service thumbnail

mphb_tmpl_the_loop_service_thumbnail([string $size = null ]) : mixed
Parameters
$size : string = null

mphb_tmpl_the_service_price()

mphb_tmpl_the_service_price() : mixed

mphb_tmpl_get_filtered_post_class()

Retrieve the classes for the post div as an array.

mphb_tmpl_get_filtered_post_class([string|array<string|int, mixed> $class = '' ][, mixed $postId = null ]) : array<string|int, mixed>
Parameters
$class : string|array<string|int, mixed> = ''

One or more classes to add to the class list.

$postId : mixed = null

mphb_tmpl_the_reserved_rooms_details()

mphb_tmpl_the_reserved_rooms_details(array<string|int, ReservedRoom$reservedRooms) : mixed
Parameters
$reservedRooms : array<string|int, ReservedRoom>

mphb_tmpl_the_payments_table()

mphb_tmpl_the_payments_table(Booking $booking) : mixed
Parameters
$booking : Booking

mphb_tmpl_select_html()

mphb_tmpl_select_html(mixed $args, mixed $options, mixed $selected) : mixed
Parameters
$args : mixed
$options : mixed
$selected : mixed
Tags
since
3.5.0

mphb_tmpl_multicheck_html()

mphb_tmpl_multicheck_html(mixed $name, mixed $options, mixed $selected) : mixed
Parameters
$name : mixed
$options : mixed
$selected : mixed
Tags
since
3.5.0

mphb_tmpl_render_select()

mphb_tmpl_render_select(array<string|int, mixed> $options, mixed $selected[, array<string|int, mixed> $atts = array() ]) : string
Parameters
$options : array<string|int, mixed>
$selected : mixed
$atts : array<string|int, mixed> = array()

Optional.

Tags
since
3.7.2

mphb_tmpl_render_select_options()

mphb_tmpl_render_select_options(array<string|int, mixed> $options, mixed $selected) : string
Parameters
$options : array<string|int, mixed>
$selected : mixed
Tags
since
3.7.2

mphb_tmpl_render_atts()

mphb_tmpl_render_atts(array<string|int, mixed> $atts) : string
Parameters
$atts : array<string|int, mixed>
Tags
since
3.7.2

mphb_tmpl_the_room_type_price_for_dates_output()

mphb_tmpl_the_room_type_price_for_dates_output(mixed $price, mixed $taxesAndFees, mixed $atts) : mixed
Parameters
$price : mixed
$taxesAndFees : mixed
$atts : mixed
Tags
since
3.9.8
mphb_tmpl_the_total_recommended_price_for_dates_output(mixed $totalHtml, mixed $taxesAndFees, mixed $atts) : mixed
Parameters
$totalHtml : mixed
$taxesAndFees : mixed
$atts : mixed
Tags
since
3.9.8
mphb_recommended_room_types_items_for_dates_output(mixed $price, mixed $taxesAndFees) : mixed
Parameters
$price : mixed
$taxesAndFees : mixed
Tags
since
3.9.8

renderTaxesAndFeesOutput()

renderTaxesAndFeesOutput(mixed $taxesAndFees[, mixed $paragraph = true ]) : mixed
Parameters
$taxesAndFees : mixed
$paragraph : mixed = true
Tags
since
3.9.8

mphb_tax_price_classes()

mphb_tax_price_classes(mixed $classes) : mixed
Parameters
$classes : mixed
Tags
since
3.9.8

Search results