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_global_hooks.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Zenchef\Widget\Widget; |
| 4 | |
| 5 | use function add_action; |
| 6 | use function Zenchef\Widget\Widget\load_script_file; |
| 7 | use function Zenchef\Widget\Widget\load_script_template_file; |
| 8 | use function Zenchef\Widget\Widget\register_widget_shortcode; |
| 9 | use const Zenchef\Widget\ROOT_PATH; |
| 10 | |
| 11 | /** |
| 12 | * @return void |
| 13 | */ |
| 14 | function register_global_hooks() |
| 15 | { |
| 16 | require_once ROOT_PATH . 'src/View/render.php'; |
| 17 | require_once ROOT_PATH . 'src/Widget/sanitize_restaurant_id.php'; |
| 18 | require_once ROOT_PATH . 'src/Widget/sanitize_widget_settings.php'; |
| 19 | require_once ROOT_PATH . 'src/Widget/get_widget_settings.php'; |
| 20 | require_once ROOT_PATH . 'src/Widget/build_widget_data_attributes.php'; |
| 21 | require_once ROOT_PATH . 'src/Widget/load_translations.php'; |
| 22 | require_once ROOT_PATH . 'src/Widget/load_script_template_file.php'; |
| 23 | require_once ROOT_PATH . 'src/Widget/load_script_file.php'; |
| 24 | require_once ROOT_PATH . 'src/Widget/register_shortcode.php'; |
| 25 | |
| 26 | add_action('init', 'Zenchef\Widget\Widget\load_translations'); |
| 27 | add_action('wp_footer', 'Zenchef\Widget\Widget\load_script_template_file'); |
| 28 | add_action('wp_enqueue_scripts', 'Zenchef\Widget\Widget\load_script_file'); |
| 29 | |
| 30 | register_widget_shortcode(); |
| 31 | } |
| 32 |