| @@ -31,8 +31,9 @@ | ||
| 31 | 31 | $screen = get_current_screen(); |
| 32 | 32 | if ( $screen->base !== 'toplevel_page_booktics') { |
| 33 | 33 | return; |
| 34 | 34 | } |
| 35 | + $this->enqueue_i18n_loader(); | |
| 35 | 36 | wp_enqueue_style( 'wp-color-picker' ); |
| 36 | 37 | wp_enqueue_style( 'booktics-admin-style' ); |
| 37 | 38 | wp_enqueue_style( 'booktics-vendor' ); |
| 38 | 39 | |
| @@ -42,8 +43,13 @@ | ||
| 42 | 43 | wp_enqueue_script( 'booktics-dashboard-scripts' ); |
| 43 | 44 | |
| 44 | 45 | wp_localize_script( 'booktics-packages', 'booktics', Localize::get_admin() ); |
| 45 | 46 | wp_localize_script( 'booktics-packages', 'booktics_enabled_modules', booktics_get_enabled_modules() ); |
| 47 | + | |
| 48 | + if ( function_exists( 'wp_set_script_translations' ) ) { | |
| 49 | + wp_set_script_translations( 'booktics-dashboard-scripts', 'booktics' ); | |
| 50 | + } | |
| 51 | + | |
| 46 | 52 | } |
| 47 | 53 | |
| 48 | 54 | /** |
| 49 | 55 | * Get all scripts |
| @@ -69,9 +75,10 @@ | ||
| 69 | 75 | 'wp-components', |
| 70 | 76 | 'wp-compose', |
| 71 | 77 | 'wp-i18n', |
| 72 | 78 | 'wp-element', |
| 73 | - 'wp-data' | |
| 79 | + 'wp-data', | |
| 80 | + 'wp-hooks', | |
| 74 | 81 | ], |
| 75 | 82 | 'in_footer' => true, |
| 76 | 83 | ], |
| 77 | 84 | ]; |
| @@ -146,10 +153,10 @@ | ||
| 146 | 153 | color: "#22B855", |
| 147 | 154 | }); |
| 148 | 155 | window.Beacon('init', '0f1a82db-0aa9-4bac-accc-ee1bb81d4940'); |
| 149 | 156 | window.Beacon('on', 'ready', function() { |
| 150 | - window.Beacon('show'); | |
| 157 | + window.Beacon('close'); | |
| 151 | 158 | }); |
| 152 | 159 | </script> |
| 153 | 160 | <?php |
| 154 | 161 | } |
| 155 | 162 | } |