Documentation

Namespaces

MPHB

Interfaces, Classes and Traits

HotelBookingPlugin

Table of Contents

MPHB_PLUGIN_FILE  = __FILE__
mphb_get_template_part()  : mixed
Get template part.
mphb_load_template()  : mixed
mphb_current_time()  : string
mphb_get_status_label()  : string
Retrieve a post status label by name
mphb_set_cookie()  : mixed
mphb_get_cookie()  : mixed|null
mphb_has_cookie()  : bool
mphb_unset_cookie()  : mixed
mphb_is_checkout_page()  : mixed
mphb_is_search_results_page()  : mixed
mphb_is_single_room_type_page()  : mixed
mphb_is_create_booking_page()  : mixed
mphb_get_thumbnail_width()  : mixed
mphb_format_price()  : string
mphb_format_percentage()  : string
mphb_trim_zeros()  : string
Trim trailing zeros off prices.
mphb_trim_decimal_zeros()  : mixed
mphb_get_paged_query_var()  : int
Get WP Query paged var
mphb_add_to_meta_query()  : array<string|int, mixed>
mphb_meta_query_is_first_order_clause()  : bool
mphb_clean()  : string|array<string|int, mixed>
Clean variables using sanitize_text_field. Arrays are cleaned recursively.
mphb_hash_equals()  : bool
mphb_strlen()  : string
mphb_get_query_args()  : array<string|int, mixed>
TODO add support for arrays
mphb_wp_dropdown_pages()  : string
Wrapper function for wp_dropdown_pages
mphb_set_time_limit()  : mixed
Wrapper for set_time_limit to see if it is enabled.
mphb_error_log()  : mixed
mphb_current_domain()  : string
mphb_generate_uuid4()  : string
For local usage only. For global IDs it's better to use function mphb_generate_uid().
mphb_generate_uid()  : mixed
mphb_get_edit_post_link_for_everyone()  : string
Retrieves the edit post link for post regardless current user capabilities
mphb_get_rooms_select_list()  : array<string|int, mixed>
mphb_show_multiple_instances_notice()  : mixed
mphb_upgrade_to_premium_message()  : string
mphb_normilize_season_price()  : array<string|int, mixed>
Season price format history: v2.6.0- - single number.
mphb_is_reserved_term()  : bool
Check if term name is reserved.
mphb_string_starts_with()  : bool
mphb_string_ends_with()  : bool
mphb_array_disjunction()  : mixed
mphb_readable_post_statuses()  : array<string|int, mixed>
mphb_db_version()  : mixed
mphb_db_version_at_least()  : mixed
mphb_version_at_least()  : mixed
mphb_wordpress_at_least()  : bool
mphb_fix_blocks_autop()  : mixed
mphb_escape_json_unicodes()  : string
mphb_strip_price_breakdown_json()  : string
mphb_uploads_dir()  : string
mphb_create_uploads_dir()  : mixed
mphb_verify_nonce()  : mixed
mphb_get_polyfill_for()  : mixed
mphb_current_year()  : int
mphb_days_in_month()  : int
mphb_get_customer_fields()  : array<string|int, mixed>
mphb_get_default_customer_fields()  : array<string|int, mixed>
mphb_is_default_customer_field()  : bool
mphb_get_custom_customer_fields()  : array<string|int, mixed>
mphb_get_admin_checkout_customer_fields()  : array<string|int, mixed>
mphb_get_editing_post_id()  : int
mphb_limit()  : int|float
mphb_array_insert_after()  : array<string|int, mixed>
Add an array after the specified position.
mphb_array_insert_after_key()  : array<string|int, mixed>
Add an array after the specified key in the associative array.
mphb_array_usearch()  : mixed
mphb_prefix()  : string
mphb_unprefix()  : string
mphb_get_booking()  : Booking|null
mphb_get_customer()  : Customer|null
mphb_get_room_type()  : RoomType|null
mphb_get_season()  : Season|null
mphb_is_base_request()  : bool
Determine if the current view is the "All" view.
mphb_is_complete_booking()  : bool
mphb_is_pending_booking()  : bool
mphb_is_locking_booking()  : bool
mphb_is_failed_booking()  : bool
mphb_get_available_rooms()  : array<string|int, mixed>
mphb_posint()  : int
mphb_get_min_adults()  : int
mphb_get_min_children()  : int
mphb_get_max_adults()  : int
mphb_get_max_children()  : int
mphb_array_flip_duplicates()  : array<string|int, mixed>
mphb_get_room_type_base_price()  : float
mphb_get_room_type_period_price()  : float
mphb_get_room_type_ids()  : array<string|int, int>
mphb_today()  : DateTime
mphb_has_buffer_days()  : bool
mphb_get_buffer_days()  : int
mphb_modify_buffer_period()  : array<string|int, DateTime>
mphb_modify_booking_buffer_period()  : array<string|int, DateTime>
mphb_modify_booking_period_with_booking_buffer()  : array<string|int, DateTime>
mphb_is_rooms_free_query_atts_with_buffer()  : array<string|int, mixed>
mphb_filter_checkin_checkout_dates()  : array<string|int, mixed>
mphb_help_tip()  : string
Display a help tip.
mphb_create_url()  : string
mphb_parse_queue_room_id()  : int
mphb_add_attribute()  : mixed
mphb_attribute_exists()  : mixed
mphb_attribute_taxonomy_name()  : string
This function generates taxonomy name or gets the registered one.
mphb_taxonomy_attribute_name()  : mixed
mphb_is_attribute_taxonomy()  : mixed
mphb_is_attribute_taxonomy_edit_page()  : mixed
mphb_is_duplicate_attribute()  : mixed
mphb_has_duplicate_attributes()  : mixed
mphb_attributes_prefix()  : mixed
mphb_get_attribute_names()  : mixed
mphb_sanitize_attribute_name()  : mixed
mphb_clean_attribute_name()  : mixed
mphb_attribute_title()  : mixed
mphb_is_public_attribute()  : mixed
mphb_is_visible_attribute()  : mixed
mphb_attribute_orderby()  : mixed
mphb_attribute_default_text()  : string
mphb_reorder_attributes()  : mixed
Note: this will reset order for all terms in range [1; oo) after first reorder.
mphb_set_attribute_order()  : mixed
mb_convert_encoding()  : mixed
mb_convert_encoding_callback()  : mixed
mb_detect_encoding()  : mixed
mb_validate_encoding()  : mixed
MPHB()  : HotelBookingPlugin
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

Constants

MPHB_PLUGIN_FILE

public mixed MPHB_PLUGIN_FILE = __FILE__

Functions

mphb_get_template_part()

Get template part.

mphb_get_template_part(string $slug[, mixed $atts = array() ]) : mixed
Parameters
$slug : string
$atts : mixed = array()

mphb_load_template()

mphb_load_template(mixed $template[, mixed $templateArgs = array() ]) : mixed
Parameters
$template : mixed
$templateArgs : mixed = array()

mphb_current_time()

mphb_current_time(string $type, bool $gmt) : string
Parameters
$type : string
$gmt : bool
Tags
global

string $wp_version

mphb_get_status_label()

Retrieve a post status label by name

mphb_get_status_label(string $status) : string
Parameters
$status : string
mphb_set_cookie(string $name, string $value, int $expire) : mixed
Parameters
$name : string
$value : string
$expire : int
mphb_get_cookie(string $name) : mixed|null
Parameters
$name : string
mphb_has_cookie(string $name) : bool
Parameters
$name : string
mphb_unset_cookie(string $name) : mixed
Parameters
$name : string
Tags
since
4.2.0

mphb_is_checkout_page()

mphb_is_checkout_page() : mixed

mphb_is_search_results_page()

mphb_is_search_results_page() : mixed

mphb_is_single_room_type_page()

mphb_is_single_room_type_page() : mixed

mphb_is_create_booking_page()

mphb_is_create_booking_page() : mixed

mphb_get_thumbnail_width()

mphb_get_thumbnail_width() : mixed

mphb_format_price()

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

mphb_format_percentage()

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

mphb_trim_zeros()

Trim trailing zeros off prices.

mphb_trim_zeros(mixed $price) : string
Parameters
$price : mixed

mphb_trim_decimal_zeros()

mphb_trim_decimal_zeros(mixed $price) : mixed
Parameters
$price : mixed
Tags
since
3.2.0

mphb_get_paged_query_var()

Get WP Query paged var

mphb_get_paged_query_var() : int

mphb_add_to_meta_query()

mphb_add_to_meta_query(array<string|int, mixed> $queryPart, array<string|int, mixed>|null $metaQuery) : array<string|int, mixed>
Parameters
$queryPart : array<string|int, mixed>
$metaQuery : array<string|int, mixed>|null

mphb_meta_query_is_first_order_clause()

mphb_meta_query_is_first_order_clause(array<string|int, mixed> $query) : bool
Parameters
$query : array<string|int, mixed>

mphb_clean()

Clean variables using sanitize_text_field. Arrays are cleaned recursively.

mphb_clean(string|array<string|int, mixed> $var) : string|array<string|int, mixed>

Non-scalar values are ignored.

Parameters
$var : string|array<string|int, mixed>

mphb_hash_equals()

mphb_hash_equals(string $knownString, string $userInput) : bool
Parameters
$knownString : string
$userInput : string
Tags
see
https://github.com/symfony/polyfill-php56

mphb_strlen()

mphb_strlen(string $s) : string
Parameters
$s : string

mphb_get_query_args()

TODO add support for arrays

mphb_get_query_args(string $url) : array<string|int, mixed>
Parameters
$url : string

mphb_wp_dropdown_pages()

Wrapper function for wp_dropdown_pages

mphb_wp_dropdown_pages([array<string|int, mixed> $atts = array() ]) : string
Parameters
$atts : array<string|int, mixed> = array()
Tags
see
wp_dropdown_pages

mphb_set_time_limit()

Wrapper for set_time_limit to see if it is enabled.

mphb_set_time_limit(int $limit) : mixed
Parameters
$limit : int

The maximum execution time, in seconds. If set to zero, no time limit is imposed.

mphb_error_log()

mphb_error_log(mixed $message) : mixed
Parameters
$message : mixed

mphb_current_domain()

mphb_current_domain() : string

mphb_generate_uuid4()

For local usage only. For global IDs it's better to use function mphb_generate_uid().

mphb_generate_uuid4() : string

mphb_generate_uid()

mphb_generate_uid() : mixed

mphb_get_edit_post_link_for_everyone()

Retrieves the edit post link for post regardless current user capabilities

mphb_get_edit_post_link_for_everyone(int|string $id[, mixed $context = 'display' ]) : string
Parameters
$id : int|string
$context : mixed = 'display'

mphb_get_rooms_select_list()

mphb_get_rooms_select_list(int $typeId) : array<string|int, mixed>
Parameters
$typeId : int

Room type ID.

mphb_show_multiple_instances_notice()

mphb_show_multiple_instances_notice() : mixed

mphb_upgrade_to_premium_message()

mphb_upgrade_to_premium_message([string $wrapper = 'span' ][, string $wrapperClass = 'description' ]) : string
Parameters
$wrapper : string = 'span'

Optional. Wrapper tag - "span" or "div". "span" by default. Pass the empty value to remove the wrapper

$wrapperClass : string = 'description'

Optional. "description" by default.

Tags
since
3.5.1

parameters $before and $after was replaced with $wrapper and $wrapperClass.

mphb_normilize_season_price()

Season price format history: v2.6.0- - single number.

mphb_normilize_season_price(mixed $price) : array<string|int, mixed>

v2.7.1- - ["base", "enable_variations" => "0"|"1", "variations" => ""|[["adults", "children", "price"]]]. v2.7.2+ - ["periods", "prices", "enable_variations" => true/false, "variations" => [["adults", "children", "prices"]]].

Parameters
$price : mixed

Price in any format.

mphb_string_starts_with()

mphb_string_starts_with(string $haystack, string $needle) : bool
Parameters
$haystack : string
$needle : string
Tags
since
3.7.0

mphb_string_ends_with()

mphb_string_ends_with(string $haystack, string $needle) : bool
Parameters
$haystack : string
$needle : string

mphb_array_disjunction()

mphb_array_disjunction(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed
Tags
since
3.0

mphb_readable_post_statuses()

mphb_readable_post_statuses() : array<string|int, mixed>
Tags
since
3.0.1

mphb_db_version()

mphb_db_version() : mixed
Tags
since
3.0.2

mphb_db_version_at_least()

mphb_db_version_at_least(mixed $requiredVersion) : mixed
Parameters
$requiredVersion : mixed
Tags
since
3.0.2

mphb_version_at_least()

mphb_version_at_least(mixed $requiredVersion) : mixed
Parameters
$requiredVersion : mixed
Tags
since
3.0.3

mphb_wordpress_at_least()

mphb_wordpress_at_least(string $requiredVersion) : bool
Parameters
$requiredVersion : string
Tags
global

string $wp_version

since
3.7.4

mphb_fix_blocks_autop()

mphb_fix_blocks_autop() : mixed
Tags
see
Issue

ticket in WordPress Trac: https://core.trac.wordpress.org/ticket/45495

since
3.3.0

mphb_escape_json_unicodes()

mphb_escape_json_unicodes(string $json) : string
Parameters
$json : string

JSON string with possibly escaped Unicode symbols (\uXXXX).

Tags
since
3.5.0

mphb_strip_price_breakdown_json()

mphb_strip_price_breakdown_json(string $json) : string
Parameters
$json : string

JSON string with possibly escaped symbol '.

Tags
since
1.x

mphb_uploads_dir()

mphb_uploads_dir() : string
Tags
since
3.5.0

mphb_create_uploads_dir()

mphb_create_uploads_dir() : mixed
Tags
since
3.5.0

mphb_verify_nonce()

mphb_verify_nonce(mixed $action[, mixed $nonceName = 'mphb_nonce' ]) : mixed
Parameters
$action : mixed
$nonceName : mixed = 'mphb_nonce'
Tags
since
3.6.0

mphb_get_polyfill_for()

mphb_get_polyfill_for(mixed $function) : mixed
Parameters
$function : mixed
Tags
since
3.7.1

mphb_current_year()

mphb_current_year() : int
Tags
since
3.7.2

mphb_days_in_month()

mphb_days_in_month(int $month, int $year) : int
Parameters
$month : int
$year : int
Tags
since
3.7.2

mphb_get_customer_fields()

mphb_get_customer_fields() : array<string|int, mixed>
Tags
since
3.7.2

mphb_get_default_customer_fields()

mphb_get_default_customer_fields() : array<string|int, mixed>
Tags
since
3.7.2

mphb_is_default_customer_field()

mphb_is_default_customer_field(string $fieldName) : bool
Parameters
$fieldName : string
Tags
since
3.7.2

mphb_get_custom_customer_fields()

mphb_get_custom_customer_fields() : array<string|int, mixed>
Tags
since
3.7.2

mphb_get_admin_checkout_customer_fields()

mphb_get_admin_checkout_customer_fields() : array<string|int, mixed>
Tags
since
3.7.2

mphb_get_editing_post_id()

mphb_get_editing_post_id() : int
Tags
since
3.7.2

mphb_limit()

mphb_limit(int|float $value, int|float $min, int|float $max) : int|float
Parameters
$value : int|float
$min : int|float
$max : int|float
Tags
since
3.7.2

mphb_array_insert_after()

Add an array after the specified position.

mphb_array_insert_after(array<string|int, mixed> $array, int $position, array<string|int, mixed> $insert) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>

Subject array.

$position : int
$insert : array<string|int, mixed>

Array to insert.

Tags
since
3.7.2

mphb_array_insert_after_key()

Add an array after the specified key in the associative array.

mphb_array_insert_after_key(array<string|int, mixed> $array, mixed $searchKey, array<string|int, mixed> $insert) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>

Subject array.

$searchKey : mixed
$insert : array<string|int, mixed>

Array to insert.

Tags
since
3.7.2

mphb_array_usearch()

mphb_array_usearch(array<string|int, mixed> $haystack, callable $checkCallback) : mixed
Parameters
$haystack : array<string|int, mixed>
$checkCallback : callable

The callback check function. The function must return TRUE if the proper element was found or FALSE otherwise. Gets the value of the element as the first argument and the key as second.

Tags
since
3.7.2

mphb_prefix()

mphb_prefix(string $str[, string $separator = '_' ]) : string
Parameters
$str : string
$separator : string = '_'

Optional. "_" by default.

Tags
since
3.7.3

mphb_unprefix()

mphb_unprefix(string $str[, string $separator = '_' ]) : string
Parameters
$str : string
$separator : string = '_'

Optional. "_" by default.

Tags
since
3.7.3

mphb_get_booking()

mphb_get_booking(int $bookingId[, bool $force = false ]) : Booking|null
Parameters
$bookingId : int
$force : bool = false

Optional. FALSE by default.

Tags
since
3.7.3

mphb_get_customer()

mphb_get_customer(int $bookingId) : Customer|null
Parameters
$bookingId : int
Tags
since
3.7.3

mphb_get_room_type()

mphb_get_room_type(int $roomTypeId[, bool $force = false ]) : RoomType|null
Parameters
$roomTypeId : int
$force : bool = false

Optional. FALSE by default.

Tags
since
3.8

mphb_get_season()

mphb_get_season(int $seasonId[, bool $force = false ]) : Season|null
Parameters
$seasonId : int
$force : bool = false

Optional. False by default.

Tags
since
3.9

mphb_is_base_request()

Determine if the current view is the "All" view.

mphb_is_base_request([string|null $postType = null ]) : bool
Parameters
$postType : string|null = null

Optional. NULL by default.

Tags
see
WP_Posts_List_Table::is_base_request()
global

string $typenow

since
3.7.3

mphb_is_complete_booking()

mphb_is_complete_booking(Booking $booking) : bool
Parameters
$booking : Booking
Tags
since
3.7.6

mphb_is_pending_booking()

mphb_is_pending_booking(Booking $booking) : bool
Parameters
$booking : Booking
Tags
since
3.7.6

mphb_is_locking_booking()

mphb_is_locking_booking(Booking $booking) : bool
Parameters
$booking : Booking
Tags
since
3.7.6

mphb_is_failed_booking()

mphb_is_failed_booking(Booking $booking) : bool
Parameters
$booking : Booking
Tags
since
3.7.6

mphb_get_available_rooms()

mphb_get_available_rooms(DateTime $from, DateTime $to[, array<string|int, mixed> $atts = array() ]) : array<string|int, mixed>
Parameters
$from : DateTime

Start date, like check-in date.

$to : DateTime

End date, like check-out date.

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

Optional. @param int $atts['room_type_id'] Optional. 0 by default (any room type). @param int|int[] $atts['exclude_bookings'] Optional. One or more booking IDs.

Tags
since
3.8

mphb_posint()

mphb_posint(int|string $value) : int
Parameters
$value : int|string
Tags
since
3.8

mphb_get_min_adults()

mphb_get_min_adults() : int
Tags
since
3.8

mphb_get_min_children()

mphb_get_min_children() : int
Tags
since
3.8

mphb_get_max_adults()

mphb_get_max_adults() : int
Tags
since
3.8

mphb_get_max_children()

mphb_get_max_children() : int
Tags
since
3.8

mphb_array_flip_duplicates()

mphb_array_flip_duplicates(array<string|int, mixed> $array[, bool $arraySingle = false ]) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>

Array to flip.

$arraySingle : bool = false

Optional. Convert single value into array. FALSE by default.

Tags
since
3.8

mphb_get_room_type_base_price()

mphb_get_room_type_base_price([mixed $roomType = null ][, mixed $startDate = null ][, mixed $endDate = null ]) : float
Parameters
$roomType : mixed = null
$startDate : mixed = null
$endDate : mixed = null
Tags
since
3.8.3

mphb_get_room_type_period_price()

mphb_get_room_type_period_price(DateTime $startDate, DateTime $endDate[, mixed $roomType = null ][, array<string|int, mixed> $args = array() ]) : float
Parameters
$startDate : DateTime
$endDate : DateTime
$roomType : mixed = null
$args : array<string|int, mixed> = array()

Optional.

Tags
since
3.8.3

mphb_get_room_type_ids()

mphb_get_room_type_ids([string $language = 'any' ][, array<string|int, mixed> $atts = array() ]) : array<string|int, int>
Parameters
$language : string = 'any'

'any'|'original' Optional. 'any' by default.

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

Additional atts.

Tags
since
3.9

mphb_today()

mphb_today([string $modifier = '' ]) : DateTime
Parameters
$modifier : string = ''

Optional. Modifier like '+1 day'. Empty by default.

Tags
since
3.9

mphb_has_buffer_days()

mphb_has_buffer_days() : bool
Tags
since
3.9

mphb_get_buffer_days()

mphb_get_buffer_days(DateTime $date, int $roomTypeId) : int
Parameters
$date : DateTime
$roomTypeId : int
Tags
since
3.9

mphb_modify_buffer_period()

mphb_modify_buffer_period(DateTime $startDate, DateTime $endDate, int $bufferDays) : array<string|int, DateTime>
Parameters
$startDate : DateTime
$endDate : DateTime
$bufferDays : int
Tags
since
3.9

mphb_modify_booking_buffer_period()

mphb_modify_booking_buffer_period(Booking $booking, int $bufferDays[, bool $extendDates = false ]) : array<string|int, DateTime>
Parameters
$booking : Booking
$bufferDays : int
$extendDates : bool = false

Optional. Extend the final result with check-in and next to the check-out dates. Useful for Booking Calendar, for example. False by default.

Tags
since
3.9

mphb_modify_booking_period_with_booking_buffer()

mphb_modify_booking_period_with_booking_buffer(array<string|int, mixed> $bookingPeriod, int $roomTypeId) : array<string|int, DateTime>
Parameters
$bookingPeriod : array<string|int, mixed>
$roomTypeId : int
Tags
since
3.9

mphb_is_rooms_free_query_atts_with_buffer()

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

mphb_filter_checkin_checkout_dates()

mphb_filter_checkin_checkout_dates(array<string|int, mixed> $datesArray, int $roomsTotal) : array<string|int, mixed>
Parameters
$datesArray : array<string|int, mixed>
$roomsTotal : int
Tags
since
3.9

mphb_help_tip()

Display a help tip.

mphb_help_tip(string $tip[, bool $allow_html = false ]) : string
Parameters
$tip : string

Help tip text.

$allow_html : bool = false

Allow sanitized HTML if true or escape.

Tags
since
3.9.8

mphb_create_url()

mphb_create_url(string $endpoint[, string $value = '' ][, string $permalink = '' ]) : string
Parameters
$endpoint : string

Endpoint slug.

$value : string = ''

Query param value.

$permalink : string = ''

Permalink.

Tags
since
4.2.0

mphb_parse_queue_room_id()

mphb_parse_queue_room_id(string $queueItem) : int
Parameters
$queueItem : string

Sync queue item, like "%Timestamp%_%Room ID%".

Tags
since
4.2.2

mphb_add_attribute()

mphb_add_attribute(mixed $attribute) : mixed
Parameters
$attribute : mixed

mphb_attribute_exists()

mphb_attribute_exists(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_attribute_taxonomy_name()

This function generates taxonomy name or gets the registered one.

mphb_attribute_taxonomy_name(string $attributeName) : string
Parameters
$attributeName : string

mphb_taxonomy_attribute_name()

mphb_taxonomy_attribute_name(mixed $taxonomyName) : mixed
Parameters
$taxonomyName : mixed

mphb_is_attribute_taxonomy()

mphb_is_attribute_taxonomy(mixed $taxonomyName) : mixed
Parameters
$taxonomyName : mixed

mphb_is_attribute_taxonomy_edit_page()

mphb_is_attribute_taxonomy_edit_page() : mixed

mphb_is_duplicate_attribute()

mphb_is_duplicate_attribute(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_has_duplicate_attributes()

mphb_has_duplicate_attributes(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_attributes_prefix()

mphb_attributes_prefix() : mixed

mphb_get_attribute_names()

mphb_get_attribute_names() : mixed

mphb_sanitize_attribute_name()

mphb_sanitize_attribute_name(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_clean_attribute_name()

mphb_clean_attribute_name(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_attribute_title()

mphb_attribute_title(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_is_public_attribute()

mphb_is_public_attribute(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_is_visible_attribute()

mphb_is_visible_attribute(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_attribute_orderby()

mphb_attribute_orderby(mixed $attributeName) : mixed
Parameters
$attributeName : mixed

mphb_attribute_default_text()

mphb_attribute_default_text(string $attributeName) : string
Parameters
$attributeName : string
Tags
global

array $mphbAttributes

since
3.5.0

mphb_reorder_attributes()

Note: this will reset order for all terms in range [1; oo) after first reorder.

mphb_reorder_attributes(int $currentId, int $nextId, string $taxonomyName) : mixed
Parameters
$currentId : int
$nextId : int
$taxonomyName : string

mphb_set_attribute_order()

mphb_set_attribute_order(mixed $termId, mixed $index, mixed $taxonomyName) : mixed
Parameters
$termId : mixed
$index : mixed
$taxonomyName : mixed

mb_convert_encoding()

mb_convert_encoding(mixed $s, mixed $toEncoding[, mixed $fromEncoding = null ]) : mixed
Parameters
$s : mixed
$toEncoding : mixed
$fromEncoding : mixed = null
Tags
link
https://github.com/symfony/polyfill-mbstring
since
3.7.1

mb_detect_encoding()

mb_detect_encoding(mixed $s[, mixed $encodings = null ][, mixed $strict = false ]) : mixed
Parameters
$s : mixed
$encodings : mixed = null
$strict : mixed = false
Tags
link
https://github.com/symfony/polyfill-mbstring
since
3.7.1

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