/
home
/
altere25
/
.trash
/
wp-to-sanity-companion.1
/
/home/altere25/.trash/wp-to-sanity-companion.1
mkdir
upload
Name
Size
Mode
Actions
assets/
-
0755
rm
includes/
-
0755
rm
templates/
-
0755
rm
assets\css\admin.css
7611
0644
edit
dl
rm
assets\js\admin.js
8534
0644
edit
dl
rm
assets\js\claude-connect.js
6502
0644
edit
dl
rm
includes\class-ad-admin.php
26374
0644
edit
dl
rm
includes\class-ad-ai-client.php
8153
0644
edit
dl
rm
includes\class-ad-auth.php
9189
0644
edit
dl
rm
includes\class-ad-cli.php
8669
0644
edit
dl
rm
includes\class-ad-extractor.php
12210
0644
edit
dl
rm
includes\class-ad-mcp.php
6429
0644
edit
dl
rm
includes\class-ad-plugin-core.php
7947
0644
edit
dl
rm
includes\class-ad-progress.php
8022
0644
edit
dl
rm
includes\class-ad-rest.php
31008
0644
edit
dl
rm
includes\class-ad-uninstall.php
1924
0644
edit
dl
rm
includes\class-ad-webhook.php
14854
0644
edit
dl
rm
templates\admin\claude-connect.php
5152
0644
edit
dl
rm
templates\admin\dashboard.php
10457
0644
edit
dl
rm
templates\admin\export.php
16570
0644
edit
dl
rm
templates\admin\log.php
10849
0644
edit
dl
rm
templates\admin\onboarding-v2.php
3827
0644
edit
dl
rm
templates\admin\onboarding.php
10714
0644
edit
dl
rm
templates\admin\progress.php
2443
0644
edit
dl
rm
templates\admin\schema-preview.php
5213
0644
edit
dl
rm
uninstall.php
365
0644
edit
dl
rm
wp-to-sanity-companion.php
4467
0644
edit
dl
rm
Edit:
/home/altere25/.trash/wp-to-sanity-companion.1/templates\admin\claude-connect.php
(5152B)
<?php /** * Altered Digital Migration — Claude Connect page (Phase D5) * * Post-completion card that hands the customer a ready-to-paste MCP config * for Claude Desktop. The customer: * 1. Creates a scoped Sanity token in Sanity Manage → API → Tokens * 2. Pastes it here → we forward to the Worker, which stores it separately * from the migration write token * 3. Copies the generated claude_desktop_config.json snippet (or clicks the * "Open in Claude Desktop" deep-link) * 4. Runs any of the starter prompts to clean up / explore their migrated * content conversationally * * The token is revocable from this same page without affecting migrations. * * @package AlteredDigitalMigration */ if (!defined('ABSPATH')) { exit; } /** @var AD_Plugin_Core $ad_core */ $ad_core = AD_Plugin_Core::instance(); $tenant_id = $ad_core->setting('tenant_id', ''); $service_url = $ad_core->setting('service_url', ''); $has_tenant = !empty($tenant_id) && !empty($service_url); ?> <div class="wrap ad-claude-connect"> <h1><?php echo esc_html__('Claude Connect', 'altered-digital'); ?></h1> <p class="ad-cc-intro"> <?php esc_html_e('Drive your migrated Sanity content through Claude Desktop chat — no GROQ, no Studio. Ask Claude to fix alt text, clean up slugs, find missing images, or rewrite any block. Altered Digital generates the connection config for you.', 'altered-digital'); ?> </p> <?php if (!$has_tenant): ?> <div class="notice notice-warning"> <p><?php esc_html_e('Connect to the Altered Digital service first (Altered Digital → Connect) to enable Claude Connect.', 'altered-digital'); ?></p> </div> <?php else: ?> <!-- Step 1: mint --> <div class="ad-card ad-cc-step" id="ad-cc-mint"> <h2><?php esc_html_e('1. Create a Sanity token', 'altered-digital'); ?></h2> <p> <?php printf( /* translators: 1: link to Sanity manage, 2: link label */ esc_html__('Open %1$sSanity Manage%2$s → API → Tokens and create a token with read + write access to your dataset. Copy the token value.', 'altered-digital'), '<a href="https://www.sanity.io/manage" target="_blank" rel="noopener">', '</a>' ); ?> </p> <label class="ad-cc-label" for="ad-cc-token-input"><?php esc_html_e('Paste your Sanity token:', 'altered-digital'); ?></label> <div class="ad-cc-token-row"> <input type="password" id="ad-cc-token-input" class="regular-text" autocomplete="off" placeholder="sk…"> <button type="button" class="button button-primary" id="ad-cc-mint-btn"><?php esc_html_e('Connect Claude', 'altered-digital'); ?></button> </div> <p class="description"><?php esc_html_e('This token is stored separately from your migration token. You can revoke it any time without affecting in-flight migrations.', 'altered-digital'); ?></p> </div> <!-- Step 2: config --> <div class="ad-card ad-cc-step ad-cc-hidden" id="ad-cc-config"> <h2><?php esc_html_e('2. Add to Claude Desktop', 'altered-digital'); ?></h2> <p><?php esc_html_e('Either click the deep-link (fastest) or paste this into your Claude Desktop config file:', 'altered-digital'); ?></p> <div class="ad-cc-actions"> <a class="button button-primary" id="ad-cc-deeplink" href="#" target="_blank" rel="noopener"> <?php esc_html_e('Open in Claude Desktop', 'altered-digital'); ?> </a> <button type="button" class="button" id="ad-cc-copy-btn"><?php esc_html_e('Copy config JSON', 'altered-digital'); ?></button> <span class="ad-cc-copy-msg" id="ad-cc-copy-msg"></span> </div> <pre class="ad-cc-snippet" id="ad-cc-snippet"></pre> <div class="ad-cc-revoke-row"> <button type="button" class="button button-link-delete" id="ad-cc-revoke-btn"><?php esc_html_e('Revoke Claude connection', 'altered-digital'); ?></button> <span class="ad-cc-revoke-msg" id="ad-cc-revoke-msg"></span> </div> </div> <!-- Step 3: starter prompts --> <div class="ad-card ad-cc-step ad-cc-hidden" id="ad-cc-prompts"> <h2><?php esc_html_e('3. Try these prompts in Claude', 'altered-digital'); ?></h2> <p><?php esc_html_e('Once Claude Desktop is connected, paste any of these to get started:', 'altered-digital'); ?></p> <ul class="ad-cc-prompt-list" id="ad-cc-prompt-list"></ul> </div> <!-- loading / error states --> <div class="ad-card ad-cc-hidden" id="ad-cc-loading"> <p class="ad-cc-loading-text"><?php esc_html_e('Loading your Claude config…', 'altered-digital'); ?></p> </div> <div class="ad-card ad-cc-hidden" id="ad-cc-error"> <p class="ad-cc-error-text"></p> </div> <?php endif; ?> </div>
Save
cmd:
run