# booktics/1.0.0/core/assets/localize.php

Booktics – Appointment Booking Calendar for Service Businesses, version 1.0.0. 51 lines.

- Page: https://pluginprobe.com/plugins/booktics/1.0.0/code/core/assets/localize.php
- Raw: https://pluginprobe.com/plugins/booktics/1.0.0/raw/core/assets/localize.php
- Modified: 2025-07-03T16:48:18+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/booktics/1.0.0/code/core/assets/localize.php#L10-L20`.

```php
<?php
namespace Booktics\Assets;

/**
 * Manage all localize data
 */
class Localize {

    /**
     * Get admin localize data
     *
     * @return  array Collection localize data
     */
    public static function get_admin() {
        $data = [
            'site_url'            => site_url(),
            'admin_url'           => admin_url(),
            'nonce'               => wp_create_nonce( 'wp_rest' ),
            'date_format'         => get_option( 'date_format' ),
            'date_format_string'  => date_i18n( get_option( 'date_format' ) ),
            'time_format'         => get_option( 'time_format' ),
            'time_format_string'  => date_i18n( get_option( 'time_format' ) ),
            'start_of_week'       => get_option( 'start_of_week', 0 ),
            'current_user_id'     => get_current_user_id(),
            'currency_list'       => booktics_get_currencies(),
            'bookticsPro'         => class_exists('BookticsPro') ? true : false,
        ];

        return apply_filters( 'booktics_admin_localize', $data );
    }

    /**
     * Get frontend localize data
     *
     * @return  array Collection localize data
     */
    public static function get_frontend() {
        $data = [
            'site_url'            => site_url(),
            'nonce'               => wp_create_nonce( 'wp_rest' ),
            'date_format'         => get_option( 'date_format' ),
            'time_format'         => get_option( 'time_format' ),
            'current_user_id'     => get_current_user_id(),
            'start_of_week'       => get_option( 'start_of_week', 0 ),
            'locale_name'         => strtolower( str_replace( '_', '-', get_locale() ) ),
            'currency_list'       => booktics_get_currencies(),
        ];

        return apply_filters( 'booktics_frontend_localize', $data );
    }
}
```
