| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FireBox |
| 4 | - * @version 1.0.8 Free | |
| 4 | + * @version 2.1.39 Free | |
| 5 | 5 | * |
| 6 | 6 | * @author FirePlugins <info@fireplugins.com> |
| 7 | 7 | * @link https://www.fireplugins.com |
| 8 | - * @copyright Copyright © 2021 FirePlugins All Rights Reserved | |
| 8 | + * @copyright Copyright © 2025 FirePlugins All Rights Reserved | |
| 9 | 9 | * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | namespace FireBox\Core\Controllers; |
| @@ -25,6 +25,23 @@ | ||
| 25 | 25 | */ |
| 26 | 26 | public function render() |
| 27 | 27 | { |
| 28 | 28 | firebox()->renderer->admin->render('pages/analytics'); |
| 29 | + } | |
| 30 | + | |
| 31 | + public function addMedia() | |
| 32 | + { | |
| 33 | + wp_register_script('firebox-react', FBOX_MEDIA_ADMIN_URL . 'js/vendor/react.production.min.js', [], FBOX_VERSION, true); | |
| 34 | + wp_enqueue_script('firebox-react'); | |
| 35 | + wp_register_script('firebox-react-dom', FBOX_MEDIA_ADMIN_URL . 'js/vendor/react-dom.production.min.js', [], FBOX_VERSION, true); | |
| 36 | + wp_enqueue_script('firebox-react-dom'); | |
| 37 | + | |
| 38 | + wp_register_script( | |
| 39 | + 'firebox-analytics', | |
| 40 | + FBOX_MEDIA_ADMIN_URL . 'js/analytics.js', | |
| 41 | + ['wp-api-fetch'], | |
| 42 | + FBOX_VERSION, | |
| 43 | + true | |
| 44 | + ); | |
| 45 | + wp_enqueue_script('firebox-analytics'); | |
| 29 | 46 | } |
| 30 | 47 | } |