Backoffice
1 month ago
View
1 year ago
Widget
1 month ago
register_backoffice_hooks.php
1 month ago
register_global_hooks.php
1 month ago
uninstall_plugin.php
1 year ago
register_backoffice_hooks.php
25 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Zenchef\Widget\Widget\Backoffice; |
| 4 | |
| 5 | use function add_action; |
| 6 | use function Zenchef\Widget\Widget\Backoffice\add_settings_page; |
| 7 | use function Zenchef\Widget\Widget\Backoffice\load_settings_page_assets; |
| 8 | use function Zenchef\Widget\Widget\Backoffice\register_settings; |
| 9 | use const Zenchef\Widget\ROOT_PATH; |
| 10 | |
| 11 | /** |
| 12 | * @return void |
| 13 | */ |
| 14 | function register_backoffice_hooks() |
| 15 | { |
| 16 | require_once ROOT_PATH . 'src/Backoffice/resolve_field_type_template.php'; |
| 17 | require_once ROOT_PATH . 'src/Widget/Backoffice/add_settings_page.php'; |
| 18 | require_once ROOT_PATH . 'src/Widget/Backoffice/register_settings.php'; |
| 19 | require_once ROOT_PATH . 'src/Widget/Backoffice/load_settings_page_assets.php'; |
| 20 | |
| 21 | add_action('admin_init', 'Zenchef\Widget\Widget\Backoffice\register_settings'); |
| 22 | add_action('admin_menu', 'Zenchef\Widget\Widget\Backoffice\add_settings_page'); |
| 23 | add_action('admin_enqueue_scripts', 'Zenchef\Widget\Widget\Backoffice\load_settings_page_assets'); |
| 24 | } |
| 25 |