PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 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 All 203 releases
betterdocs / react-src / gutenberg / docs-ai / index.js

index.js in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/gutenberg/docs-ai/index.js

18 lines 535 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { addFilter } from "@wordpress/hooks";
2 import apiFetch from "@wordpress/api-fetch";
3 import { withSuggestTerms } from "./SuggestTerms";
4
5 const config = window.betterdocsDocsAI || {};
6
7 // Authenticate REST calls (the endpoint uses the standard wp_rest nonce).
8 if ( config.nonce ) {
9 apiFetch.use( apiFetch.createNonceMiddleware( config.nonce ) );
10 }
11
12 // Inject "Suggest Categories / Tags" into the native taxonomy panels.
13 addFilter(
14 "editor.PostTaxonomyType",
15 "betterdocs/docs-ai-suggest-terms",
16 withSuggestTerms
17 );
18