mpa_array_filter_reset()
includes/functions/array.php
:
14
mpa_array_filter_reset ( array<string|int, mixed> $array [ , callable $callback = null ] ) : array<string|int, mixed>
Parameters
$array
: array<string|int, mixed>
$callback
: callable
= null
Optional. Null by default.
since
1.0
mpa_array_map_reset()
includes/functions/array.php
:
35
Applies the callback to the items and resets the indexes of the result array.
mpa_array_map_reset ( callable $callback , array<string|int, mixed> $items ) : array<string|int, mixed>
Parameters
$callback
: callable
$items
: array<string|int, mixed>
since
1.0
mpa_array_unique_reset()
includes/functions/array.php
:
49
mpa_array_unique_reset ( array<string|int, mixed> $array ) : array<string|int, mixed>
Parameters
$array
: array<string|int, mixed>
since
1.0
mpa_array_group_by()
includes/functions/array.php
:
61
mpa_array_group_by ( array<string|int, mixed> $array , int|string $key ) : array<string|int, mixed>
Parameters
$array
: array<string|int, mixed>
$key
: int|string
since
1.0
mpa_first_key()
includes/functions/array.php
:
80
mpa_first_key ( array<string|int, mixed> $array ) : mixed|false
Parameters
$array
: array<string|int, mixed>
since
1.0
mpa_first_pair()
includes/functions/array.php
:
94
mpa_first_pair ( array<string|int, mixed> $array ) : array<string|int, mixed>
Parameters
$array
: array<string|int, mixed>
since
1.0
mpa_array_diff_all()
includes/functions/array.php
:
109
mpa_array_diff_all ( array<string|int, mixed> & $array1 , array<string|int, mixed> & $array2 ) : array<string|int, mixed>
Parameters
$array1
: array<string|int, mixed>
$array2
: array<string|int, mixed>
since
1.2
mpa_explode()
includes/functions/array.php
:
126
mpa_explode ( string $string [ , string $delimiter = ',' ] ) : array<string|int, mixed>
Parameters
$string
: string
$delimiter
: string
= ','
Optional. ',' by default.
since
1.2
mpa_array_remove()
includes/functions/array.php
:
144
mpa_array_remove ( array<string|int, mixed> & $array , mixed $value ) : mixed
Parameters
$array
: array<string|int, mixed>
$value
: mixed
since
1.2.1
mpa_array_clone()
includes/functions/array.php
:
159
mpa_array_clone ( array<string|int, mixed> $vars ) : array<string|int, mixed>
Parameters
$vars
: array<string|int, mixed>
since
1.2.1
mpa_combine_subarrays()
includes/functions/array.php
:
172
Merges nested arrays into one finel array. Preserves numeric indexes.
mpa_combine_subarrays ( array<string|int, mixed> $array ) : array<string|int, mixed>
Parameters
$array
: array<string|int, mixed>
since
1.2.1
mpa_is_function_disabled()
includes/functions/conditional.php
:
13
mpa_is_function_disabled ( string $functionName ) : bool
Parameters
$functionName
: string
since
1.0
mpa_is_operator()
includes/functions/conditional.php
:
26
mpa_is_operator ( mixed $value ) : bool
Parameters
$value
: mixed
since
1.0
mpa_is_post_autosave()
includes/functions/conditional.php
:
44
mpa_is_post_autosave ( int|WP_Post $post ) : bool
Parameters
$post
: int|WP_Post
since
1.0
mpa_is_post_revision()
includes/functions/conditional.php
:
55
mpa_is_post_revision ( int|WP_Post $post ) : bool
Parameters
$post
: int|WP_Post
since
1.0
mpa_is_flatpickr_l10n()
includes/functions/conditional.php
:
66
mpa_is_flatpickr_l10n ( string $language ) : bool
Parameters
$language
: string
Language like "en", "uk", "ru" etc.
since
1.2.1
mpa_current_year()
includes/functions/date.php
:
12
mpa_current_year ( ) : int
since
1.0
includes/functions/date.php
:
24
Public date format, set in Settings > General.
mpa_date_format ( ) : string
since
1.0
includes/functions/date.php
:
37
mpa_format_date ( DateTime $date [ , string $format = 'public' ] ) : string
Parameters
$date
: DateTime
$format
: string
= 'public'
Optional. 'public', 'internal' ('Y-m-d') or custom date
format. 'public' by default.
since
1.0
mpa_parse_date()
includes/functions/date.php
:
58
mpa_parse_date ( string|DateTime $date [ , mixed $default = false ] ) : DateTime |mixed
Parameters
$date
: string|DateTime
Only the internal format is acceptable as a
string: 'Y-m-d'.
$default
: mixed
= false
Optional. False by default (same return value as in the
DateTime::createFromFormat()).
since
1.0
since
1.2.1
the argument $date
accepts DateTime object.
mpa_validate_date()
includes/functions/date.php
:
83
mpa_validate_date ( string $dateString [ , mixed $default = false ] ) : string|false
Parameters
$dateString
: string
Only the internal format is acceptable - 'Y-m-d'.
$default
: mixed
= false
Optional. False by default.
since
1.0
mpa_validate_date_pattern()
includes/functions/date.php
:
102
mpa_validate_date_pattern ( ) : string
since
1.0
mpa_today()
includes/functions/date.php
:
113
mpa_today ( [ string $modifier = '' ] ) : DateTime
Parameters
$modifier
: string
= ''
Optional. Modifier like '+1 day'. Empty by default.
since
1.0
mpa_date_diff()
includes/functions/date.php
:
133
mpa_date_diff ( DateTime $origin , DateTime $target [ , string $units = 'minutes' ] ) : int|false
Parameters
$origin
: DateTime
$target
: DateTime
$units
: string
= 'minutes'
Optional. Only 'minutes' are available at the moment.
since
1.2
mpa_draft_booking()
includes/functions/entity.php
:
23
mpa_draft_booking ( [ array<string|int, mixed> $args = [] ] ) : array<string|int, mixed>|WP_Error
Parameters
$args
: array<string|int, mixed>
= []
Optional.
@param bool $args['payment'] Whether to create a payment post also.
By default: only if payments are enabled
in the plugin settings.
@param bool $args['wp_error'] Whether to return a WP_Error on failure.
True by default.
@param bool $args['clean'] Whether to delete a booking post if failed
to create a payment post. True by default.
since
1.5.0
mpa_update_status()
includes/functions/entity.php
:
99
mpa_update_status ( Booking |Payment $entity , string $status [ , bool $wpError = false ] ) : bool|WP_Error
Parameters
$entity
: Booking |Payment
$status
: string
$wpError
: bool
= false
Optional. Whether to return a WP_Error on failure. False
by default.
since
1.5.0
mpa_get_booking()
includes/functions/entity.php
:
118
mpa_get_booking ( int $id [ , bool $forceReload = false ] ) : Booking |null
Parameters
$id
: int
Optional. Current post by default.
$forceReload
: bool
= false
Optional. False by default.
since
1.0
since
1.2
mpa_get_bookings()
includes/functions/entity.php
:
131
mpa_get_bookings ( [ array<string|int, mixed> $args = [] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
= []
see
AbstractRepository::findAll()
since
1.0
mpa_get_reservations()
includes/functions/entity.php
:
143
mpa_get_reservations ( int $bookingId [ , bool $forceReload = false ] ) : array<string|int, Reservation >
Parameters
$bookingId
: int
$forceReload
: bool
= false
Optional. False by default.
since
1.0
mpa_get_payment()
includes/functions/entity.php
:
156
mpa_get_payment ( int $id [ , bool $forceReload = false ] ) : Payment |null
Parameters
$id
: int
Optional. Current post by default.
$forceReload
: bool
= false
Optional. False by default.
since
1.5.0
mpa_get_payments()
includes/functions/entity.php
:
168
mpa_get_payments ( [ array<string|int, mixed> $args = ['fields' => ['id' => 'name']] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
= ['fields' => ['id' => 'name']]
since
1.5.0
see
AbstractRepository::findAll()
mpa_get_employee()
includes/functions/entity.php
:
181
mpa_get_employee ( int $id [ , bool $forceReload = false ] ) : Employee |null
Parameters
$id
: int
Optional. Current post by default.
$forceReload
: bool
= false
Optional. False by default.
since
1.0
since
1.2
mpa_get_employees()
includes/functions/entity.php
:
194
mpa_get_employees ( [ array<string|int, mixed> $args = ['fields' => ['id' => 'name']] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
= ['fields' => ['id' => 'name']]
see
AbstractRepository::findAll()
since
1.0
mpa_get_employees_by_location()
includes/functions/entity.php
:
207
mpa_get_employees_by_location ( int|array<string|int, int> $location [ , array<string|int, mixed> $args = ['fields' => ['id' => 'name']] ] ) : array<string|int, mixed>
Parameters
$location
: int|array<string|int, int>
$args
: array<string|int, mixed>
= ['fields' => ['id' => 'name']]
since
1.2
TODO: move this to the \MotoPress\Appointment\Helpers\EmployeeHelper
mpa_get_employee_attributes()
includes/functions/entity.php
:
245
mpa_get_employee_attributes ( int|Employee $employee [ , array<string|int, mixed> $args = [] ] ) : array<string|int, mixed>
Parameters
$employee
: int|Employee
$args
: array<string|int, mixed>
= []
Optional.
@param bool $args['show_contacts'] True by default.
@param bool $args['show_social_networks'] True by default.
@param bool $args['show_additional_info'] True by default.
since
1.2
TODO: move this to the \MotoPress\Appointment\Helpers\EmployeeHelper
mpa_get_location()
includes/functions/entity.php
:
295
mpa_get_location ( int $id [ , bool $forceReload = false ] ) : Location |null
Parameters
$id
: int
Optional. Current post by default.
$forceReload
: bool
= false
Optional. False by default.
since
1.0
since
1.2
mpa_get_locations()
includes/functions/entity.php
:
308
mpa_get_locations ( [ array<string|int, mixed> $args = ['fields' => ['id' => 'name']] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
= ['fields' => ['id' => 'name']]
see
AbstractRepository::findAll()
since
1.0
mpa_get_location_categories()
includes/functions/entity.php
:
322
mpa_get_location_categories ( int $locationId [ , string|array<string|int, mixed> $fields = ['slug' => 'name'] ] [ , array<string|int, mixed> $args = [] ] ) : array<string|int, WP_Term >|array<string|int, mixed>
Parameters
$locationId
: int
$fields
: string|array<string|int, mixed>
= ['slug' => 'name']
Optional. 'all', field name or key-value pair.
['slug' => 'name'] by default.
$args
: array<string|int, mixed>
= []
since
1.1.0
mpa_get_schedule()
includes/functions/entity.php
:
337
mpa_get_schedule ( int $id [ , bool $forceReload = false ] ) : Schedule |null
Parameters
$id
: int
Optional. Current post by default.
$forceReload
: bool
= false
Optional. False by default.
since
1.0
since
1.2
mpa_get_schedules()
includes/functions/entity.php
:
350
mpa_get_schedules ( [ array<string|int, mixed> $args = ['fields' => ['id' => 'title']] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
= ['fields' => ['id' => 'title']]
see
AbstractRepository::findAll()
since
1.0
mpa_get_service()
includes/functions/entity.php
:
363
mpa_get_service ( int $id [ , bool $forceReload = false ] ) : Service |null
Parameters
$id
: int
Optional. Current post by default.
$forceReload
: bool
= false
Optional. False by default.
since
1.0
since
1.2
mpa_get_services()
includes/functions/entity.php
:
376
mpa_get_services ( [ array<string|int, mixed> $args = ['fields' => ['id' => 'title']] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
= ['fields' => ['id' => 'title']]
see
AbstractRepository::findAll()
since
1.0
mpa_get_service_attributes()
includes/functions/entity.php
:
390
mpa_get_service_attributes ( int|Service $service [ , array<string|int, mixed> $args = [] ] ) : array<string|int, mixed>
Parameters
$service
: int|Service
$args
: array<string|int, mixed>
= []
Optional.
@param bool $args['show_price'] True by default.
@param bool $args['show_duration'] True by default.
since
1.2
mpa_get_service_categories()
includes/functions/entity.php
:
449
mpa_get_service_categories ( int $serviceId [ , string|array<string|int, mixed> $fields = ['slug' => 'name'] ] [ , array<string|int, mixed> $args = [] ] ) : array<string|int, WP_Term >|array<string|int, mixed>
Parameters
$serviceId
: int
$fields
: string|array<string|int, mixed>
= ['slug' => 'name']
Optional. 'all', field name or key-value pair.
['slug' => 'name'] by default.
$args
: array<string|int, mixed>
= []
since
1.0
mpa_get_service_category_total_count()
includes/functions/entity.php
:
463
mpa_get_service_category_total_count ( WP_Term |int $term ) : int
Parameters
$term
: WP_Term |int
since
1.2
includes/functions/entity.php
:
535
Extracts the minimum information needed for booking/appointment shortcodes.
mpa_extract_available_services ( ) : array<string|int, mixed>
For example:
$bookableServices = [
134 => [
'name' => "Man's Haircut",
'categories' => [
'barbershop' => 'Barbershop',
'haircuts' => 'Haircuts'
],
'employees' => [
125 => [
'name' => 'John Doe',
'schedule' => 131,
'locations' => [
129 => 'Barbershop'
]
]
]
],
135 => [
'name' => "Woman's Haircut",
'categories' => [
'uncategorized' => 'Uncategorized'
],
'employees' => [
127 => [
'name' => 'Mary Doe',
'schedule' => 133,
'locations' => [
130 => 'Hairdressing Salon'
]
]
]
]
];
since
1.0
mpa_get_current_entity()
includes/functions/entity.php
:
621
mpa_get_current_entity ( ) : AbstractEntity |null
since
1.2
mpa_get_entity()
includes/functions/entity.php
:
632
mpa_get_entity ( int $postId ) : AbstractEntity |null
Parameters
$postId
: int
Optional. Current post by default.
since
1.2
mpa_filter_empty_string()
includes/functions/filter.php
:
13
mpa_filter_empty_string ( string $string ) : bool
Parameters
$string
: string
since
1.2
mpa_filter_post_slugs()
includes/functions/filter.php
:
25
mpa_filter_post_slugs ( array<string|int, mixed> $args [ , array<string|int, mixed> $keys = [] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
$keys
: array<string|int, mixed>
= []
Optional. Keys to filter. All keys by default.
since
1.2
mpa_filter_term_slugs()
includes/functions/filter.php
:
43
mpa_filter_term_slugs ( array<string|int, mixed> $args [ , array<string|int, mixed> $keys = [] ] [ , string|array<string|int, mixed> $taxonomy = 'any' ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
$keys
: array<string|int, mixed>
= []
Optional. Keys to filter. All keys by default.
$taxonomy
: string|array<string|int, mixed>
= 'any'
Optional. Taxonomy name, or array of
taxonomies, to which filter should be limited. 'any' by default.
since
1.2
_mpa_filter_object_slugs()
includes/functions/filter.php
:
65
_mpa_filter_object_slugs ( string $objectType , array<string|int, mixed> $args , array<string|int, mixed> $keys , array<string|int, mixed> $queryArgs ) : array<string|int, mixed>
Parameters
$objectType
: string
$args
: array<string|int, mixed>
$keys
: array<string|int, mixed>
$queryArgs
: array<string|int, mixed>
since
1.2
mpa_filter_asset()
includes/functions/filter.php
:
169
Transforms relative path to the asset file with an URL to it.
mpa_filter_asset ( string $asset [ , string $pluginUrl = MotoPressAppointmentPLUGIN_URL ] ) : string
Parameters
$asset
: string
Asset file (script or stylesheet).
$pluginUrl
: string
= MotoPressAppointmentPLUGIN_URL
Optional. Appointment Booking by default.
since
1.2.1
since
1.5.0
mpa_ceil_to_step()
includes/functions/format.php
:
16
Ceil the value to the nearest full step.
mpa_ceil_to_step ( int $value , int $step ) : int
Parameters
$value
: int
$step
: int
since
1.0
mpa_maybe_intval()
includes/functions/format.php
:
31
mpa_maybe_intval ( string $string ) : string|int
Parameters
$string
: string
since
1.0
mpa_posint()
includes/functions/format.php
:
42
mpa_posint ( int|string $value ) : int
Parameters
$value
: int|string
since
1.0
mpa_prefix()
includes/functions/format.php
:
59
mpa_prefix ( string $string [ , string $prefix = 'public' ] ) : string
Parameters
$string
: string
$prefix
: string
= 'public'
Optional. 'public', 'private', 'metabox', 'widget',
'none' or custom prefix string. 'public' by default.
since
1.0
since
1.3
added the 'metabox'
prefix.
since
1.3
added the 'widget'
prefix.
since
1.3
since
1.3
added the custom prefix support.
mpa_unprefix()
includes/functions/format.php
:
90
mpa_unprefix ( string $string [ , string $prefix = '' ] ) : string
Parameters
$string
: string
$prefix
: string
= ''
Optional. Custom prefix to remove.
since
1.0
since
1.3
added the prefix
argument.
mpa_trim_price()
includes/functions/format.php
:
117
Will trim '5.00' to '5', but leave '5.50' as is.
mpa_trim_price ( string $price [ , string $decimalSeparator = null ] ) : string
Parameters
$price
: string
$decimalSeparator
: string
= null
Optional. Decimal separator from settings by
default.
since
1.0
mpa_evaluate_numbers()
includes/functions/format.php
:
135
mpa_evaluate_numbers ( array<string|int, mixed> $array ) : array<string|int, mixed>
Parameters
$array
: array<string|int, mixed>
since
1.2
mpa_strip_html_whitespaces()
includes/functions/format.php
:
146
mpa_strip_html_whitespaces ( string $html ) : string
Parameters
$html
: string
since
1.2
mpa_str_to_class_name()
includes/functions/format.php
:
168
mpa_str_to_class_name ( string $string ) : string
Parameters
$string
: string
Slug, HTML ID or any other string.
since
1.2.1
mpa_str_to_method_name()
includes/functions/format.php
:
189
mpa_str_to_method_name ( string $string ) : string
Parameters
$string
: string
Slug, HTML ID or any other string.
since
1.2.1
mpa_kses_link()
includes/functions/format.php
:
201
mpa_kses_link ( string $text ) : string
Parameters
$text
: string
since
1.2.1
mpa_limit()
includes/functions/format.php
:
214
mpa_limit ( int|float $number , int|float $min , mixed $max ) : int|float
Parameters
$number
: int|float
$min
: int|float
$max
: mixed
since
1.3.1
includes/functions/format.php
:
219
mpa_format_price ( float $price [ , array<string|int, mixed> $args = [] ] ) : string
Parameters
$price
: float
$args
: array<string|int, mixed>
= []
mpa_is_translation_page()
includes/functions/i18n.php
:
13
mpa_is_translation_page ( [ string $postType = '' ] ) : bool
Parameters
$postType
: string
= ''
since
1.0
mpa_translate_string()
includes/functions/i18n.php
:
40
mpa_translate_string ( string $string , array<string|int, mixed> ... $args ) : string
Parameters
$string
: string
$args
: array<string|int, mixed>
since
1.1.0
mpa_translate_page_id()
includes/functions/i18n.php
:
52
mpa_translate_page_id ( int $pageId ) : int
Parameters
$pageId
: int
since
1.5.0
mpa_switch_language()
includes/functions/i18n.php
:
67
mpa_switch_language ( [ string|null $language = null ] ) : mixed
Parameters
$language
: string|null
= null
Optional. Default language by default.
since
1.0
mpa_weekday()
includes/functions/i18n.php
:
78
mpa_weekday ( int $dayNumber ) : string
Parameters
$dayNumber
: int
since
1.2
mpa_weekday_abbr()
includes/functions/i18n.php
:
91
mpa_weekday_abbr ( int $dayNumber ) : string
Parameters
$dayNumber
: int
since
1.2
mpa_month()
includes/functions/i18n.php
:
106
mpa_month ( int $monthNumber ) : string
Parameters
$monthNumber
: int
since
1.2
mpa_any_value()
includes/functions/misc.php
:
20
mpa_any_value ( [ mixed $value = '' ] [ , string $label = '' ] ) : array<string|int, mixed>
Parameters
$value
: mixed
= ''
$label
: string
= ''
Optional. '— Any —' by default.
since
1.0
mpa_no_value()
includes/functions/misc.php
:
36
mpa_no_value ( [ mixed $value = '' ] [ , string $label = '' ] ) : array<string|int, mixed>
Parameters
$value
: mixed
= ''
$label
: string
= ''
Optional. '— Select —' by default.
since
1.0
mpa_country_code()
includes/functions/misc.php
:
51
mpa_country_code ( string $countryLabel ) : string
Parameters
$countryLabel
: string
Country label like 'Germany' or 'United States (US)'.
since
1.0
mpa_country_label()
includes/functions/misc.php
:
62
mpa_country_label ( string $countryCode ) : string
Parameters
$countryCode
: string
since
1.0
mpa_str_starts_with()
includes/functions/misc.php
:
77
mpa_str_starts_with ( string $haystack , string $needle ) : bool
Parameters
$haystack
: string
$needle
: string
author
link
http://stackoverflow.com/a/834355/3918377
since
1.0
mpa_load_polyfill()
includes/functions/misc.php
:
88
mpa_load_polyfill ( string $polyfill ) : mixed
Parameters
$polyfill
: string
Polyfill name, like 'mbstring'.
since
1.1.0
mpa_mailer()
includes/functions/misc.php
:
98
mpa_mailer ( ) : MailerInterface
since
1.1.0
mpa_create_fields()
includes/functions/misc.php
:
134
Usage:
<ul>
<li>1 argument (only fields, default usage): <code>mpa_create_fields($fields);</code>
(get values from wp_options table)</li>
<li>2 arguments - fields and prefix:
<code>mpa_create_fields($fields, 'metabox'); // $type = 'postmeta', $id = get_the_ID()</code></li>
<li>3 arguments - use default type, but custom ID:
<code>mpa_create_fields($fields, 'metabox', $postId); // $type = 'postmeta', $id = $postId</code></li>
<li>3 arguments:
<code>mpa_create_fields($fields, $prefix, $type); // $id = get_the_ID()</code></li>
<li>4 arguments: <code>mpa_create_fields($fields, $prefix, $type, $id);</code></li>
</ul>
mpa_create_fields ( array<string|int, mixed> $fields [ , string $prefix = 'public' ] [ , string $type = 'option' ] , int $id ) : array<string|int, AbstractField >
Parameters
$fields
: array<string|int, mixed>
$prefix
: string
= 'public'
Optional. See allowed prefixes in mpa_prefix().
'public' by default.
$type
: string
= 'option'
'option'|'postmeta'|'widget' Optional. The type of the source.
'option' by default.
$id
: int
Optional. ID of the post. Only for metaboxes (postmetas).
Current post ID by default.
since
1.1.0
since
1.3
added the prefix
argument.
since
1.3
since
1.3
mpa_group_fields()
includes/functions/misc.php
:
214
mpa_group_fields ( array<string|int, mixed> $fields ) : array<string|int, mixed>
Parameters
$fields
: array<string|int, mixed>
[Field name => args or AbstractField]
since
1.1.0
mpa_shift_days_array()
includes/functions/misc.php
:
263
Works properly only when all values (with indexes 0-6) are present in the
array.
mpa_shift_days_array ( array<string|int, mixed> $daysArray [ , int $firstDay = -1 ] ) : array<string|int, mixed>
Parameters
$daysArray
: array<string|int, mixed>
$firstDay
: int
= -1
Optional. -1 by default (use settings value).
since
1.2
mpa_str_ends_with()
includes/functions/misc.php
:
287
mpa_str_ends_with ( string $haystack , string $needle ) : bool
Parameters
$haystack
: string
$needle
: string
since
1.2
mpa_carry()
includes/functions/misc.php
:
306
mpa_carry ( callable $function , mixed $carry ) : Function
Parameters
$function
: callable
$carry
: mixed
Value of the last argument.
since
1.2.1
mpa_carry_shift()
includes/functions/misc.php
:
321
mpa_carry_shift ( callable $function , mixed $carry ) : Function
Parameters
$function
: callable
$carry
: mixed
Value of the first argument.
since
1.2.1
mpa_set_time_limit()
includes/functions/misc.php
:
334
mpa_set_time_limit ( int $limit ) : mixed
Parameters
$limit
: int
The maximum execution time, in seconds. If set to zero, no
time limit is imposed.
since
1.4.0
mpa_generate_uuid4()
includes/functions/misc.php
:
351
Source: http://php.net/manual/ru/function.uniqid.php#94959
mpa_generate_uuid4 ( ) : string
since
1.5.0
mpa_add_post_uid()
includes/functions/misc.php
:
377
Adds UID meta field only if it does not exist.
mpa_add_post_uid ( int $postId [ , string $uid = '' ] ) : int|false
Parameters
$postId
: int
$uid
: string
= ''
Optional. New UUID v4 by default.
since
1.5.0
mpa_payment_manager()
includes/functions/misc.php
:
391
mpa_payment_manager ( ) : PaymentManager
since
1.5.0
mpa_generate_product_name()
includes/functions/misc.php
:
402
mpa_generate_product_name ( Booking |int $booking ) : string
Parameters
$booking
: Booking |int
since
1.5.0
mpapp()
includes/functions/plugin.php
:
14
mpapp ( ) : Plugin
since
1.0
mpa_assets()
includes/functions/plugin.php
:
24
mpa_assets ( ) : Assets
since
1.0
mpa_path_to()
includes/functions/plugin.php
:
37
mpa_path_to ( string $file [ , string $pluginDir = MotoPressAppointmentPLUGIN_DIR ] ) : string
Parameters
$file
: string
Relative path to the plugin file.
$pluginDir
: string
= MotoPressAppointmentPLUGIN_DIR
Optional. Appointment Booking by default.
since
1.0
since
1.2.1
added the pluginDir
argument.
mpa_url_to()
includes/functions/plugin.php
:
50
mpa_url_to ( string $file [ , string $pluginUrl = MotoPressAppointmentPLUGIN_URL ] ) : string
Parameters
$file
: string
Relative path to the plugin file.
$pluginUrl
: string
= MotoPressAppointmentPLUGIN_URL
Optional. Appointment Booking by default.
since
1.0
since
1.2.1
added the pluginUrl
argument.
mpa_languages_dir()
includes/functions/plugin.php
:
62
mpa_languages_dir ( [ string $path = 'relative' ] ) : string
Parameters
$path
: string
= 'relative'
'relative'|'absolute' Optional. 'relative' by default (that
suits well textdomain functions, like load_plugin_textdomain()).
since
1.2.1
mpa_uploads_dir()
includes/functions/plugin.php
:
79
mpa_uploads_dir ( ) : string
since
1.0
mpa_version()
includes/functions/plugin.php
:
89
mpa_version ( ) : string
since
1.0
mpa_get_plugin_data()
includes/functions/plugin.php
:
99
mpa_get_plugin_data ( ) : string
since
1.0
mpa_name()
includes/functions/plugin.php
:
108
mpa_name ( ) : string
since
1.1.0
mpa_shortcodes()
includes/functions/plugin.php
:
118
mpa_shortcodes ( ) : ShortcodesRegistry
since
1.2
mpa_plugin_uri()
includes/functions/plugin.php
:
128
mpa_plugin_uri ( ) : string
since
1.5.0
mpa_plugin_author()
includes/functions/plugin.php
:
138
mpa_plugin_author ( ) : string
since
1.5.0
mpa_is_hotel_booking_active()
includes/functions/plugin.php
:
146
mpa_is_hotel_booking_active ( ) : bool
since
1.14.0
mpa_booking()
includes/functions/post-type.php
:
12
mpa_booking ( ) : BookingPostType
since
1.2
mpa_employee()
includes/functions/post-type.php
:
22
mpa_employee ( ) : EmployeePostType
since
1.2
mpa_location()
includes/functions/post-type.php
:
32
mpa_location ( ) : LocationPostType
since
1.2
mpa_reservation()
includes/functions/post-type.php
:
42
mpa_reservation ( ) : ReservationPostType
since
1.2
mpa_schedule()
includes/functions/post-type.php
:
52
mpa_schedule ( ) : SchedulePostType
since
1.2
mpa_service()
includes/functions/post-type.php
:
62
mpa_service ( ) : ServicePostType
since
1.2
mpa_shortcode()
includes/functions/post-type.php
:
72
mpa_shortcode ( ) : ShortcodePostType
since
1.2
mpa_parse_html_attr()
includes/functions/regex.php
:
15
mpa_parse_html_attr ( string $attribute , string $html [ , mixed $default = '' ] ) : mixed
Parameters
$attribute
: string
$html
: string
$default
: mixed
= ''
since
1.3
mpa_verify_nonce()
includes/functions/request.php
:
14
mpa_verify_nonce ( string $action [ , string $nonceField = 'mpa_nonce' ] ) : bool
Parameters
$action
: string
Action name. May be unprefixed.
$nonceField
: string
= 'mpa_nonce'
Optional. 'mpa_nonce' by default.
since
1.0
mpa_rest_request_error()
includes/functions/rest.php
:
16
mpa_rest_request_error ( string $message ) : WP_Error
Parameters
$message
: string
since
1.0
mpa_rest_failure_error()
includes/functions/rest.php
:
27
mpa_rest_failure_error ( string $message ) : WP_Error
Parameters
$message
: string
since
1.5.0
mpa_rest_sanitize_id()
includes/functions/rest.php
:
38
mpa_rest_sanitize_id ( string|int $id ) : int
Parameters
$id
: string|int
since
1.0
mpa_rest_sanitize_ids()
includes/functions/rest.php
:
49
mpa_rest_sanitize_ids ( string|array<string|int, mixed> $ids ) : array<string|int, int>
Parameters
$ids
: string|array<string|int, mixed>
since
1.0
mpa_rest_sanitize_date()
includes/functions/rest.php
:
67
mpa_rest_sanitize_date ( string|DateTime $date ) : DateTime |null
Parameters
$date
: string|DateTime
since
1.0
mpa_rest_sanitize_date_string()
includes/functions/rest.php
:
82
mpa_rest_sanitize_date_string ( string $dateString ) : string
Parameters
$dateString
: string
since
1.0
mpa_rest_sanitize_bool()
includes/functions/rest.php
:
93
mpa_rest_sanitize_bool ( mixed $value ) : bool
Parameters
$value
: mixed
since
1.2.1
mpa_rest_sanitize_cart_items()
includes/functions/rest.php
:
104
mpa_rest_sanitize_cart_items ( mixed $input ) : array<string|int, mixed>
Parameters
$input
: mixed
since
1.4.0
mpa_display_template()
includes/functions/template.php
:
14
mpa_display_template ( array<string|int, mixed> ... $args ) : mixed
Parameters
$args
: array<string|int, mixed>
since
1.0
mpa_render_template()
includes/functions/template.php
:
25
mpa_render_template ( array<string|int, mixed> ... $args ) : string
Parameters
$args
: array<string|int, mixed>
since
1.0
mpa_locate_template()
includes/functions/template.php
:
54
mpa_locate_template ( string|array<string|int, mixed> $templates ) : string
Parameters
$templates
: string|array<string|int, mixed>
since
1.0
mpa_load_template()
includes/functions/template.php
:
98
mpa_load_template ( string $template_file [ , array<string|int, mixed> $template_args = [] ] ) : string
Parameters
$template_file
: string
$template_args
: array<string|int, mixed>
= []
since
1.0
mpa_template_dir()
includes/functions/template.php
:
121
mpa_template_dir ( ) : string
since
1.0
mpa_tmpl_atts()
includes/functions/template.php
:
135
mpa_tmpl_atts ( array<string|int, mixed> $atts [ , bool $allowEmpty = true ] ) : string
Parameters
$atts
: array<string|int, mixed>
$allowEmpty
: bool
= true
Optional. True by default.
since
1.0
since
1.2
added optional parameter $allowEmpty.
includes/functions/template.php
:
155
mpa_tmpl_button ( string $label [ , array<string|int, mixed> $atts = [] ] ) : string
Parameters
$label
: string
$atts
: array<string|int, mixed>
= []
Optional.
@param string $atts['class'] 'button' by default.
@param string $atts['type'] 'button' by default.
since
1.0
mpa_tmpl_dashicon()
includes/functions/template.php
:
172
mpa_tmpl_dashicon ( string $name [ , string $class = '' ] ) : string
Parameters
$name
: string
$class
: string
= ''
Optional. Additional class to set. '' by default.
since
1.0
mpa_tmpl_edit_post_link()
includes/functions/template.php
:
186
mpa_tmpl_edit_post_link ( int $postId [ , string $title = '' ] ) : string
Parameters
$postId
: int
$title
: string
= ''
since
1.0
mpa_tmpl_edit_post_link_no_role_checks()
includes/functions/template.php
:
207
mpa_tmpl_edit_post_link_no_role_checks ( int $postId ) : string
Parameters
$postId
: int
since
1.15.0
mpa_tmpl_edit_post_links()
includes/functions/template.php
:
237
mpa_tmpl_edit_post_links ( array<string|int, mixed> $postsList ) : array<string|int, mixed>
Parameters
$postsList
: array<string|int, mixed>
since
1.0
includes/functions/template.php
:
255
mpa_tmpl_form_table ( array<string|int, mixed> $fields [ , array<string|int, mixed> $args = [] ] ) : string
Parameters
$fields
: array<string|int, mixed>
$args
: array<string|int, mixed>
= []
Not to be confused with 'atts'. Optional.
since
1.0
mpa_tmpl_hidden()
includes/functions/template.php
:
291
mpa_tmpl_hidden ( string $name , mixed $value [ , array<string|int, mixed> $atts = [] ] ) : string
Parameters
$name
: string
$value
: mixed
$atts
: array<string|int, mixed>
= []
since
1.0
mpa_tmpl_link()
includes/functions/template.php
:
310
mpa_tmpl_link ( string $href [ , string $title = '' ] [ , array<string|int, mixed> $atts = [] ] ) : string
Parameters
$href
: string
$title
: string
= ''
$atts
: array<string|int, mixed>
= []
since
1.0
mpa_tmpl_notice()
includes/functions/template.php
:
333
mpa_tmpl_notice ( string $type , string $messageHtml [ , bool $isDismissible = true ] ) : string
Parameters
$type
: string
success|info|warning|error|none
$messageHtml
: string
$isDismissible
: bool
= true
Optional. True by default.
since
1.0
mpa_tmpl_select()
includes/functions/template.php
:
369
mpa_tmpl_select ( array<string|int, mixed> $options , mixed|array<string|int, mixed> $selected [ , array<string|int, mixed> $atts = [] ] ) : string
Parameters
$options
: array<string|int, mixed>
$selected
: mixed|array<string|int, mixed>
$atts
: array<string|int, mixed>
= []
since
1.0
mpa_tmpl_select_options()
includes/functions/template.php
:
385
mpa_tmpl_select_options ( array<string|int, mixed> $options , mixed|array<string|int, mixed> $selected ) : string
Parameters
$options
: array<string|int, mixed>
$selected
: mixed|array<string|int, mixed>
since
1.0
mpa_tmpl_page_select()
includes/functions/template.php
:
410
mpa_tmpl_page_select ( [ array<string|int, mixed> $args = [] ] ) : string
Parameters
$args
: array<string|int, mixed>
= []
since
1.5.0
see
wp_dropdown_pages()
see
PageSelectField::renderInput()
mpa_tmpl_placeholder()
includes/functions/template.php
:
449
mpa_tmpl_placeholder ( ) : string
since
1.0
mpa_tmpl_aria_placeholder()
includes/functions/template.php
:
459
mpa_tmpl_aria_placeholder ( ) : string
since
1.1.0
mpa_tmpl_required()
includes/functions/template.php
:
469
mpa_tmpl_required ( ) : string
since
1.0
mpa_tmpl_required_tip()
includes/functions/template.php
:
479
mpa_tmpl_required_tip ( ) : string
since
1.0
mpa_tmpl_price()
includes/functions/template.php
:
496
mpa_tmpl_price ( float $price [ , array<string|int, mixed> $args = [] ] ) : string
Parameters
$price
: float
$args
: array<string|int, mixed>
= []
since
1.0
mpa_tmpl_price_number()
includes/functions/template.php
:
571
mpa_tmpl_price_number ( float $price [ , array<string|int, mixed> $args = [] ] ) : string
Parameters
$price
: float
$args
: array<string|int, mixed>
= []
Optional. See mpa_tmpl_price() for details.
since
1.4.0
mpa_tmpl_attr()
includes/functions/template.php
:
587
mpa_tmpl_attr ( string $name , mixed $value [ , bool $allowEmpty = false ] ) : string
Parameters
$name
: string
$value
: mixed
$allowEmpty
: bool
= false
Optional. False by default.
since
1.2
mpa_tmpl_dropdown()
includes/functions/template.php
:
611
Based on Bootstrap 4.
mpa_tmpl_dropdown ( string $label , array<string|int, mixed> $actions [ , array<string|int, mixed> $args = [] ] ) : string
Parameters
$label
: string
$actions
: array<string|int, mixed>
$args
: array<string|int, mixed>
= []
Optional.
@param bool $args['inline'] False by default.
@param string $args['class'] '' by default.
@param string $args['button_class'] 'button button-secondary' by default.
see
https://getbootstrap.com/docs/4.0/components/dropdowns/#single-button-dropdowns
since
1.2
mpa_tmpl_schedule()
includes/functions/template.php
:
657
mpa_tmpl_schedule ( Schedule $schedule ) : array<string|int, mixed>
Parameters
$schedule
: Schedule
since
1.2
mpa_tmpl_term_title()
includes/functions/template.php
:
722
mpa_tmpl_term_title ( WP_Term $term [ , array<string|int, mixed> $args = [] ] ) : string
Parameters
$term
: WP_Term
$args
: array<string|int, mixed>
= []
Optional.
@param bool $args['show_count'] True by default.
since
1.2
mpa_tmpl_post_thumbnail()
includes/functions/template.php
:
749
mpa_tmpl_post_thumbnail ( int|WP_Post $post [ , string|array<string|int, int> $size = 'post-thumbnail' ] [ , array<string|int, mixed> $args = [] ] ) : string
Parameters
$post
: int|WP_Post
$size
: string|array<string|int, int>
= 'post-thumbnail'
Optional. Image size. Accepts any registered image
size name, or an array of width and height values in pixels (in that
order). 'post-thumbnail' by default.
$args
: array<string|int, mixed>
= []
Optional.
@param bool $args['add_link'] Wrap image with the link. True by default.
since
1.2
mpa_tmpl_employees_number()
includes/functions/template.php
:
772
mpa_tmpl_employees_number ( int $number ) : string
Parameters
$number
: int
since
1.2
mpa_tmpl_service_capacity()
includes/functions/template.php
:
798
mpa_tmpl_service_capacity ( Service $service ) : string
Parameters
$service
: Service
see
mpa_tmpl_service_capacity()
in assets/dev/functions/entity.js.
since
1.2
mpa_tmpl_id()
includes/functions/template.php
:
814
mpa_tmpl_id ( string $string [ , bool $allowUnderscore = false ] ) : string
Parameters
$string
: string
$allowUnderscore
: bool
= false
Optional. False by default.
since
1.2.1
mpa_tmpl_preloader()
includes/functions/template.php
:
835
mpa_tmpl_preloader ( ) : string
since
1.11.0
includes/functions/time.php
:
19
mpa_format_minutes ( int $minutes [ , string $format = 'public' ] ) : string
Parameters
$minutes
: int
$format
: string
= 'public'
Optional. 'public', 'internal' ('H:i') or custom time
format. 'public' by default.
since
1.0
mpa_minutes_to_duration()
includes/functions/time.php
:
38
mpa_minutes_to_duration ( int $minutes ) : string
Parameters
$minutes
: int
since
1.0
mpa_parse_to_minutes()
includes/functions/time.php
:
75
Convert something like '08:20' into 500.
mpa_parse_to_minutes ( string $timeString ) : int
Parameters
$timeString
: string
Time in format 'H:i' ('XX:XX'; the function will
not check if the format is OK).
since
1.0
includes/functions/time.php
:
95
mpa_format_time ( DateTime $time [ , string $format = 'public' ] ) : string
Parameters
$time
: DateTime
$format
: string
= 'public'
Optional. 'public', 'internal' ('H:i') or custom time
format. 'public' by default.
since
1.0
mpa_parse_time()
includes/functions/time.php
:
116
mpa_parse_time ( string|DateTime $time [ , mixed $default = false ] ) : DateTime |mixed
Parameters
$time
: string|DateTime
Only the internal format is acceptable as a
string: 'H:i'.
$default
: mixed
= false
Optional. False by default (same return value as in the
DateTime::createFromFormat()).
since
1.0
since
1.2.1
the argument $time
accepts DateTime object.
mpa_validate_time()
includes/functions/time.php
:
138
mpa_validate_time ( string $timeString ) : string|false
Parameters
$timeString
: string
Only the internal format is acceptable - 'H:i'.
since
1.0
mpa_validate_time_pattern()
includes/functions/time.php
:
157
mpa_validate_time_pattern ( ) : string
since
1.0
includes/functions/time.php
:
169
Public time format, set in Settings > General.
mpa_time_format ( ) : string
since
1.0
mpa_time_durations()
includes/functions/time.php
:
181
mpa_time_durations ( int $min [ , int $max = 1439 ] ) : array<string|int, mixed>
Parameters
$min
: int
$max
: int
= 1439
Optional. 1439 by default (the latest time (in minutes): 23:59).
since
1.0
mpa_time_stamps()
includes/functions/time.php
:
201
mpa_time_stamps ( [ array<string|int, mixed> $args = [] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
= []
Optional.
@param int $args['time_step'] Time step from the settings by default.
@param string $args['map_function'] mpa_format_minutes() by default.
@param int $args['min'] 0 by default.
@param int $args['max'] 1439 by default (the latest time (in minutes): 23:59).
since
1.0
mpa_timestamp_minutes()
includes/functions/time.php
:
233
mpa_timestamp_minutes ( DateTime $time ) : int
Parameters
$time
: DateTime
since
1.2.1
mpa_time_slots()
includes/functions/time.php
:
257
mpa_time_slots ( TimePeriod |array<string|int, TimePeriod >|TimePeriods $time , array<string|int, mixed> $args ) : array<string|int, TimePeriod >
Parameters
$time
: TimePeriod |array<string|int, TimePeriod >|TimePeriods
$args
: array<string|int, mixed>
@param int $args['duration'] Required. Service duration (minutes).
@param int $args['time_step'] Optional. Length of the time slot step.
Time step from the settings by default.
@param int $args['buffer_before'] Optional. Buffer time before the service
(in minutes). 0 by default.
@param int $args['buffer_after'] Optional. Buffer time after the service
(in minutes). 0 by default.
@param DateTime $args['min_time'] Optional. No limitations by default.
@param string $args['alignment'] Optional. 'hour'|'none'. Alignment from
the settings by default.
since
1.2.1
mpa_next_time_step()
includes/functions/time.php
:
347
mpa_next_time_step ( DateTime $time [ , array<string|int, mixed> $args = [] ] ) : DateTime
Parameters
$time
: DateTime
$args
: array<string|int, mixed>
= []
Optional.
@param int $args['time_step'] Time step from the settings by default.
@param string $args['alignment'] Alignment from the settings by default.
since
1.2.1
mpa_time_step()
includes/functions/time.php
:
390
mpa_time_step ( ) : int
since
1.2.1
mpa_add_buffer_time()
includes/functions/time.php
:
402
mpa_add_buffer_time ( TimePeriod |string $timePeriod , Service $service ) : TimePeriod
Parameters
$timePeriod
: TimePeriod |string
$service
: Service
since
1.4.0
mpa_add_post_metas()
includes/functions/wordpress.php
:
14
mpa_add_post_metas ( int $postId , string $metaName , array<string|int, mixed> $metaValues ) : mixed
Parameters
$postId
: int
$metaName
: string
$metaValues
: array<string|int, mixed>
since
1.0
mpa_delete_post_metas()
includes/functions/wordpress.php
:
28
mpa_delete_post_metas ( int $postId , string $metaName , array<string|int, mixed> $metaValues ) : mixed
Parameters
$postId
: int
$metaName
: string
$metaValues
: array<string|int, mixed>
since
1.0
mpa_update_post_status()
includes/functions/wordpress.php
:
44
mpa_update_post_status ( int $postId , string $postStatus [ , bool $wpError = false ] ) : bool|WP_Error
Parameters
$postId
: int
$postStatus
: string
$wpError
: bool
= false
Optional. Whether to return a WP_Error on failure. False
by default.
since
1.5.0
mpa_get_status_label()
includes/functions/wordpress.php
:
71
Retrieve a post status label by it's name.
mpa_get_status_label ( string $status ) : string
Parameters
$status
: string
since
1.0
todo
Use translations from default WordPress textdomain.
mpa_get_terms()
includes/functions/wordpress.php
:
96
mpa_get_terms ( int $postId , string $taxonomy [ , string|array<string|int, mixed> $fields = ['slug' => 'name'] ] [ , array<string|int, mixed> $args = [] ] ) : array<string|int, WP_Term >|array<string|int, mixed>
Parameters
$postId
: int
Gets all available terms for 0.
$taxonomy
: string
$fields
: string|array<string|int, mixed>
= ['slug' => 'name']
Optional. 'all', field name or key-value pair.
['slug' => 'name'] by default.
$args
: array<string|int, mixed>
= []
since
1.0
mpa_build_query_order_args()
includes/functions/wordpress.php
:
142
Notice: the function does not validate the values. Validate all fields first,
before passing them to the function.
mpa_build_query_order_args ( array<string|int, mixed> $args [ , array<string|int, mixed> $failResponse = [] ] ) : array<string|int, mixed>
Parameters
$args
: array<string|int, mixed>
$failResponse
: array<string|int, mixed>
= []
see
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
since
1.2
mpa_get_paged()
includes/functions/wordpress.php
:
177
mpa_get_paged ( ) : int
since
1.2
mpa_get_post_by_name()
includes/functions/wordpress.php
:
190
mpa_get_post_by_name ( string $postName , string $postType [ , array<string|int, mixed> $args = [] ] ) : WP_Post |null
Parameters
$postName
: string
$postType
: string
$args
: array<string|int, mixed>
= []
Optional. Custom query args for get_posts(). [] by default.
since
1.2
mpa_get_post_class()
includes/functions/wordpress.php
:
224
Retrieve the classes for the post div.
mpa_get_post_class ( [ string|array<string|int, mixed> $class = '' ] [ , int|WP_Post |null $postId = null ] ) : string
Parameters
$class
: string|array<string|int, mixed>
= ''
Optional. One or more classes to add to the class
list. '' by default.
$postId
: int|WP_Post |null
= null
Optional. Post ID or post object. Current
post by default (null).
since
1.2
mpa_get_post_id_by_name()
includes/functions/wordpress.php
:
247
mpa_get_post_id_by_name ( string $postName , string $postType [ , array<string|int, mixed> $args = [] ] ) : int
Parameters
$postName
: string
$postType
: string
$args
: array<string|int, mixed>
= []
Optional. Custom query args for get_posts(). [] by default.
since
1.2
mpa_get_post_meta()
includes/functions/wordpress.php
:
270
mpa_get_post_meta ( int $postId [ , string $metaName = '' ] [ , bool $isSingle = false ] [ , mixed $default = '' ] ) : mixed
Parameters
$postId
: int
$metaName
: string
= ''
Optional. '' by default (all fields of the post).
$isSingle
: bool
= false
Optional. False by default.
$default
: mixed
= ''
Optional. Default value for single meta. '' by default.
since
1.2
mpa_get_post_thumbnail_size()
includes/functions/wordpress.php
:
324
mpa_get_post_thumbnail_size ( string $postType [ , string $view = '' ] [ , string $defaultSize = 'post-thumbnail' ] ) : string
Parameters
$postType
: string
$view
: string
= ''
$defaultSize
: string
= 'post-thumbnail'
Optional. 'post-thumbnail' by default.
since
1.2
mpa_get_posts_per_page()
includes/functions/wordpress.php
:
350
mpa_get_posts_per_page ( ) : int
since
1.2
mpa_get_term_link()
includes/functions/wordpress.php
:
363
mpa_get_term_link ( WP_Term |int|string $term [ , string $taxonomy = '' ] ) : string
Parameters
$term
: WP_Term |int|string
The term object, ID, or slug whose link will
be retrieved.
$taxonomy
: string
= ''
since
1.2
mpa_get_term_attachment_image()
includes/functions/wordpress.php
:
383
mpa_get_term_attachment_image ( WP_Term |int $term [ , string|array<string|int, int> $size = 'thumbnail' ] ) : string
Parameters
$term
: WP_Term |int
$size
: string|array<string|int, int>
= 'thumbnail'
Optional. Image size. Accepts any registered image
size name, or an array of width and height values in pixels (in that
order). 'thumbnail' by default.
since
1.2
mpa_get_term_attachment_image_src()
includes/functions/wordpress.php
:
404
mpa_get_term_attachment_image_src ( WP_Term |int $term [ , string|array<string|int, int> $size = 'thumbnail' ] ) : array<string|int, mixed>|false
Parameters
$term
: WP_Term |int
$size
: string|array<string|int, int>
= 'thumbnail'
Optional. Image size. Accepts any registered image
size name, or an array of width and height values in pixels (in that
order). 'thumbnail' by default.
since
1.2
mpa_get_term_thumbnail_id()
includes/functions/wordpress.php
:
421
mpa_get_term_thumbnail_id ( WP_Term |int $term ) : int
Parameters
$term
: WP_Term |int
since
1.2
mpa_term_has_thumbnail()
includes/functions/wordpress.php
:
442
mpa_term_has_thumbnail ( WP_Term |int $term ) : bool
Parameters
$term
: WP_Term |int
since
1.2
mpa_get_post_attachment_image_url()
includes/functions/wordpress.php
:
458
mpa_get_post_attachment_image_url ( int $postId [ , string|array<string|int, int> $size = 'thumbnail' ] ) : string
Parameters
$postId
: int
$size
: string|array<string|int, int>
= 'thumbnail'
Optional. Image size. Accepts any registered image
size name, or an array of width and height values in pixels (in that
order). 'thumbnail' by default.
since
1.4.0
mpa_the_content()
includes/functions/wordpress.php
:
481
mpa_the_content ( ) : mixed
global
since
1.2
mpa_sanitize_html_classes()
includes/functions/wordpress.php
:
502
mpa_sanitize_html_classes ( string $string ) : string
Parameters
$string
: string
since
1.2
mpa_wordpress_at_least()
includes/functions/wordpress.php
:
517
mpa_wordpress_at_least ( string $version ) : bool
Parameters
$version
: string
since
1.6.2
mb_convert_encoding()
includes/polyfills/mbstring.php
:
9
mb_convert_encoding ( mixed $s , mixed $toEncoding [ , mixed $fromEncoding = null ] ) : mixed
Parameters
$s
: mixed
$toEncoding
: mixed
$fromEncoding
: mixed
= null
link
https://github.com/symfony/polyfill-mbstring
since
1.1.0
mb_convert_encoding_callback()
includes/polyfills/mbstring.php
:
55
mb_convert_encoding_callback ( mixed $m ) : mixed
Parameters
$m
: mixed
link
https://github.com/symfony/polyfill-mbstring
since
1.1.0
mb_detect_encoding()
includes/polyfills/mbstring.php
:
88
mb_detect_encoding ( mixed $s [ , mixed $encodings = null ] [ , mixed $strict = false ] ) : mixed
Parameters
$s
: mixed
$encodings
: mixed
= null
$strict
: mixed
= false
link
https://github.com/symfony/polyfill-mbstring
since
1.1.0
mb_validate_encoding()
includes/polyfills/mbstring.php
:
133
mb_validate_encoding ( mixed $encoding ) : mixed
Parameters
$encoding
: mixed
link
https://github.com/symfony/polyfill-mbstring
since
1.1.0