PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.2
4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 All 200 releases
← All changes | includes/Insights/Collector.php +21 -0 4.6.14.9.2 View file →
@@ -264,8 +264,21 @@
264 264 */
265 265 protected function ai() {
266 266 $settings = betterdocs()->settings;
267 267
268 + // `show_glossary_suggestions` defaults to true and has no settings-UI field, so
269 + // reporting it raw would mark every Free-only site as "using" a feature it can
270 + // never run. Mirror the runtime gate in Core\WriteWithAI: the glossaries taxonomy
271 + // is registered for Pro only, so the "Suggest glossaries" offer is reachable only
272 + // when the glossary feature is on AND Pro is active. Do NOT "simplify" this back
273 + // to a bare setting read. ($has_glossary_terms from the runtime gate is
274 + // deliberately excluded — that is per-request content state, not config posture.)
275 + $glossary_suggestions = (int) (
276 + (bool) $settings->get( 'enable_glossaries', false )
277 + && (bool) $settings->get( 'show_glossary_suggestions', true )
278 + && betterdocs()->is_pro_active()
279 + );
280 +
268 281 return [
269 282 'write_with_ai' => (int) (bool) $settings->get( 'enable_write_with_ai', false ),
270 283 'article_summary' => (int) (bool) $settings->get( 'enable_article_summary', false ),
271 284 'chatbot' => (int) (bool) $settings->get( 'enable_ai_chatbot', false ),
@@ -272,8 +285,12 @@
272 285 'autowrite_key_set' => (int) ! empty( $settings->get( 'ai_autowrite_api_key', '' ) ),
273 286 'chatbot_key_set' => (int) ! empty( $settings->get( 'ai_chatbot_api_key', '' ) ),
274 287 'write_with_ai_model' => (string) $settings->get( 'write_with_ai_model', '' ),
275 288 'article_summary_model' => (string) $settings->get( 'article_summary_model', '' ),
289 + // AI adoption toggles introduced with the 4.6.3 AI surfaces.
290 + 'sample_docs' => (int) (bool) $settings->get( 'enable_ai_sample_docs', true ),
291 + 'docs_ai_suite' => (int) (bool) $settings->get( 'enable_docs_ai_suite', true ),
292 + 'glossary_suggestions' => $glossary_suggestions,
276 293 // Per-feature usage counts (how many times each AI action ran). All keys
277 294 // always present (default 0); see Utils\AIUsage for the recording side.
278 295 'usage' => \WPDeveloper\BetterDocs\Utils\AIUsage::snapshot(),
279 296 ];
@@ -290,7 +307,11 @@
290 307 'permalink_structure' => (string) $settings->get( 'permalink_structure', '' ),
291 308 'reporting_frequency' => (string) $settings->get( 'reporting_frequency', '' ),
292 309 'posts_number' => (int) $settings->get( 'posts_number', 0 ),
293 310 'column_number' => (int) $settings->get( 'column_number', 0 ),
311 + // Analytics Overview (4.6.3) posture — key-set booleans only, never secrets.
312 + 'ga4_configured' => (int) ! empty( $settings->get( 'ga4_api_secret', '' ) ),
313 + 'geoip_configured' => (int) ! empty( $settings->get( 'maxmind_license_key', '' ) ),
314 + 'dark_mode' => (int) (bool) $settings->get( 'dark_mode', false ),
294 315 ];
295 316 }
296 317 }