PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.28
Booktics – Appointment Booking Calendar for Service Businesses v1.0.28
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 All 31 releases
← All changes | core/shortcode/booking-shortcode.php +37 -28 1.0.1 → 1.0.28 View file →
@@ -1,28 +1,37 @@
1 -<?php
2 -namespace Booktics\Shortcode;
3 -
4 -/**
5 - * Booking shortcode class
6 - */
7 -class Booking_Shortcode {
8 - /**
9 - * Constructor for booking shortcode
10 - *
11 - * @return void
12 - */
13 - public function __construct() {
14 - add_shortcode( 'booktics_booking_form', array( $this, 'render_booking_form' ) );
15 - }
16 -
17 -
18 - /**
19 - * Render booking form
20 - *
21 - * @param array $attributes
22 - *
23 - * @return string
24 - */
25 - public function render_booking_form( $attributes ) {
26 - return '<div id="booktics-booking-form"></div>';
27 - }
28 -}
1 +<?php
2 +namespace Booktics\Shortcode;
3 +
4 +/**
5 + * Booking shortcode class
6 + */
7 +class Booking_Shortcode {
8 + /**
9 + * Constructor for booking shortcode
10 + *
11 + * @return void
12 + */
13 + public function __construct() {
14 + add_shortcode( 'booktics_booking_form', array( $this, 'render_booking_form' ) );
15 + }
16 +
17 +
18 + /**
19 + * Render booking form
20 + *
21 + * @param array $attributes
22 + *
23 + * @return string
24 + */
25 + public function render_booking_form( $attributes ) {
26 + wp_enqueue_style( 'booktics-vendor' );
27 + wp_enqueue_style( 'booktics-frontend' );
28 +
29 + wp_enqueue_script( 'booktics-packages' );
30 + wp_enqueue_script( 'booktics-frontend-scripts' );
31 + wp_enqueue_script( 'booktics-flatpickr-scripts' );
32 +
33 + do_action( 'booktics_before_rendering_booking_form_shortcode' );
34 +
35 + return '<div id="booktics-booking-form"></div>';
36 + }
37 +}