PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.0
Booktics – Appointment Booking Calendar for Service Businesses v1.0.0
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
booktics / vendor / themewinter / email-notification-sdk / src / Assets / Enqueue.php

Enqueue.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.0, at vendor/themewinter/email-notification-sdk/src/Assets/Enqueue.php

49 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ENS\Assets;
4
5 use ENS\Config;
6
7 /**
8 * Class Enqueue
9 *
10 * @package ENS
11 *
12 * @since 1.0.0
13 */
14 class Enqueue {
15
16 /**
17 * Initializing enqueue assets
18 *
19 * @since 1.0.0
20 *
21 * @return void
22 */
23 public function init() {
24 add_action( 'admin_enqueue_scripts', [$this, 'enqueue_assets'] );
25 }
26
27 /**
28 * Enqueue admin scripts and pass localized data
29 *
30 * @since 1.0.0
31 *
32 * @return void
33 */
34 public function enqueue_assets() {
35 $admin_script_handler = Config::get( 'admin_script_handler' );
36 $plugin_slug = Config::get( 'plugin_slug' );
37
38 $general_prefix = Config::get( 'general_prefix' );
39
40 wp_localize_script( $admin_script_handler, $general_prefix . '_ens_data', [
41 'nonce' => wp_create_nonce( 'wp_rest' ),
42 'api_version' => 'v1',
43 'plugin_slug' => $plugin_slug,
44 'base_url' => site_url(),
45 'triggers' => apply_filters( 'ens_available_actions', [] )
46 ] );
47 }
48 }
49