ExtraChill API Plugin Core

Singleton Bootstrap

  • ExtraChill_API_Plugin::get_instance() loads the plugin once and keeps all REST routes centralized.
  • Constructor loads every PHP file within inc/routes/ via RecursiveIteratorIterator so each endpoint can self-register.
  • Hooks:
    • plugins_loadedboot() includes cross-domain auth helper and fires extrachill_api_bootstrap for integrators.
    • rest_api_initregister_routes() fires extrachill_api_register_routes, giving every route file a single action to latch onto.

Autoloading

  • plugins_loadedboot() includes cross-domain auth helper and fires extrachill_api_bootstrap for integrators.
  • rest_api_initregister_routes() fires extrachill_api_register_routes, giving every route file a single action to latch onto.

Cross-Domain Auth Helper

  • plugins_loadedboot() includes cross-domain auth helper and fires extrachill_api_bootstrap for integrators.
  • rest_api_initregister_routes() fires extrachill_api_register_routes, giving every route file a single action to latch onto.

Shop Operations

Centralized endpoints for the artist marketplace on shop.extrachill.com.

  • Composer autoloader is loaded if vendor/autoload.php exists to expose third-party libraries (Endroid QR Code).
  • Constants EXTRACHILL_API_PATH and EXTRACHILL_API_URL allow other modules to resolve assets relative to the plugin location.