class Admin_RestRegisters clanbite/v1/admin/* routes.
class
- Full name
Kernowdev\Clanbite\Admin\Admin_Rest
Methods
__construct()Create the controller with the settings handlers it can read and save.add_messages_sub_tabs()Give each tab a **Messages** sub-tab holding the wording of the extensions it covers.attach_icon_pack_scope()Ensure each pack has a non-empty sanitized scope for the React admin.build_extensions_payload()Build the extension rows shown on the Extensions tab (status, dependencies, capabilities).build_tabs()Build the tab list for the React shell: General, Extensions, Groups, and one tab per top-level extension (sub-extensions are grouped under their parent via parent_slug).can_manage()Permission callback shared by every admin route.collect_bootstrap_icon_packs()Normalized icon packs for the unified admin (points + ranks starter SVGs, etc.).get_default_icon_picker_i18n()Default icon picker strings (REST bootstrap + localized script data).get_emergency_starter_packs_normalized()Last-resort starter packs built from companion plugin paths (skips clanbite_*_icon_packs filters).get_unified_icon_packs()Icon packs for the unified admin (same data as REST iconPacks).infer_icon_pack_scope_from_id()Guess an icon pack's scope (all, points, ranks) from its id when the pack does not declare one.normalize_bootstrap_icon_packs()Normalize icon pack rows for JSON (numeric keys → JS array; same rules as companion Icon_Packs::get_icon_packs).register_routes()Register the clanbite/v1/admin/* routes: bootstrap (read), settings save per option key, and installed-extensions save.require_companion_icon_pack_classes()Load companion Icon_Packs classes when the plugin constants exist but autoload missed them (REST vs admin edge cases).resolve_installable_requested_slugs()Reduce a requested extension list to slugs that can be enabled together in one save.rest_bootstrap()REST: everything the admin app needs on load (tabs, option schemas and values, extensions, icon packs).rest_save_extensions()REST: save which extensions are installed (dependencies are validated).rest_save_settings()REST: validate and save one settings bucket, returning the stored values.section_groups_for_extension_tree()Collect settings section groups for an extension and its descendants (parent_slug tree).sort_extensions_by_dependencies()Topological order by requires (dependencies before dependents), then slug.
Defined in inc/admin/class-admin-rest.php
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Updated. |