event-hook: rewrite the hook priorities enum

Hooks need to have a priority relative to the event they are executed on,
so it does not make much sense to have all kinds of different priorities
based also on the event type and/or the module where they are defined.
Also, it wouldn't be acceptable to have such an enumeration on the public API.
This commit is contained in:
George Kiagiadakis
2022-11-05 12:40:38 +02:00
committed by Julian Bouzas
parent e2b9cb0b5e
commit 24db3fe24a
6 changed files with 34 additions and 84 deletions

View File

@@ -191,11 +191,24 @@ local Feature = {
},
}
local HookPriority = {
LOWEST = -500,
ULTRA_LOW = -300,
VERY_LOW = -200,
LOW = -100,
NORMAL = 0,
HIGH = 100,
VERY_HIGH = 200,
ULTRA_HIGH = 300,
HIGHEST = 500,
}
SANDBOX_EXPORT = {
Debug = Debug,
Id = Id,
Features = Features,
Feature = Feature,
HookPriority = HookPriority,
GLib = GLib,
I18n = I18n,
Log = WpLog,