Plugin.php
Source file: wordpress/hslg-app-api/src/Plugin.php
Module: wordpress-hslg-app-api
Size: 96 lines
SHA-256: 92c6a6804a65e04fa5c5400c5b81e4cd0e51e2b9dd72a5cc8f05c022d190c06a
Responsibility
Hosts independently deployable HSLG-owned API endpoints and schema operations on WordPress/MariaDB.
Declared entry points
Plugin— source line 18.names— source line 20.schema— source line 25.activate— source line 30.register— source line 38.stagingApiEnabled— source line 74.contentConfiguration— source line 77.admin— source line 87.
Imports and dependencies
- Line 4:
use Hslg\Backend\Database\TableNames; - Line 5:
use Hslg\Backend\Services\Venues\ListVenues; - Line 6:
use Hslg\WordPressApi\Database\SchemaInstaller; - Line 7:
use Hslg\WordPressApi\Database\WordPressVenueRepository; - Line 8:
use Hslg\WordPressApi\Database\WordPressCustomerAuthRepository; - Line 9:
use Hslg\WordPressApi\Database\WordPressCustomerRecordRepository; - Line 10:
use Hslg\WordPressApi\Database\WordPressOrderDraftRepository; - Line 11:
use Hslg\WordPressApi\Database\WordPressMenuPriceRepository; - Line 12:
use Hslg\WordPressApi\Content\ContentTypes; - Line 43:
require_once __DIR__ . '/controllers/FoundationController.php'; - Line 52:
require_once __DIR__ . '/controllers/AccountOrderController.php';
Behaviour and audit locations
- Line 36:
catch (\Throwable $error) { wp_die('HSLG API database setup failed. Check database permissions and the staging installation guide. No existing tables were deleted.'); } - Line 76:
/** Public endpoints only. Never return credentials or an admin-only URL. */ - Line 92:
foreach (['app_meta','venues','customer_records','customer_accounts','customer_sessions','account_challenges','auth_rate_limits','order_drafts','menu_prices','order_payme
Relationship to the system
This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.
Change verification
Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.