wp-go/internal/actions/themehook.go

18 lines
400 B
Go
Raw Normal View History

package actions
import (
"github.com/fthvgb1/wp-go/internal/theme"
"github.com/fthvgb1/wp-go/internal/theme/common"
"github.com/gin-gonic/gin"
)
func ThemeHook(scene int) func(*gin.Context) {
return func(ctx *gin.Context) {
2023-02-14 11:47:47 +00:00
t := theme.GetTemplateName()
2023-02-24 11:34:19 +00:00
h := common.NewHandle(ctx, scene, t)
h.Index = common.NewIndexHandle(h)
h.Detail = common.NewDetailHandle(h)
theme.Hook(t, h)
}
}