class SkeletonExtension skeleton.
This skeleton outlines the requirements for an extension for the Clanbite plugin. All extensions will need to extend this class.
When validation fails, this class throws \InvalidArgumentException with translatable strings (text domain clanbite) so messages can be localized if misconfiguration surfaces in admin or other user-visible error UIs; the primary audience remains extension authors constructing subclasses in PHP.
class
- Full name
Kernowdev\Clanbite\Extensions\Skeleton
Constants
| Name | Value | Description |
|---|---|---|
DEFAULT_REQUIRES_CLANBITE_VERSION | '1.0.0' | Default minimum Clanbite version for extensions that are not core-bundled when none is declared. |
Methods
__construct()Sets up our extension loader.can_install_with_slugs()Whether this extension may be enabled when a given set of slugs is treated as installed.can_install()Whether this extension may be enabled against currently stored install options.delete_data()Delete extension data from the configured data store.get_data()Read extension data from the configured data store.get_requires_clanbite_version()Minimum Clanbite version this extension needs (empty = no check; core-bundled only).get_settings_admin()Admin settings UI for this extension, if any (unified Clanbite React tabs).meets_clanbite_version_requirement()Whether the running Clanbite core satisfies Skeleton::get_requires_clanbite_version().register_extension_block_types_from_metadata_collection()Register all block types under a compiled subdirectory using WordPress metadata collection (6.8+).register_extension_blocks()Register one or more block directories for this extension.register_extension_templates()Register one or more FSE block templates owned by this extension.register_extension()Register extension.run_installer()Runs first-party or custom install logic for this extension.run_uninstaller()Removes extension-scoped data from the extension data store and fires uninstall hooks.run_updater()Runs when the stored extension version is lower than the class version.run()Main entry point after the extension is installed and requirements pass.set_data()Persist extension data in the configured data store.setup_extension()Setup and validate extension values.validate_name()Validate extension name.validate_parent_slug()Validate parent slug.validate_requires_clanbite()Validate minimum Clanbite core version (empty = use default for non-core extensions).validate_requires()Validate requirements array.validate_slug()Validate slug.validate_version()Validate version string.
Defined in inc/extensions/class-extension-skeleton.php