eo_get_booking_statuses
Pro
eo_get_booking_statuses( $args = array(), $output = false, $operator = 'and' )
Get a list of all registered booking status objects.
You can optionally provide conditions to filter by with $args
and $operator
.
$output
allows to toggle whether names or objects (default) are returned.
Example
Return a list of status names which are to be included in the 'All' filter on
the booings admin page.
$statues_in_list = eo_get_booking_statuses( array( 'show_in_admin_all_list' => true ), 'names', 'and' ) )
Parameters
array
|
$args = array() |
An array of key => value arguments to match against the booking status objects.
|
string
|
$output = false |
The type of output to return, either 'names' or 'objects'. 'objects' is the default.
|
string
|
$operator = 'and' |
The logical operation to perform. 'or' means only one element from the array needs to match; 'and' means all elements must match. The default is 'and'.
|
Return value
array
|
A list of booking status names or objects
|
Related