wp-go/internal/theme/wp/widgetareadata.go
2023-03-01 13:17:12 +08:00

15 lines
450 B
Go

package wp
import (
"github.com/fthvgb1/wp-go/helper/slice"
"github.com/fthvgb1/wp-go/internal/pkg/cache"
"github.com/fthvgb1/wp-go/internal/pkg/constraints"
)
func (h *Handle) WidgetAreaData() {
h.ginH["archives"] = cache.Archives(h.C)
h.ginH["recentPosts"] = slice.Map(cache.RecentPosts(h.C, 5), ProjectTitle)
h.ginH["categories"] = cache.CategoriesTags(h.C, constraints.Category)
h.ginH["recentComments"] = cache.RecentComments(h.C, 5)
}