| @@ -11,8 +11,9 @@ | ||
| 11 | 11 | use Extendify\Agent\Controllers\ChatHistoryController; |
| 12 | 12 | use Extendify\Agent\Controllers\TourController; |
| 13 | 13 | use Extendify\Config; |
| 14 | 14 | use Extendify\Constants; |
| 15 | +use Extendify\Mcp\Profile as McpProfile; | |
| 15 | 16 | use Extendify\Shared\Services\Escaper; |
| 16 | 17 | use Extendify\Shared\Services\HttpClient; |
| 17 | 18 | use Extendify\Agent\TagBlocks; |
| 18 | 19 | use Extendify\Agent\TagTemplateParts; |
| @@ -17,9 +18,8 @@ | ||
| 17 | 18 | use Extendify\Agent\TagBlocks; |
| 18 | 19 | use Extendify\Agent\TagTemplateParts; |
| 19 | 20 | use Extendify\Agent\WooProductImages; |
| 20 | 21 | use Extendify\Agent\AbilitiesDiscovery; |
| 21 | -use Extendify\Agent\Controllers\SiteNavigationController; | |
| 22 | 22 | use Extendify\PartnerData; |
| 23 | 23 | use Extendify\Shared\DataProvider\ProductsData; |
| 24 | 24 | use Extendify\SiteVisibility; |
| 25 | 25 | |
| @@ -42,11 +42,8 @@ | ||
| 42 | 42 | // Tag blocks so we can identify them later |
| 43 | 43 | TagBlocks::init(); |
| 44 | 44 | TagTemplateParts::init(); |
| 45 | 45 | |
| 46 | - // Add the site navigation ids to the navigation blocks | |
| 47 | - SiteNavigationController::init(); | |
| 48 | - | |
| 49 | 46 | Skeleton::init(); |
| 50 | 47 | |
| 51 | 48 | WooProductImages::init(); |
| 52 | 49 | |
| @@ -75,9 +72,9 @@ | ||
| 75 | 72 | public function loadScriptsAndStyles() |
| 76 | 73 | { |
| 77 | 74 | // The Customizer preview iframe is a front-end render, so this fires |
| 78 | 75 | // there too — but the Agent only belongs on the live, top-level page. |
| 79 | - if (is_customize_preview()) { | |
| 76 | + if (is_customize_preview() || McpProfile::isOwnScreen()) { | |
| 80 | 77 | return; |
| 81 | 78 | } |
| 82 | 79 | |
| 83 | 80 | $version = constant('EXTENDIFY_DEVMODE') ? uniqid() : Config::$version; |
| @@ -119,8 +116,10 @@ | ||
| 119 | 116 | (bool) use_block_editor_for_post($this->getCurrentPostId()) : |
| 120 | 117 | false, |
| 121 | 118 | 'isOnEditorOrFSE' => $this->isGutenbergOrFse(), |
| 122 | 119 | 'activePlugins' => array_values(\get_option('active_plugins', [])), |
| 120 | + // The accessor also reads a key set by the IMAGIFY_API_KEY constant. | |
| 121 | + 'hasImagifyApiKey' => function_exists('get_imagify_option') && (bool) \get_imagify_option('api_key'), | |
| 123 | 122 | 'isUsingVibes' => version_compare((string) wp_get_theme('extendable')->get('Version'), '2.0.32', '>='), |
| 124 | 123 | 'siteTitle' => \esc_attr(\get_bloginfo('name')), |
| 125 | 124 | 'siteDescription' => \esc_attr(\get_bloginfo('description')), |
| 126 | 125 | 'themePresets' => $this->getThemePresets(), |
| @@ -176,10 +175,9 @@ | ||
| 176 | 175 | // For example, we could check whether their theme has variations. |
| 177 | 176 | 'abilities' => $abilities, |
| 178 | 177 | // Registered WordPress Abilities (6.9+) this user may run. |
| 179 | 178 | 'wpAbilities' => AbilitiesDiscovery::discover(), |
| 180 | - // List of suggestions the AI can make for this user. | |
| 181 | - // For example, we could check whether they need to set up a specific plugin. | |
| 179 | + // The domain card reads only the register-domain record. | |
| 182 | 180 | 'suggestions' => $this->getSuggestions(), |
| 183 | 181 | 'domainsSuggestionSettings' => [ |
| 184 | 182 | 'showPrimary' => (bool) PartnerData::setting('showPrimaryDomainRecommendationAgent'), |
| 185 | 183 | 'showSecondary' => (bool) PartnerData::setting('showSecondaryDomainRecommendationAgent'), |