Classes 10

  • Compat_Guard clanbite
    The update server only offers compatible releases, but a server can be wrong, stale or compromised, so core checks again with the package it actually downloaded: it reads the headers of the **unpacked** main plugin file (which are covered by the release signature) and compares them with what is running on this site.
  • Compat_Monitor clanbite
    Updates to Clanbite itself come from wordpress.org (or an auto-update, or FTP) and the update server cannot gate them. This class is the safety net on the site: any plugin whose main file declares Requires Clanbite: is checked against the Clanbite that is actually installed, and when it does not fit it is **deactivated** (silently, so none of its code runs) instead of being left to fatal the site. It also covers the add-ons' other declared needs: Requires Clanbite Add-ons, Requires PHP and Requires at least.
  • Installer clanbite
    The "Available add-ons" list: asks the update server which extensions this site may install (all of them for an activated licence, only the free ones without a licence), and installs one through WordPress' normal plugin installer.
  • License_Admin clanbite
    Adds an integration tab (slotId License_Admin::SLOT_ID) whose view is assets/js/clanbite-license.js, mounted through the core admin's clanbite:admin-integration-mount event. The tab only appears when an add-on that uses the update server is installed (or the site is already activated).
  • License_Client clanbite
    One licence key per site owner unlocks every add-on they bought. This class activates the key for this site, keeps the activation token, asks for updates in a single batched request and requests the (single-use) download at the moment the administrator clicks Update.
  • License_Rest clanbite
    clanbite/v1/admin/license (read), …/activate, …/deactivate and …/refresh, for administrators only (same capability as the other clanbite/v1/admin/* routes, filter clanbite_admin_rest_manage_capability). The licence key is accepted on activate and is never returned.
  • Player_Card clanbite-social-kit
    GET clanbite-social-kit/v1/player-card/{id} returns ready-made card markup (the shared avatar with its XP ring and rank badge, the name, the rank and the progress), and assets/js/clanbite-player-card.js shows it next to any a.clanbite-mention–user link the pointer rests on. The script is loaded on every front-end page while @mentions are on; it does nothing until a mention is hovered.
  • Release_Signature clanbite
    Add-on releases are signed (Ed25519) in the release workflow with a key that never touches the update server, so even a compromised server cannot make a site install code it did not sign. The signed message is clanbite-release-v1 \n slug \n version \n sha256, where the SHA-256 is computed locally from the file that was downloaded.
  • Updater clanbite
    An add-on takes part by carrying an Update URI header on the update server's host, for example Update URI: https://services.clanbite.com/clanbite-points. WordPress then skips wordpress.org for it (so nobody can hijack the slug there) and asks the update_plugins_{host} filter instead.
  • Version_Constraint clanbite
    The small constraint language used in plugin headers (Requires Clanbite: ^1.5.0):

Functions 5

Hooks 16

Methods 83

REST API 7