Clanbite Since 1.6.0

class License_Admin

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).

class final

Full name
Kernowdev\Clanbite\Updates\License_Admin

Constants

NameValueDescription
SLOT_ID'clanbite-license'
TAB_ID'license'

Methods

  • add_tab() Add the tab.
  • enqueue() Load the view script on the settings screen.
  • handle_activate() admin-post.php?action=clanbite_license_activate.
  • handle_deactivate() admin-post.php?action=clanbite_license_deactivate.
  • notice() Remind administrators to activate when add-ons are installed without a licence.
  • plugin_row() One row under the first add-on: a key field when the site is not activated, otherwise the licence state and a Deactivate link.
  • register_rows() Hook the inline licence row under each participating add-on (only the first one prints it).
  • register() Register hooks.
  • site_health_test() Site Health result.
  • site_health_tests() Site Health: is the licence set up and the server reachable?
  • url() URL of the Licence tab.

Defined in inc/updates/class-license-admin.php

Changelog

VersionDescription
1.6.0Introduced.