From 8adc853deab024e1fd562a728427c7d667f970ea Mon Sep 17 00:00:00 2001 From: rxu Date: Sat, 22 Feb 2025 13:28:43 +0700 Subject: [PATCH] [ticket/17461] Add core events to acp_main PHPBB-17461 --- phpBB/includes/acp/acp_main.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index c39e984f73..e284b29146 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -100,6 +100,20 @@ class acp_main default: $confirm = true; $confirm_lang = 'CONFIRM_OPERATION'; + + /** + * Event to add confirm box for custom ACP quick actions + * + * @event core.acp_main_add_actions_confirm + * @var string id The module ID + * @var string mode The module mode + * @var string action Custom action type name + * @var boolean confirm Do we display the confirm box to run the custom action + * @var string confirm_lang Lang var name to display in confirm box + * @since 3.3.15-RC1 + */ + $vars = ['id', 'mode', 'action', 'confirm', 'confirm_lang']; + extract($phpbb_dispatcher->trigger_event('core.acp_main_add_actions_confirm', compact($vars))); } if ($confirm) @@ -423,6 +437,19 @@ class acp_main trigger_error('PURGE_SESSIONS_SUCCESS'); } break; + + default: + /** + * Event to add custom ACP quick actions + * + * @event core.acp_main_add_actions + * @var string id The module ID + * @var string mode The module mode + * @var string action Custom action type name + * @since 3.3.15-RC1 + */ + $vars = ['id', 'mode', 'action']; + extract($phpbb_dispatcher->trigger_event('core.acp_main_add_actions', compact($vars))); } } }