English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  Site Pages  >  Employees Area  >  Dashboard  >  Build Appointments Query

apply_filters_ref_array( 'vikappointments_build_emplogin_appointments_query', bool $status, mixed &$queryarray &$optionsmixed $auth )

Fires while loading the upcoming appointments to display.


Description

Trigger hook to manipulate at runtime the query used to load the upcoming appointments to display under the Employees Area dashboard page in the front-end.

Third party plugins can extend the query by applying further conditions or selecting additional data.


Parameters

$status

(bool)  True on success, false otherwise.

&$query

(mixed)  Either a query builder object or a plain string.

&$options

(array)  An array of options.

  • start - the query offset to handle the pagination;
  • limit - the maximum number of appointments to display per page.
$auth

(VAPEmployeeAuth)  The authenticated employee instance.


Example

/**
 * Trigger hook to manipulate the query at runtime. Third party plugins
 * can extend the query by applying further conditions or selecting
 * additional data.
 *
 * @param  bool             $status    True on success, false otherwise.
 * @param  mixed            &$query    Either a query builder or a query string.
 * @param  array            &$options  An array of options.
 * @param  VAPEmployeeAuth  $auth      The authenticated employee instance.
 *
 * @since  1.2.19
 */
add_filter('vikappointments_build_emplogin_appointments_query' function($status, &$query, &$options, $auth)
{
    // do something here...

    return $status;
}, 10, 4);

Changelog

Version Description
1.2.19 Introduced.
Last Update: 1 day ago
Helpful?