| @@ -1,7 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Booktics\Assets; |
| 3 | 3 | |
| 4 | +use Booktics\Admin\Theme_Mode; | |
| 5 | + | |
| 4 | 6 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 5 | 7 | |
| 6 | 8 | /** |
| 7 | 9 | * Manage all localize data |
| @@ -31,13 +33,17 @@ | ||
| 31 | 33 | 'time_format' => get_option( 'time_format' ), |
| 32 | 34 | 'time_format_string' => date_i18n( get_option( 'time_format' ) ), |
| 33 | 35 | 'start_of_week' => get_option( 'start_of_week', 0 ), |
| 34 | 36 | 'current_user_id' => get_current_user_id(), |
| 37 | + 'current_user_email' => $current_user->user_email, | |
| 38 | + 'current_user_name' => $current_user->display_name, | |
| 35 | 39 | 'currency_list' => booktics_get_currencies(), |
| 36 | 40 | 'bookticsPro' => class_exists('BookticsPro'), |
| 37 | 41 | 'user_role' => (array) $user_roles, |
| 38 | 42 | 'doc_links' => self::get_doc_links(), |
| 39 | 43 | 'aisentic' => self::get_aisentic_state(), |
| 44 | + 'theme_mode' => Theme_Mode::get_for_user(), | |
| 45 | + 'dark_mode_enabled' => Theme_Mode::is_enabled(), | |
| 40 | 46 | ]; |
| 41 | 47 | |
| 42 | 48 | return apply_filters( 'booktics_admin_localize', $data ); |
| 43 | 49 | } |