# timetics/1.0.63/vendor/themewinter/email-notification-sdk/src/Assets/Enqueue.php

Timetics – Appointment Booking Calendar &amp; Scheduling, version 1.0.63. 61 lines.

- Page: https://pluginprobe.com/plugins/timetics/1.0.63/code/vendor/themewinter/email-notification-sdk/src/Assets/Enqueue.php
- Raw: https://pluginprobe.com/plugins/timetics/1.0.63/raw/vendor/themewinter/email-notification-sdk/src/Assets/Enqueue.php
- Modified: 2026-09-21T08:26:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/timetics/1.0.63/code/vendor/themewinter/email-notification-sdk/src/Assets/Enqueue.php#L10-L20`.

```php
<?php

namespace Ens\Assets;

use Ens\Config;
use Ens\Utils\Helpers;

/**
 * Class Enqueue
 *
 * @package ENS
 *
 * @since 1.0.0
 */
class Enqueue {

    /**
     * Config
     *
     * @var Config
     */
    private $identifier;

    /**
     * Initializing enqueue assets
     *
     * @since 1.0.0
     *
     * @return void
     */
    public function init($identifier) {
        $this->identifier = $identifier;
        add_action( 'admin_enqueue_scripts', [$this, 'enqueue_assets'],999 );
    }

    /**
     * Enqueue admin scripts and pass localized data
     *
     * @since 1.0.0
     *
     * @return void
     */
    public function enqueue_assets() {
        $admin_script_handler = Helpers::get_config_data( $this->identifier,'admin_script_handler' );
        $plugin_slug          = Helpers::get_config_data( $this->identifier,'plugin_slug' );

        $general_prefix = Helpers::get_config_data( $this->identifier,'general_prefix' );

        wp_localize_script( $admin_script_handler, $general_prefix . '_ens_data', [
            // Must stay the 'wp_rest' action: this value is sent as the
            // X-WP-Nonce header, and WordPress core rejects the whole request
            // with rest_cookie_invalid_nonce if that header is anything else.
            'nonce'       => wp_create_nonce( 'wp_rest' ),
            'api_version' => 'v1',
            'plugin_slug' => $plugin_slug,
            'base_url'    => site_url(),
            'triggers'    => apply_filters( 'ens_'.$this->identifier.'_available_actions', [] )
        ] );
    }
}

```
