From aa40a581f950dd5c12b422e83b0e0cf8aa2ff953 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 3 Sep 2026 00:06:58 -0400 Subject: [PATCH] fix(freemius): disarm update hijacking and rebrand to Heretek Control Core - Neutralize Freemius update hooks in class-freemius-abstract.php and class-fs-plugin-updater.php - Add admin_init cache purge for stale Freemius update notices on update-core.php - Rebrand plugin to Heretek Control Core: Unlocked Machine Rites - Update admin menu to Heretek AI and transform submenus (Cogitator Deck, Machine Rites, Noosphere Uplink, Cyber-Theurgy, STC Archives, Engram Memory, Canticle Library, Adept Doctrines) - Update app bar header to HERETEK CONTROL CORE with ARCH-HERETEK UNLOCKED badge - Update help menu to Omnissiah Archives and drawer to Vox Transmissions --- emcp-tools.php | 29 +++++++-- includes/admin/class-admin.php | 62 +++++++++---------- includes/admin/views/page-dashboard.php | 40 ++++++------ includes/admin/views/page-memory.php | 6 +- includes/admin/views/page-migrate.php | 8 +-- includes/admin/views/page-skills.php | 4 +- includes/class-github-updater.php | 2 +- .../includes/class-freemius-abstract.php | 4 +- .../includes/class-fs-plugin-updater.php | 7 ++- readme.txt | 8 +-- 10 files changed, 96 insertions(+), 74 deletions(-) diff --git a/emcp-tools.php b/emcp-tools.php index 6284ad3..eace9d8 100644 --- a/emcp-tools.php +++ b/emcp-tools.php @@ -1,8 +1,8 @@ 'pk_2b2a026d5c27655581635abcd4556', 'is_premium' => $emcp_tools_is_premium, 'premium_suffix' => 'Pro', - 'has_premium_version' => true, + 'has_premium_version' => false, 'has_addons' => false, - 'has_paid_plans' => true, + 'has_paid_plans' => false, 'is_org_compliant' => false, - 'has_affiliation' => 'selected', + 'has_affiliation' => false, 'menu' => array( 'slug' => 'emcp-tools', 'support' => false, @@ -225,6 +225,25 @@ if ( ! function_exists( 'emcp_tools_fs' ) ) { // Signal that SDK was initiated. do_action( 'emcp_tools_fs_loaded' ); + // Disarm any stale Freemius upsells cached in the WordPress update_plugins transient. + if ( is_admin() ) { + add_action( + 'admin_init', + static function () { + $updates = get_site_transient( 'update_plugins' ); + if ( is_object( $updates ) && isset( $updates->response[ EMCP_TOOLS_BASENAME ] ) ) { + $entry = $updates->response[ EMCP_TOOLS_BASENAME ]; + // If the update package is empty or points to Freemius checkout/license purchase, purge it + if ( empty( $entry->package ) || ( isset( $entry->url ) && false !== strpos( $entry->url, 'freemius' ) ) ) { + unset( $updates->response[ EMCP_TOOLS_BASENAME ] ); + set_site_transient( 'update_plugins', $updates ); + } + } + }, + 5 + ); + } + // Trim the Freemius-injected submenu items we surface elsewhere: Contact Us // (Help & Support lives in the plugin header), Affiliation (shown in the // header next to Changelog), and Pricing for licensed Pro users (free users diff --git a/includes/admin/class-admin.php b/includes/admin/class-admin.php index a0d3f65..1abaea0 100644 --- a/includes/admin/class-admin.php +++ b/includes/admin/class-admin.php @@ -175,23 +175,23 @@ class EMCP_Tools_Admin { private function get_submenus(): array { if ( null === $this->submenus ) { $this->submenus = array( - self::PAGE_SLUG => __( 'Dashboard', 'emcp-tools' ), - self::PAGE_SLUG . '-modules' => __( 'Modules', 'emcp-tools' ), - self::PAGE_SLUG . '-tools' => __( 'Tools', 'emcp-tools' ), - self::PAGE_SLUG . '-connection' => __( 'Connection', 'emcp-tools' ), - self::PAGE_SLUG . '-ai-chat' => __( 'AI Chat', 'emcp-tools' ), - self::PAGE_SLUG . '-context' => __( 'Context', 'emcp-tools' ), - self::PAGE_SLUG . '-redirects' => __( 'Redirects', 'emcp-tools' ), - self::PAGE_SLUG . '-migrate' => __( 'Backup & Migrate', 'emcp-tools' ), - self::PAGE_SLUG . '-memory' => __( 'Memory', 'emcp-tools' ), - self::PAGE_SLUG . '-prompts' => __( 'Prompts', 'emcp-tools' ), - self::PAGE_SLUG . '-templates' => __( 'Templates', 'emcp-tools' ), - self::PAGE_SLUG . '-brand-kits' => __( 'Brand Kits', 'emcp-tools' ), - self::PAGE_SLUG . '-skills' => __( 'Skills', 'emcp-tools' ), - self::PAGE_SLUG . '-widgets' => __( 'Sandbox', 'emcp-tools' ), + self::PAGE_SLUG => __( 'Cogitator Deck', 'emcp-tools' ), + self::PAGE_SLUG . '-modules' => __( 'Tech-Modules', 'emcp-tools' ), + self::PAGE_SLUG . '-tools' => __( 'Machine Rites', 'emcp-tools' ), + self::PAGE_SLUG . '-connection' => __( 'Noosphere Uplink', 'emcp-tools' ), + self::PAGE_SLUG . '-ai-chat' => __( 'Cyber-Theurgy', 'emcp-tools' ), + self::PAGE_SLUG . '-context' => __( 'Data-Vault', 'emcp-tools' ), + self::PAGE_SLUG . '-redirects' => __( 'Redirect Protocols', 'emcp-tools' ), + self::PAGE_SLUG . '-migrate' => __( 'STC Archives', 'emcp-tools' ), + self::PAGE_SLUG . '-memory' => __( 'Engram Memory', 'emcp-tools' ), + self::PAGE_SLUG . '-prompts' => __( 'Canticle Library', 'emcp-tools' ), + self::PAGE_SLUG . '-templates' => __( 'STC Blueprints', 'emcp-tools' ), + self::PAGE_SLUG . '-brand-kits' => __( 'Sanctified Visuals', 'emcp-tools' ), + self::PAGE_SLUG . '-skills' => __( 'Adept Doctrines', 'emcp-tools' ), + self::PAGE_SLUG . '-widgets' => __( 'Forge Sandbox', 'emcp-tools' ), self::PAGE_SLUG . '-marketplace' => __( 'Marketplace', 'emcp-tools' ), - self::PAGE_SLUG . '-mcp-log' => __( 'MCP Log', 'emcp-tools' ), - self::PAGE_SLUG . '-history' => __( 'History', 'emcp-tools' ), + self::PAGE_SLUG . '-mcp-log' => __( 'Canticle Log', 'emcp-tools' ), + self::PAGE_SLUG . '-history' => __( 'Chrono-Ledger', 'emcp-tools' ), self::PAGE_SLUG . '-changelog' => __( 'Changelog', 'emcp-tools' ), ); if ( ! $this->ai_chat_tab_visible() ) { @@ -1993,8 +1993,8 @@ class EMCP_Tools_Admin { */ public function add_settings_page(): void { $this->hook_suffixes[] = add_menu_page( - __( 'MCP Tools for Elementor', 'emcp-tools' ), - __( 'EMCP Tools', 'emcp-tools' ), + __( 'Heretek Control Core — Forbidden Machine Rites', 'emcp-tools' ), + __( 'Heretek AI', 'emcp-tools' ), 'manage_options', self::PAGE_SLUG, array( $this, 'render_page' ), @@ -3769,18 +3769,18 @@ class EMCP_Tools_Admin {
- - + + v
- + - + @@ -3798,19 +3798,19 @@ class EMCP_Tools_Admin { - HERETEK UNLOCKED + ARCH-HERETEK UNLOCKED
@@ -3819,14 +3819,14 @@ class EMCP_Tools_Admin { -