PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / trunk
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! vtrunk
3.8.0 3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 All 112 releases
templately / modules / template-browsing / module.php

module.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! trunk, at modules/template-browsing/module.php

41 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template-browsing module (spec 017-template-browsing).
4 *
5 * The template library discovery surface: items listing/search/counts/featured/
6 * trending plus the public metadata endpoints (categories, tags, template types).
7 * Relocated from includes/API/ — behavior byte-identical (same routes, params,
8 * transient cache keys). The Dependencies endpoint stays with 020-single-import
9 * per the PRD ownership ruling.
10 *
11 * @package Templately
12 */
13
14 namespace Templately\Modules\TemplateBrowsing;
15
16 use Templately\Core\Module_Base;
17 use Templately\Modules\TemplateBrowsing\REST\Categories;
18 use Templately\Modules\TemplateBrowsing\REST\Items;
19 use Templately\Modules\TemplateBrowsing\REST\Tags;
20 use Templately\Modules\TemplateBrowsing\REST\TemplateTypes;
21
22 class Module extends Module_Base {
23
24 public function get_name(): string {
25 return 'template-browsing';
26 }
27
28 public function get_dependencies(): array {
29 // items/favourite + items/rating delegate to the shared permission chain that
30 // auth's session state feeds; auth must be booted first (spec 017 contract).
31 return [ 'auth' ];
32 }
33
34 public function register_rest_routes(): void {
35 Items::get_instance()->register_routes();
36 Categories::get_instance()->register_routes();
37 Tags::get_instance()->register_routes();
38 TemplateTypes::get_instance()->register_routes();
39 }
40 }
41