mirror of
https://github.com/Heretek-AI/heretek-control-core.git
synced 2026-10-12 02:03:55 +00:00
feat(themes): wire Blocksy Pro integration (blocks + extensions)
Loads the Blocksy Pro classes via the Pro-Loader, adds them to pro-manifest.txt, registers the two integrations in the Themes loop, adds a "Blocksy" admin card + theme_tool_slugs entries + availability helpers, and seeds the two write dispatchers disabled-by-default (DEFAULTS_VERSION 30->31). Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
cddaf7373e
commit
767ae75fac
@@ -337,6 +337,13 @@ class EMCP_Tools_Ability_Registrar {
|
||||
if ( class_exists( 'EMCP_Tools_GenerateBlocks_Integration' ) ) {
|
||||
$theme_integrations[] = new EMCP_Tools_GenerateBlocks_Integration();
|
||||
}
|
||||
// Blocksy (Pro): blocks + Companion extensions.
|
||||
if ( class_exists( 'EMCP_Tools_Blocksy_Blocks_Integration' ) ) {
|
||||
$theme_integrations[] = new EMCP_Tools_Blocksy_Blocks_Integration();
|
||||
}
|
||||
if ( class_exists( 'EMCP_Tools_Blocksy_Extensions_Integration' ) ) {
|
||||
$theme_integrations[] = new EMCP_Tools_Blocksy_Extensions_Integration();
|
||||
}
|
||||
foreach ( $theme_integrations as $theme_integration ) {
|
||||
if ( $theme_integration->is_available() ) {
|
||||
$theme_integration->register();
|
||||
|
||||
@@ -1000,7 +1000,7 @@ class EMCP_Tools_Admin {
|
||||
*
|
||||
* @since 1.8.0
|
||||
*/
|
||||
const DEFAULTS_VERSION = 30;
|
||||
const DEFAULTS_VERSION = 31;
|
||||
|
||||
/**
|
||||
* SEO/A11y Pro MCP tool slugs that ship disabled-by-default (v2 defaults).
|
||||
@@ -1307,6 +1307,10 @@ class EMCP_Tools_Admin {
|
||||
'emcp-tools/generatepress-write',
|
||||
'emcp-tools/generateblocks-read',
|
||||
'emcp-tools/generateblocks-write',
|
||||
'emcp-tools/blocksy-blocks-read',
|
||||
'emcp-tools/blocksy-blocks-write',
|
||||
'emcp-tools/blocksy-extensions-read',
|
||||
'emcp-tools/blocksy-extensions-write',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1511,6 +1515,12 @@ class EMCP_Tools_Admin {
|
||||
$add[] = 'emcp-tools/generateblocks-write';
|
||||
}
|
||||
|
||||
// v31 — Blocksy write dispatchers disabled-by-default.
|
||||
if ( $applied < 31 ) {
|
||||
$add[] = 'emcp-tools/blocksy-blocks-write';
|
||||
$add[] = 'emcp-tools/blocksy-extensions-write';
|
||||
}
|
||||
|
||||
$merged = array_values( array_unique( array_merge( $existing, $add ) ) );
|
||||
update_option( self::OPTION_DISABLED_TOOLS, $merged );
|
||||
update_option( self::OPTION_DEFAULTS_APPLIED, (string) self::DEFAULTS_VERSION );
|
||||
@@ -3286,6 +3296,28 @@ class EMCP_Tools_Admin {
|
||||
return class_exists( 'EMCP_Tools_GenerateBlocks_Catalog' ) && EMCP_Tools_GenerateBlocks_Catalog::is_active();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the Blocksy blocks integration's tools are available (Blocksy
|
||||
* Companion active; Pro).
|
||||
*
|
||||
* @since 3.9.1
|
||||
* @return bool
|
||||
*/
|
||||
public static function blocksy_blocks_available(): bool {
|
||||
return class_exists( 'EMCP_Tools_Blocksy_Blocks_Catalog' ) && EMCP_Tools_Blocksy_Blocks_Catalog::is_active();
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the Blocksy extensions integration's tools are available (the Blocksy
|
||||
* ExtensionsManager exists; Pro).
|
||||
*
|
||||
* @since 3.9.1
|
||||
* @return bool
|
||||
*/
|
||||
public static function blocksy_extensions_available(): bool {
|
||||
return class_exists( '\\Blocksy\\ExtensionsManager' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the WooCommerce integration's tools are available (WooCommerce
|
||||
* installed and active).
|
||||
@@ -4758,6 +4790,45 @@ class EMCP_Tools_Admin {
|
||||
),
|
||||
),
|
||||
),
|
||||
'theme_blocksy' => array(
|
||||
'platform' => 'themes',
|
||||
'label' => __( 'Blocksy', 'emcp-tools' ),
|
||||
'note' => __( 'Blocksy (Pro): its dynamic content blocks (query/tax-query loops, dynamic-data, about-me, socials, share-box, breadcrumbs, …) and its Blocksy Companion extensions (activate/deactivate). Enabled when Blocksy Companion is active. Theme settings are reachable via the free Active Theme tools (theme-read/theme-write).', 'emcp-tools' ),
|
||||
'tools' => array(
|
||||
'emcp-tools/blocksy-blocks-read' => array(
|
||||
'label' => __( 'Blocksy Blocks Read', 'emcp-tools' ),
|
||||
'description' => __( 'Catalog of the Blocksy blocks (list-blocks) and each block\'s attributes (get-block-schema).', 'emcp-tools' ),
|
||||
'badges' => array( 'read-only', 'pro' ),
|
||||
'operations' => array( 'list-blocks', 'get-block-schema' ),
|
||||
'available' => self::blocksy_blocks_available(),
|
||||
'unavailable_note' => __( 'Install & activate Blocksy Companion to enable this tool.', 'emcp-tools' ),
|
||||
),
|
||||
'emcp-tools/blocksy-blocks-write' => array(
|
||||
'label' => __( 'Blocksy Blocks Write', 'emcp-tools' ),
|
||||
'description' => __( 'Insert a Blocksy block into a post (add-block); query/tax-query get a scaffolded template child.', 'emcp-tools' ),
|
||||
'badges' => array( 'pro' ),
|
||||
'operations' => array( 'add-block' ),
|
||||
'available' => self::blocksy_blocks_available(),
|
||||
'unavailable_note' => __( 'Install & activate Blocksy Companion to enable this tool.', 'emcp-tools' ),
|
||||
),
|
||||
'emcp-tools/blocksy-extensions-read' => array(
|
||||
'label' => __( 'Blocksy Extensions Read', 'emcp-tools' ),
|
||||
'description' => __( 'List Blocksy Companion extensions with name, description, pro flag, and active status (list-extensions).', 'emcp-tools' ),
|
||||
'badges' => array( 'read-only', 'pro' ),
|
||||
'operations' => array( 'list-extensions' ),
|
||||
'available' => self::blocksy_extensions_available(),
|
||||
'unavailable_note' => __( 'Install & activate Blocksy Companion to enable this tool.', 'emcp-tools' ),
|
||||
),
|
||||
'emcp-tools/blocksy-extensions-write' => array(
|
||||
'label' => __( 'Blocksy Extensions Write', 'emcp-tools' ),
|
||||
'description' => __( 'Activate or deactivate a Blocksy Companion extension by slug.', 'emcp-tools' ),
|
||||
'badges' => array( 'pro' ),
|
||||
'operations' => array( 'activate-extension', 'deactivate-extension' ),
|
||||
'available' => self::blocksy_extensions_available(),
|
||||
'unavailable_note' => __( 'Install & activate Blocksy Companion to enable this tool.', 'emcp-tools' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
'page' => array(
|
||||
'platform' => 'elementor',
|
||||
'label' => __( 'Page Management', 'emcp-tools' ),
|
||||
|
||||
@@ -67,6 +67,10 @@ final class EMCP_Tools_Pro_Loader {
|
||||
'includes/blocks-catalog/class-generateblocks-catalog.php',
|
||||
'includes/abilities/class-generatepress-integration.php',
|
||||
'includes/abilities/class-generateblocks-integration.php',
|
||||
// Blocksy theme integration (Pro): blocks + Companion extensions.
|
||||
'includes/blocks-catalog/class-blocksy-blocks-catalog.php',
|
||||
'includes/abilities/class-blocksy-blocks-integration.php',
|
||||
'includes/abilities/class-blocksy-extensions-integration.php',
|
||||
'includes/class-skill-catalog.php',
|
||||
'includes/abilities/class-skill-abilities.php',
|
||||
'includes/class-page-snapshot-pro.php',
|
||||
|
||||
+1
-1
Submodule pro updated: 0a7a236c16...239e8f685b
@@ -67,3 +67,6 @@ includes/abilities/seo/class-surerank-integration.php
|
||||
includes/blocks-catalog/class-generateblocks-catalog.php
|
||||
includes/abilities/class-generatepress-integration.php
|
||||
includes/abilities/class-generateblocks-integration.php
|
||||
includes/blocks-catalog/class-blocksy-blocks-catalog.php
|
||||
includes/abilities/class-blocksy-blocks-integration.php
|
||||
includes/abilities/class-blocksy-extensions-integration.php
|
||||
|
||||
Reference in New Issue
Block a user