diff --git a/app/cmd/reload/reload.go b/app/cmd/reload/reload.go index 124092d..a610095 100644 --- a/app/cmd/reload/reload.go +++ b/app/cmd/reload/reload.go @@ -264,10 +264,11 @@ func Reload() { safetyMaps.Flush() callsM.Flush() flushMapFn.Flush() - slice.Sort(calls.Load(), func(i, j queue) bool { + callll := calls.Load() + slice.Sort(callll, func(i, j queue) bool { return i.order > j.order }) - for _, call := range calls.Load() { + for _, call := range callll { call.fn() } return diff --git a/app/theme/wp/wp.go b/app/theme/wp/wp.go index 9c823fd..032ff7c 100644 --- a/app/theme/wp/wp.go +++ b/app/theme/wp/wp.go @@ -118,7 +118,7 @@ func InitHandle(fn func(*Handle), h *Handle) { h.C.Set("inited", true) inited = true return *h - }) + }, float64(-100)) h.ginH = maps.Copy(hh.ginH) h.ginH["calPostClass"] = postClass(h) h.ginH["calBodyClass"] = bodyClass(h)