*/ public static function all(): array { return [ self::HEAD, self::BODY_START, self::BODY_END, self::HEADER_AFTER, self::NAV_AFTER, self::CONTENT_BEFORE, self::CONTENT_AFTER, self::ARTICLE_TOP, self::ARTICLE_BOTTOM, self::SIDEBAR_BEFORE, self::SIDEBAR, self::SIDEBAR_AFTER, self::FOOTER_BEFORE, self::FOOTER_AFTER, ]; } public static function event(string $slot): string { return 'theme.'.$slot; } public static function render(string $slot): string { return Hook::gather(self::event($slot), ''); } /** * Soft contract for theme authors & admin UI. * Sizes are recommendations only — the active theme's CSS wins. * * @return array */ public static function catalog(): array { $catalog = []; foreach (self::all() as $slot) { $catalog[$slot] = [ 'label' => __('admin.slots.'.$slot.'.label'), 'place' => __('admin.slots.'.$slot.'.place'), 'size' => __('admin.slots.'.$slot.'.size'), 'multi' => true, ]; } return $catalog; } public static function hint(string $slot): string { $meta = self::catalog()[$slot] ?? null; if ($meta === null) { return __('admin.slots.custom', ['slot' => $slot]); } return __('admin.slots.hint', [ 'place' => $meta['place'], 'size' => $meta['size'], 'slot' => $slot, ]); } }