| Server IP : 108.167.142.43 / Your IP : 216.73.216.223 Web Server : Apache System : Linux gator4174.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : delarice ( 2406) PHP Version : 8.3.36 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home2/delarice/public_html/wp-content/plugins/templately/modules/library-tour/ |
Upload File : |
<?php
/**
* Library tour module (spec 036-library-tour).
*
* Relocated: includes/API/Tour.php (the REST controller — 3 endpoints:
* GET tour/status, POST tour/complete, POST tour/reset) +
* react-src/app/components/new-components/tour/ (9-file React component
* tree: LibraryTour, DetailTour, TourTooltip, TourContext, TourMenuItem,
* TourShortcutListener, useTourShortcut, tourSteps, index barrel).
* Namespace: Templately\API\Tour -> Templately\Modules\LibraryTour\REST\Tour.
*
* No boot-ordering fix needed: Tour::get_instance() was eagerly instantiated
* in Plugin::apis() (during plugins_loaded) purely to self-register into the
* platform-adapter Platform_Registry::add($this, 'API') registry — a registration that
* Plugin::register_routes() already skips for any Templately\Modules\* class
* (see that method's own skip-comment). The eager call was simply removed;
* this module's register_rest_routes() wires the real route registration on
* rest_api_init via Module_Base::boot_rest_routes(), the same lazy pattern
* every module-owned REST class uses (013-035) — no autoloader-timing hazard
* for a class only ever resolved at rest_api_init.
*
* JS ships inside the main bundle (LibraryTour/DetailTour/TourMenuItem/
* TourProvider/TourShortcutListener are all statically imported from
* App.js, NewItemDetails.js, UserNavigation.js, and
* modules/template-browsing's TemplatesTypeLayout.js — not a lazy module
* route), matching the established precedent from specs 034/035 for
* main-bundle features: no webpack.config.partial.js, no attachReducer/
* runSaga (this feature has no Redux state at all — TourContext is a plain
* React context).
*
* @package Templately
*/
namespace Templately\Modules\LibraryTour;
use Templately\Core\Module_Base;
use Templately\Modules\LibraryTour\REST\Tour;
class Module extends Module_Base {
public function get_name(): string {
return 'library-tour';
}
public function register_rest_routes(): void {
Tour::get_instance()->register_routes();
}
}