';
if ( (int) $reading['total'] > 0 ) {
printf(
/* translators: %s: number of content pages read by AI crawlers, wrapped in a large-figure span. */
esc_html__( 'In the last 30 days, your site was read by AI %s times.', 'ailys-lens' ),
'' . esc_html( number_format_i18n( (int) $reading['content'] ) ) . '' // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- 内部生成のspan+エスケープ済み数値。
);
} else {
echo '' . esc_html__( 'Your site has not been read by AI yet.', 'ailys-lens' ) . '';
echo '
' . esc_html__( 'This can simply mean crawlers have not arrived yet — or that they are blocked. Check below.', 'ailys-lens' ) . '
' . esc_html__( 'Notes on measurement', 'ailys-lens' ) . '
';
echo '
' . esc_html__( 'If a full-page cache plugin (WP Super Cache, etc.) serves a request, PHP does not run and the hit cannot be counted. Counts shown here are a lower bound.', 'ailys-lens' ) . '
';
echo '
' . esc_html__( '"Verified" means the visit was confirmed to originate from the claimed vendor, via its published IP ranges or reverse DNS. Unverified hits matched the user agent string only, which can be spoofed.', 'ailys-lens' ) . '
';
printf(
/* translators: %s: date (YYYY-MM-DD) of the bundled IP-range snapshot. */
esc_html__( 'Verification IP ranges: snapshot as of %s, bundled with the plugin (no external fetching). Newer vendor ranges are picked up via plugin updates.', 'ailys-lens' ),
esc_html( $ranges->snapshotDate() )
);
echo '
';
}
echo '
' . esc_html__( 'Only AI crawler visits are recorded. Human visitors are never tracked, and no data leaves your server.', 'ailys-lens' ) . '
';
}
/**
* クローラー脚注の翻訳可能テキスト(英語原文・日本語はja.po訳)。
*
* 内容は crawlers.json の note と技術的事実を一致させたもの(表示用の
* i18nレイヤー。データ側のnoteは変更しない)。未収載IDはnullを返し、
* 呼び出し側が note 原文にフォールバックする。
*
* @param string $crawler_id クローラーID。
*/
private static function footnote_text( string $crawler_id ): ?string {
$anthropic = __( 'Anthropic began publishing IP ranges on 2026-08-18. A single combined list covers all three of its crawlers, so a verified hit confirms the request came from Anthropic, not which crawler it was. No rDNS domains are published.', 'ailys-lens' );
$notes = array(
'claudebot' => $anthropic,
'claude-searchbot' => $anthropic,
'claude-user' => $anthropic,
'perplexity-user' => __( 'Perplexity officially states that user-initiated fetches generally ignore robots.txt.', 'ailys-lens' ),
'googleother' => __( 'A general-purpose Google crawler whose uses include research and development. AI training use is included but cannot be singled out. GoogleOther-Image and GoogleOther-Video also match this pattern.', 'ailys-lens' ),
'applebot' => __( 'Crawler for Siri, Spotlight, and other Apple search features. Whether fetched content may be used for AI training is controlled by the Applebot-Extended token in robots.txt.', 'ailys-lens' ),
'meta-externalagent' => __( 'Meta does not publish rDNS domains or IP ranges for verification.', 'ailys-lens' ),
'meta-webindexer' => __( 'Crawler used to improve the quality of Meta AI search results (confirmed in official documentation as of 2026).', 'ailys-lens' ),
'meta-externalfetcher' => __( 'User-initiated fetching, including agent-style task execution.', 'ailys-lens' ),
'amazonbot' => __( 'Amazon officially states it may be used to train Amazon AI models (search-only crawling is Amzn-SearchBot). The published IP list format is unconfirmed, so range data is not bundled.', 'ailys-lens' ),
'amzn-searchbot' => __( 'Officially stated to be for search indexing only (not used for generative AI training). A new crawler as of 2026; its verification method is still to be confirmed.', 'ailys-lens' ),
'amzn-user' => __( 'User-initiated real-time fetching. A new crawler as of 2026; its verification method is still to be confirmed.', 'ailys-lens' ),
'ccbot' => __( 'A non-profit web archive whose data is used by many AI companies for training. IP ranges have been published since 2026-08-11; Common Crawl also recommends forward-confirmed reverse DNS.', 'ailys-lens' ),
'bytespider' => __( 'No official documentation exists, and robots.txt compliance is widely reported as unreliable. No verification method.', 'ailys-lens' ),
'duckassistbot' => __( 'Real-time fetching for AI-assisted answers (DuckAssist). DuckDuckGo states the data is not used for training.', 'ailys-lens' ),
'mistralai-index' => __( 'Index crawler for Mistral search (officially stated not to be used for training).', 'ailys-lens' ),
);
return $notes[ $crawler_id ] ?? null;
}
/**
* カテゴリ表示ラベル(3分類はプロダクトの語り口の核、仕様書§3.3)。
*
* @return array
*/
private static function category_labels(): array {
return array(
'training' => array(
'label' => __( 'Training', 'ailys-lens' ),
'desc' => __( 'Collected to train AI models', 'ailys-lens' ),
),
'search_index' => array(
'label' => __( 'AI search index', 'ailys-lens' ),
'desc' => __( 'Indexed for AI search results', 'ailys-lens' ),
),
'user_fetch' => array(
'label' => __( 'User fetch', 'ailys-lens' ),
'desc' => __( 'Fetched live to answer a question', 'ailys-lens' ),
),
);
}
}