PluginProbe
Booking Calendar / 11.7
Booking Calendar v11.7
11.9 11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 All 205 releases
booking / includes / page-appointment-services / repository / appointment_services__repository.php

appointment_services__repository.php in Booking Calendar 11.7, at includes/page-appointment-services/repository/appointment_services__repository.php

28 lines 998 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /** Repository bootstrap. @package Booking Calendar */
3 if ( ! defined( 'ABSPATH' ) ) { exit; }
4 require_once __DIR__ . '/class-wpbc-appointment-services-repository.php';
5
6 /**
7 * Return the shared native Appointment Services repository.
8 *
9 * @return WPBC_Appointment_Services_Repository Native repository instance.
10 */
11 function wpbc_appointment_services_repository() {
12 static $repository = null;
13 if ( null === $repository ) { $repository = new WPBC_Appointment_Services_Repository(); }
14 return $repository;
15 }
16
17 /**
18 * Supply the native repository when an extension has not provided one.
19 *
20 * @param mixed $provider Provider selected by an earlier filter callback.
21 *
22 * @return object Existing provider or the native repository.
23 */
24 function wpbc_appointment_services_use_native_repository( $provider ) {
25 return $provider ? $provider : wpbc_appointment_services_repository();
26 }
27 add_filter( 'wpbc_appointment_services_data_provider', 'wpbc_appointment_services_use_native_repository', 10 );
28