PluginProbe ʕ •ᴥ•ʔ
Kubio AI Page Builder / 2.6.6
Kubio AI Page Builder v2.6.6
2.9.1 2.9.0 2.8.6 2.8.5 2.8.4 2.8.3 2.8.2 2.8.1 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.9.0 2.0.0 2.1.1 2.1.2 2.1.3 2.2.0 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.5 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.6.2 2.6.3 2.6.5 2.6.6 2.6.7 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0
kubio / lib / api / recommendations / fluent-booking.php
kubio / lib / api / recommendations Last commit date
newsletter 10 months ago bubble-chat.php 11 months ago contact-forms.php 11 months ago fluent-booking.php 1 year ago index.php 1 year ago
fluent-booking.php
52 lines
1 <?php
2
3 use Kubio\Flags;
4
5 add_action(
6 'rest_api_init',
7 function () {
8 $namespace = 'kubio/v1';
9
10 register_rest_route(
11 $namespace,
12 '/prepare_fluent_booking_plugin',
13 array(
14 'methods' => 'GET',
15 'callback' => 'kubio_api_prepare_fluent_booking_plugin',
16 'permission_callback' => function () {
17 return current_user_can( 'edit_posts' );
18 },
19
20 )
21 );
22
23 register_rest_route(
24 $namespace,
25 '/get_fluent_events',
26 array(
27 'methods' => 'GET',
28 'callback' => 'kubio_api_get_fluent_events',
29 'permission_callback' => function () {
30 return current_user_can( 'edit_posts' );
31 },
32
33 )
34 );
35 }
36 );
37
38
39
40 function kubio_api_prepare_fluent_booking_plugin( WP_REST_Request $request ) {
41 $already_setup = Flags::getSetting( 'fluentBookingInstalled', null );
42 if ( empty( $already_setup ) ) {
43 Flags::setSetting( 'fluentBookingInstalled', true );
44 }
45 wp_send_json_success();
46 }
47
48 function kubio_api_get_fluent_events( WP_REST_Request $request ) {
49
50 wp_send_json_success( kubio_get_fluent_booking_events() );
51 }
52