{"id":369166,"date":"2026-09-16T09:14:44","date_gmt":"2026-09-16T09:14:44","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/nahnu-code-api-block\/"},"modified":"2026-09-18T03:55:01","modified_gmt":"2026-09-18T03:55:01","slug":"nahnu-code-block","status":"publish","type":"plugin","link":"https:\/\/arg.wordpress.org\/plugins\/nahnu-code-block\/","author":14745143,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"1.0.1","tested":"7.1.1","requires":"6.3","requires_php":"7.4","requires_plugins":null,"header_name":"Nahnu Code & API Block","header_author":"Ja1me4","header_description":"A standalone block suite for developer documentation: syntax-highlighted code snippets plus API-doc blocks (endpoints, parameters, request\/response examples, status codes, auth, and a live try-it console) \u2014 with light\/dark mode, a collapsible preview, and one-click copy throughout.","assets_banners_color":"19283e","last_updated":"2026-09-18 03:55:01","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/www.nahnuplugins.com\/wordpress-plugins\/","header_author_uri":"https:\/\/www.nahnuplugins.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":74,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"ja1me4","date":"2026-09-16 12:47:08","revision":3698600},"1.0.1":{"tag":"1.0.1","author":"ja1me4","date":"2026-09-18 03:55:01","revision":3701270}},"upgrade_notice":{"1.0.1":"<p>Six new blocks (Response Body, Error Codes, Events, API Navigation, Servers, plus a significantly expanded Parameters block), deep-link anchors, and a security fix. No breaking changes.<\/p>","1.0.0":"<p>First public WP.org version.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3698225,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3698225,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3698225,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3698225,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"nahnu-code-block\/request-response":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/request-response","title":"API Request \/ Response","category":"widgets","icon":"controls-repeat","description":"Tabbed request and response code examples per language, synced across every request\/response block on the page.","keywords":["api","request","response","example","tabs"],"textdomain":"nahnu-code-block","attributes":{"showLineNumbers":{"type":"boolean","default":true},"examples":{"type":"array","default":[{"language":"bash","label":"cURL","requestCode":"curl -X GET https:\/\/api.example.com\/v1\/resource \n  -H \"Authorization: Bearer YOUR_API_KEY\"","responseCode":"{\n  \"id\": \"123\",\n  \"status\": \"ok\"\n}"},{"language":"javascript","label":"JavaScript","requestCode":"const res = await fetch('https:\/\/api.example.com\/v1\/resource', {\n  headers: { Authorization: 'Bearer YOUR_API_KEY' }\n});\nconst data = await res.json();","responseCode":"{\n  \"id\": \"123\",\n  \"status\": \"ok\"\n}"}]}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/servers":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/servers","title":"API Servers","category":"widgets","icon":"cloud","description":"List an API's base URLs \u2014 production, sandbox, regional endpoints \u2014 each with a label and a copy button. Maps onto OpenAPI's 'servers' array.","keywords":["api","servers","base url","environment","documentation"],"textdomain":"nahnu-code-block","attributes":{"title":{"type":"string","default":"Base URL"},"servers":{"type":"array","default":[{"url":"https:\/\/api.example.com\/v1","description":"Production"}]}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/response-body":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/response-body","title":"API Response Body","category":"widgets","icon":"editor-code","description":"Show what an API endpoint actually returns: a 'Returns' description, response headers, and one or more real response bodies grouped by status code, each expandable with its own copy button and an optional 'Show Schema' toggle for the type shape.","keywords":["api","response","body","returns","schema","headers","documentation"],"textdomain":"nahnu-code-block","attributes":{"title":{"type":"string","default":"Response Body"},"returns":{"type":"string","default":"Returns the resource if the request succeeded."},"showLineNumbers":{"type":"boolean","default":true},"responses":{"type":"array","default":[{"status":"200","contentType":"application\/json","body":"{\n  \"id\": \"123\",\n  \"status\": \"ok\"\n}","schema":[{"name":"id","type":"string","required":true,"description":"Unique identifier."},{"name":"status","type":"string","required":true,"description":"Current status."}],"headers":[]}]}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/endpoint":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/endpoint","title":"API Endpoint","category":"widgets","icon":"rest-api","description":"Show an API endpoint's HTTP method, path, a short summary, and a longer description \u2014 with an optional deprecation notice and an auth-required indicator.","keywords":["api","endpoint","rest","documentation"],"textdomain":"nahnu-code-block","attributes":{"method":{"type":"string","default":"GET"},"path":{"type":"string","default":"\/v1\/resource"},"summary":{"type":"string","default":""},"description":{"type":"string","default":""},"version":{"type":"string","default":""},"deprecated":{"type":"boolean","default":false},"deprecatedNote":{"type":"string","default":""},"authRequired":{"type":"boolean","default":false},"operationId":{"type":"string","default":""},"relatedOperations":{"type":"array","default":[]}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/api-navigation":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/api-navigation","title":"API Navigation","category":"widgets","icon":"menu","description":"Auto-generates a jump-list of every Endpoint block on this page \u2014 no manual list to keep in sync. Scans this page only, not your whole site.","keywords":["api","navigation","endpoints","jump list","documentation"],"textdomain":"nahnu-code-block","attributes":{"title":{"type":"string","default":"Endpoints on this page"},"showDeprecated":{"type":"boolean","default":true}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/parameters":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/parameters","title":"API Parameters","category":"widgets","icon":"list-view","description":"A parameters table for API documentation: name, type, location, format, default value, example value, allowed values, validation constraints, nullable, read-only\/write-only, required\/optional, deprecated, description, nested object fields, and linkable type references. Can also act as a named, linkable schema definition itself.","keywords":["api","parameters","table","documentation","schema"],"textdomain":"nahnu-code-block","attributes":{"title":{"type":"string","default":"Parameters"},"schemaName":{"type":"string","default":""},"parameters":{"type":"array","default":[{"name":"id","type":"string","required":true,"description":"The unique identifier of the resource.","format":"","default":"","example":"","typeRef":"","location":"path","deprecated":false,"enum":"","minimum":"","maximum":"","pattern":"","nullable":false,"readOnly":true,"writeOnly":false,"children":[]},{"name":"address","type":"object","required":false,"description":"The customer's address.","format":"","default":"","example":"","typeRef":"","location":"query","deprecated":false,"enum":"","minimum":"","maximum":"","pattern":"","nullable":false,"readOnly":false,"writeOnly":false,"children":[{"name":"line1","type":"string","required":false,"description":"Address line 1.","format":"","default":"","example":"","typeRef":"","location":"query","deprecated":false,"enum":"","minimum":"","maximum":"","pattern":"","nullable":false,"readOnly":false,"writeOnly":false},{"name":"city","type":"string","required":false,"description":"City.","format":"","default":"","example":"","typeRef":"","location":"query","deprecated":false,"enum":"","minimum":"","maximum":"","pattern":"","nullable":false,"readOnly":false,"writeOnly":false}]}]}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/try-it":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/try-it","title":"API Try It Console","category":"widgets","icon":"controls-play","description":"A live request console visitors can use to call your API directly from their browser and see the real response.","keywords":["api","try it","console","playground","documentation"],"textdomain":"nahnu-code-block","attributes":{"method":{"type":"string","default":"GET"},"url":{"type":"string","default":"https:\/\/api.example.com\/v1\/resource"},"headers":{"type":"string","default":"Authorization: Bearer YOUR_API_KEY"},"body":{"type":"string","default":""},"warningText":{"type":"string","default":"This sends a real request, from your browser, directly to the URL below. It does not go through this site's server."}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/code-block":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/code-block","title":"Nahnu Code Block","category":"widgets","icon":"editor-code","description":"A professional, syntax-highlighted code snippet block with light\/dark mode, a collapsible preview, a copy button, and a full-code modal.","keywords":["code","snippet","syntax highlighting","prism"],"textdomain":"nahnu-code-block","attributes":{"code":{"type":"string","default":""},"language":{"type":"string","default":"markup"},"title":{"type":"string","default":""},"showLineNumbers":{"type":"boolean","default":true},"collapsedLines":{"type":"number","default":12},"allowThemeToggle":{"type":"boolean","default":true},"viewAllBackgroundColor":{"type":"string","default":""},"viewAllTextColor":{"type":"string","default":""}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js","editorStyle":"file:.\/editor.css"},"nahnu-code-block\/status-codes":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/status-codes","title":"API Status Codes","category":"widgets","icon":"warning","description":"A table of HTTP status codes your API returns, with meaning, description, and an optional example body.","keywords":["api","status","http","codes","documentation"],"textdomain":"nahnu-code-block","attributes":{"title":{"type":"string","default":"Response Codes"},"statuses":{"type":"array","default":[{"code":"200","meaning":"OK","description":"The request succeeded.","example":""},{"code":"400","meaning":"Bad Request","description":"The request was malformed.","example":""},{"code":"401","meaning":"Unauthorized","description":"Missing or invalid credentials.","example":""}]}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/events":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/events","title":"API Events","category":"widgets","icon":"megaphone","description":"List the webhook\/event names a resource can emit (e.g. customer.created), each with a description and an optional example payload.","keywords":["api","events","webhooks","documentation"],"textdomain":"nahnu-code-block","attributes":{"title":{"type":"string","default":"Events"},"events":{"type":"array","default":[{"name":"customer.created","description":"Occurs whenever a new customer is created.","example":"{\n  \"id\": \"evt_1\",\n  \"type\": \"customer.created\",\n  \"data\": {\n    \"id\": \"cus_1\",\n    \"email\": \"jane@example.com\"\n  }\n}"}]}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/auth":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/auth","title":"API Authentication","category":"widgets","icon":"lock","description":"Show how to authenticate against an API: bearer token, API key, basic auth, or OAuth 2.0.","keywords":["api","auth","authentication","token","documentation"],"textdomain":"nahnu-code-block","attributes":{"scheme":{"type":"string","default":"bearer"},"headerName":{"type":"string","default":"Authorization"},"placeholder":{"type":"string","default":"YOUR_API_KEY"},"description":{"type":"string","default":"Include this header on every request."}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"},"nahnu-code-block\/error-codes":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"nahnu-code-block\/error-codes","title":"API Error Codes","category":"widgets","icon":"dismiss","description":"Document your API's error types and codes (e.g. invalid_request_error \/ parameter_missing) \u2014 distinct from HTTP status codes, which are transport-level.","keywords":["api","errors","error codes","documentation"],"textdomain":"nahnu-code-block","attributes":{"title":{"type":"string","default":"Errors"},"description":{"type":"string","default":""},"errors":{"type":"array","default":[{"type":"invalid_request_error","code":"parameter_missing","description":"A required parameter was not provided.","example":"{\n  \"error\": {\n    \"type\": \"invalid_request_error\",\n    \"code\": \"parameter_missing\",\n    \"message\": \"Missing required parameter: email.\",\n    \"param\": \"email\"\n  }\n}"}]}},"supports":{"html":false,"align":["wide","full"]},"editorScript":"file:.\/index.js"}},"tagged_versions":["1.0.0","1.0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3698225,"resolution":"1","location":"assets","locale":"","width":1600,"height":762},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3698225,"resolution":"2","location":"assets","locale":"","width":1600,"height":762},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3698225,"resolution":"3","location":"assets","locale":"","width":1600,"height":762},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3698225,"resolution":"4","location":"assets","locale":"","width":1600,"height":762}},"screenshots":{"1":"An Endpoint block and a code block together on a documentation page.","2":"The \"View all code\" modal, opened from a collapsed code block.","3":"The Try It Console alongside Authentication, Endpoint, and Parameters blocks.","4":"Editing an Endpoint block's settings in the block editor."}},"plugin_section":[],"plugin_tags":[281022,24363,148076,23853,4609],"plugin_category":[],"plugin_contributors":[267678],"plugin_business_model":[],"class_list":["post-369166","plugin","type-plugin","status-publish","hentry","plugin_tags-api-documentation","plugin_tags-code-block","plugin_tags-gutenberg","plugin_tags-rest-api","plugin_tags-syntax-highlighting","plugin_contributors-ja1me4","plugin_committers-ja1me4"],"banners":{"banner":"https:\/\/ps.w.org\/nahnu-code-block\/assets\/banner-772x250.png?rev=3698225","banner_2x":"https:\/\/ps.w.org\/nahnu-code-block\/assets\/banner-1544x500.png?rev=3698225","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/nahnu-code-block\/assets\/icon-128x128.png?rev=3698225","icon_2x":"https:\/\/ps.w.org\/nahnu-code-block\/assets\/icon-256x256.png?rev=3698225","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/nahnu-code-block\/assets\/screenshot-1.png?rev=3698225","caption":"An Endpoint block and a code block together on a documentation page."},{"src":"https:\/\/ps.w.org\/nahnu-code-block\/assets\/screenshot-2.png?rev=3698225","caption":"The \"View all code\" modal, opened from a collapsed code block."},{"src":"https:\/\/ps.w.org\/nahnu-code-block\/assets\/screenshot-3.png?rev=3698225","caption":"The Try It Console alongside Authentication, Endpoint, and Parameters blocks."},{"src":"https:\/\/ps.w.org\/nahnu-code-block\/assets\/screenshot-4.png?rev=3698225","caption":"Editing an Endpoint block's settings in the block editor."}],"raw_content":"<!--section=description-->\n<p>Nahnu Code &amp; API Block gives the block editor everything a developer-facing site needs to document code and APIs: a polished syntax-highlighted code block, and a matching family of blocks purpose-built for API reference pages \u2014 endpoints, parameter tables, tabbed request\/response examples, status code tables, authentication headers, and a live try-it console.<\/p>\n\n<p><strong>The code block<\/strong><\/p>\n\n<ul>\n<li>Syntax highlighting for 20+ languages, powered by Prism.js and bundled with the plugin (no external CDN requests).<\/li>\n<li>Automatic light\/dark mode: follows the visitor's OS preference, and can also follow a dark-mode class or attribute your theme or another plugin already sets on <code>&lt;html&gt;<\/code> or <code>&lt;body&gt;<\/code> (filterable).<\/li>\n<li>An optional per-block toggle button so visitors can flip a single code block between light and dark themes manually.<\/li>\n<li>Long snippets collapse to a configurable preview height with a \"View all code\" button that opens the complete snippet in a modal.<\/li>\n<li>One-click Copy button, optional line numbers.<\/li>\n<\/ul>\n\n<p><strong>The API-documentation blocks<\/strong><\/p>\n\n<ul>\n<li><strong>Endpoint<\/strong> \u2014 HTTP method badge, path, a short summary plus an optional longer description, version badge, an optional deprecation notice, an \"Auth Required\" indicator, an \"Operation ID\" for a stable deep-link anchor, a \"See also\" list of related endpoints, and a copy-link icon for deep-linking directly to this endpoint.<\/li>\n<li><strong>Parameters<\/strong> \u2014 a name \/ type \/ location (query, path, header, cookie, body) \/ format \/ default value \/ example value \/ allowed values \/ validation range and pattern \/ nullable \/ read-only or write-only \/ required-optional \/ deprecated \/ description table, with support for nested object parameters (e.g. an <code>address<\/code> parameter with its own <code>line1<\/code>, <code>city<\/code>, etc.), linkable type references (e.g. \"array of <strong>ProgramResponseDto<\/strong>\" linking to another Parameters block set up as that named schema), and a copy-link icon on each row for deep-linking to a specific parameter.<\/li>\n<li><strong>Request \/ Response<\/strong> \u2014 tabbed code examples per language (cURL, JavaScript, Python, PHP, and more), each with Request and Response sub-tabs. Language selection is synced and remembered across every Request\/Response block on the same page.<\/li>\n<li><strong>Response Body<\/strong> \u2014 a \"Returns\" description, optional response headers shown as a persistent table, and one or more real response bodies grouped by status code, shown as an expandable accordion with syntax highlighting and its own copy button per response. An optional \"Show Schema\" toggle switches a response between its real example and a lightweight type-shape table. Complements the Status Codes block: Status Codes is the quick-scan summary table, Response Body is the rich single-response view.<\/li>\n<li><strong>Status Codes<\/strong> \u2014 a table of the HTTP status codes your API returns, color-coded by class (2xx\/3xx\/4xx\/5xx), with an optional collapsible example response body.<\/li>\n<li><strong>Authentication<\/strong> \u2014 shows the exact header a client needs to send (Bearer token, API key, Basic auth, or OAuth 2.0), with a copy button.<\/li>\n<li><strong>Try It Console<\/strong> \u2014 a live request form visitors can edit (URL, headers, body) and send directly from their own browser to see a real response. This performs a genuine client-side request; it never proxies or issues the call from your WordPress server.<\/li>\n<li><strong>Error Codes<\/strong> \u2014 document your API's error types and codes (e.g. <code>invalid_request_error<\/code> \/ <code>parameter_missing<\/code>), distinct from HTTP status codes, each with an optional expandable example error body.<\/li>\n<li><strong>Events<\/strong> \u2014 list the webhook\/event names a resource can emit (e.g. <code>customer.created<\/code>), each with a description, an optional expandable example payload, and a copy-link icon.<\/li>\n<li><strong>API Navigation<\/strong> \u2014 auto-generates a jump-list of every Endpoint block on the current page. No manual list to keep in sync as you add or reorder endpoints; scans this page only, never your whole site.<\/li>\n<li><strong>Servers<\/strong> \u2014 list an API's base URLs (production, sandbox, regional) each with a label and a copy button. Maps onto OpenAPI's <code>servers<\/code> array, including server variable templating like <code>{region}<\/code>.<\/li>\n<\/ul>\n\n<p>All blocks share the same visual language and the same light\/dark theming, so a full API reference page looks consistent throughout.<\/p>\n\n<h4>External services and data<\/h4>\n\n<p>Nahnu Code &amp; API Block does not connect to any external service, API, or CDN at runtime, and does not collect, transmit, or store any personal data. The Prism.js syntax-highlighting library is bundled with the plugin files (MIT licensed) rather than loaded from a third-party server. The Try It Console block is the one exception worth being explicit about: when a site visitor clicks \"Send request\" on that block, their own browser makes a direct HTTP request to whatever URL is shown in that block (which the page author configured, and the visitor can edit). That request comes from the visitor's browser, not from your WordPress server, and nothing about it is seen by this plugin's author or by Nahnu.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>nahnu-code-block<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install the plugin through the <strong>Plugins \u2192 Add New<\/strong> screen in your WordPress admin.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> screen.<\/li>\n<li>Edit any post or page, add a new block, and search for \"Nahnu\" to see the full set of code and API blocks.<\/li>\n<li>Configure each block from its sidebar settings.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20send%20my%20code%20anywhere%3F\"><h3>Does this send my code anywhere?<\/h3><\/dt>\n<dd><p>No. Everything is rendered on your own server and in the visitor's browser. The plugin makes no external network requests, with the one exception noted above for the Try It Console, which is a request the visitor themselves chooses to send.<\/p><\/dd>\n<dt id=\"will%20this%20conflict%20with%20my%20theme%27s%20or%20another%20plugin%27s%20dark%20mode%20switcher%3F\"><h3>Will this conflict with my theme's or another plugin's dark mode switcher?<\/h3><\/dt>\n<dd><p>It's designed to cooperate rather than compete. By default it follows the visitor's OS-level light\/dark preference. You can also use the <code>nahnu_code_block_dark_mode_selectors<\/code> filter to tell it which CSS selector your existing dark-mode plugin toggles (for example <code>body.dark-mode<\/code>), so the code block switches along with the rest of your site.<\/p><\/dd>\n<dt id=\"can%20i%20integrate%20my%20own%20dark-mode%20toggle%20with%20this%20plugin%3F\"><h3>Can I integrate my own dark-mode toggle with this plugin?<\/h3><\/dt>\n<dd><p>Yes. If your theme or plugin already sets a class or attribute for dark mode (like <code>body.dark-mode<\/code>), add it via the <code>nahnu_code_block_dark_mode_selectors<\/code> PHP filter and it works automatically, with no JavaScript required. If your toggle is JavaScript-driven, call <code>window.NahnuCodeBlock.setTheme('dark' | 'light' | 'auto')<\/code> from your own click handler. Full details, including how to rebrand the actual colors, are in <code>HOOKS.md<\/code> in the plugin folder.<\/p><\/dd>\n<dt id=\"can%20i%20change%20the%20syntax%20highlighting%20or%20table%20colors%3F\"><h3>Can I change the syntax highlighting or table colors?<\/h3><\/dt>\n<dd><p>Yes. All colors are exposed as CSS custom properties scoped to <code>.nahnu-code-block<\/code> (for example <code>--nahnu-code-block-token-string<\/code>), so they can be overridden from your theme's stylesheet without touching plugin files.<\/p><\/dd>\n<dt id=\"is%20the%20try%20it%20console%20safe%20to%20use%3F\"><h3>Is the Try It Console safe to use?<\/h3><\/dt>\n<dd><p>It only ever performs a request from the visitor's own browser to a URL you configure (and the visitor can see and edit before sending). It does not run on, or route through, your WordPress server, so it can't be used to make your server call arbitrary internal or external URLs.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20the%20classic%20editor%3F\"><h3>Does it work with the Classic Editor?<\/h3><\/dt>\n<dd><p>No. These are blocks for the block editor (Gutenberg).<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Added six new blocks: Response Body (status-code accordion with real response JSON), Error Codes (API-level error taxonomy, distinct from HTTP status codes), Events (webhook\/event names), API Navigation (auto-generated jump-list of Endpoint blocks on the page), and Servers (base URLs, maps onto OpenAPI's <code>servers<\/code> array).<\/li>\n<li>Parameters block: added Format and Default value badges, support for nested object parameters (e.g. an <code>address<\/code> parameter with its own <code>line1<\/code>\/<code>city<\/code> fields), parameter location (<code>query<\/code>\/<code>path<\/code>\/<code>header<\/code>\/<code>cookie<\/code>\/<code>body<\/code>, matching OpenAPI's <code>in<\/code> field), a per-parameter Deprecated flag, and an Allowed-values (<code>enum<\/code>) field.<\/li>\n<li>Added deep-linkable anchors: a copy-link icon on Parameters rows, Endpoint blocks, Error Codes, and Events, each generating a stable, page-unique URL you can share directly to that specific item.<\/li>\n<li>Added <code>nahnu_code_block_build_block_markup()<\/code> \u2014 lets another plugin (e.g. a docs platform importing an OpenAPI spec) generate any of this plugin's blocks programmatically, with correct WordPress block markup and sensible attribute defaults. Documented in the new <code>INTEGRATION.md<\/code>.<\/li>\n<li>Added the <code>nahnu_code_block_pre_attributes<\/code> filter, for third-party plugins that scan the page and inject their own UI into <code>&lt;pre&gt;<\/code> elements (with a real example for WP Super Docs, which was colliding with this plugin's own copy button and language label).<\/li>\n<li>Security: filter-derived theme CSS is now stripped of characters that could break out of the <code>&lt;style&gt;<\/code> element it's printed inside, following a WordPress.org review finding.<\/li>\n<li>Fixed the Copy button not correctly scoping to the clicked item when a block has multiple independent code panels open at once (surfaced by the new Response Body block's accordion).<\/li>\n<li>Fixed two buttons (Auth and Request\/Response) left referencing a CSS class removed during an earlier redesign, which meant they rendered with no styling at all.<\/li>\n<li>Fixed table titles on the Parameters and Status Codes blocks losing their styling after the same redesign.<\/li>\n<li>Corrected the Plugin URI in the plugin header, which pointed at a URL that didn't resolve.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First public WP.org version.<\/li>\n<\/ul>","raw_excerpt":"A block suite for developer documentation: syntax-highlighted code snippets plus a full set of API-documentation blocks.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/369166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=369166"}],"author":[{"embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ja1me4"}],"wp:attachment":[{"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=369166"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=369166"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=369166"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=369166"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=369166"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/arg.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=369166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}