{"id":355969,"date":"2026-08-25T22:02:49","date_gmt":"2026-08-25T22:02:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/stodum-code-block\/"},"modified":"2026-08-25T22:02:40","modified_gmt":"2026-08-25T22:02:40","slug":"kodosvet-code-block","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/kodosvet-code-block\/","author":23486086,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.1","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Kodosvet Code Block","header_author":"kotophalk","header_description":"Lightweight Gutenberg code block with Highlight.js syntax highlighting and legacy block migrator.","assets_banners_color":"1c1e20","last_updated":"2026-08-25 22:02:40","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/kotophalk\/kodosvet-code-block","header_author_uri":"https:\/\/delosvod.ru\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":39,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.0":{"tag":"1.1.0","author":"kotophalk","date":"2026-08-25 22:02:40"}},"upgrade_notice":{"1.1.0":"<p>Plugin renamed to Kodosvet Code Block for the WordPress.org directory. No data migration needed; existing blocks keep working.<\/p>","1.0.9":"<p>Plugin Check clean-up before WordPress.org submission, migrator preview title fix, prefixed Highlight.js handles. Safe to upgrade.<\/p>","1.0.8":"<p>Highlight.js is now bundled locally \u2014 no more external CDN requests. Safe to upgrade; no data migration needed.<\/p>","1.0.7":"<p>Important fixes: block alignment support (wide\/full), migration now creates revisions for safe rollback, all UI strings are now translatable.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3666032,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3666032,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3666032,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3666032,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3666032,"resolution":"1","location":"assets","locale":"","width":2560,"height":1600},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3666032,"resolution":"2","location":"assets","locale":"","width":2560,"height":1600},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3666032,"resolution":"3","location":"assets","locale":"","width":2560,"height":1600},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3666032,"resolution":"4","location":"assets","locale":"","width":2560,"height":1600},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3666032,"resolution":"5","location":"assets","locale":"","width":2560,"height":1600}},"screenshots":{"1":"Code blocks on the frontend: Atom One Dark palette, language badge, line-numbers \/ theme \/ copy buttons in the toolbar.","2":"Block editor: the block selected, Language and Title settings in the sidebar.","3":"Tools \u2192 Kodosvet Code Block: scan results of the legacy block migrator.","4":"Light mode with line numbers turned on \u2014 one click switches every block on the page.","5":"Migrator preview modal: original <code>core\/code<\/code> markup vs. the converted <code>stodum\/code-block<\/code>."}},"plugin_section":[],"plugin_tags":[1214,24363,2275,148076,4609],"plugin_category":[],"plugin_contributors":[261921],"plugin_business_model":[],"class_list":["post-355969","plugin","type-plugin","status-publish","hentry","plugin_tags-code","plugin_tags-code-block","plugin_tags-developer","plugin_tags-gutenberg","plugin_tags-syntax-highlighting","plugin_contributors-kotophalk","plugin_committers-kotophalk"],"banners":{"banner":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/banner-772x250.png?rev=3666032","banner_2x":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/banner-1544x500.png?rev=3666032","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/icon-128x128.png?rev=3666032","icon_2x":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/icon-256x256.png?rev=3666032","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/screenshot-1.png?rev=3666032","caption":"Code blocks on the frontend: Atom One Dark palette, language badge, line-numbers \/ theme \/ copy buttons in the toolbar."},{"src":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/screenshot-2.png?rev=3666032","caption":"Block editor: the block selected, Language and Title settings in the sidebar."},{"src":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/screenshot-3.png?rev=3666032","caption":"Tools \u2192 Kodosvet Code Block: scan results of the legacy block migrator."},{"src":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/screenshot-4.png?rev=3666032","caption":"Light mode with line numbers turned on \u2014 one click switches every block on the page."},{"src":"https:\/\/ps.w.org\/kodosvet-code-block\/assets\/screenshot-5.png?rev=3666032","caption":"Migrator preview modal: original <code>core\/code<\/code> markup vs. the converted <code>stodum\/code-block<\/code>."}],"raw_content":"<!--section=description-->\n<p>Kodosvet Code Block is a zero-bloat Gutenberg block for displaying code with syntax highlighting powered by Highlight.js.<\/p>\n\n<p><strong>Key Features:<\/strong><\/p>\n\n<ul>\n<li><strong>Native Gutenberg Block<\/strong> \u2014 Full support for the visual editor with Server-Side Rendering.<\/li>\n<li><strong>14 Color Themes<\/strong> \u2014 Atom One, GitHub, Monokai, Dracula, Nord, VS Code, Stack Overflow, Night Owl, Gruvbox, Solarized, Panda, Tomorrow Night, Shades of Purple, Tokyo Night.<\/li>\n<li><strong>Smart Language Detection<\/strong> \u2014 Automatic language identification using multi-layered heuristics for PHP, Bash, JavaScript, SQL, JSON, XML, and more.<\/li>\n<li><strong>Swift Guard<\/strong> \u2014 Prevents Highlight.js from misidentifying code as Swift.<\/li>\n<li><strong>Dark\/Light Toggle<\/strong> \u2014 Switch all code blocks on the page between dark and light themes with one click.<\/li>\n<li><strong>Copy to Clipboard<\/strong> \u2014 One-click code copying with visual feedback.<\/li>\n<li><strong>Line Numbers<\/strong> \u2014 Toggleable line number gutter.<\/li>\n<li><strong>Legacy Migrator<\/strong> \u2014 Built-in tool to scan and convert old <code>core\/code<\/code> and <code>core\/preformatted<\/code> blocks.<\/li>\n<li><strong>Zero Bloat<\/strong> \u2014 Assets are loaded only when a code block is present on the page.<\/li>\n<li><strong>No jQuery<\/strong> \u2014 Pure Vanilla JS on the frontend.<\/li>\n<\/ul>\n\n<p><strong>Migrator Tool:<\/strong><\/p>\n\n<p>Navigate to <strong>Tools \u2192 Kodosvet Code Block<\/strong> to scan your site for legacy code blocks and migrate them to the modern Kodosvet format with a before\/after preview.<\/p>\n\n<h3>Third-Party Libraries<\/h3>\n\n<p>Syntax highlighting is powered by <a href=\"https:\/\/highlightjs.org\/\">Highlight.js<\/a> 11.11.1, bundled locally in <code>vendor\/hljs\/<\/code> (core build + 22 theme stylesheets). Highlight.js is licensed under the BSD-3-Clause License; the unminified source is available at <a href=\"https:\/\/github.com\/highlightjs\/highlight.js\">github.com\/highlightjs\/highlight.js<\/a>. No external requests are made at runtime.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>kodosvet-code-block<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>In the Block Editor, search for \"Kodosvet\" to insert a code block.<\/li>\n<li>Configure default theme and color palette under <strong>Tools \u2192 Kodosvet Code Block<\/strong>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20require%20any%20build%20tools%3F\"><h3>Does this plugin require any build tools?<\/h3><\/dt>\n<dd><p>No. Kodosvet Code Block ships as vanilla JavaScript and CSS \u2014 no Node.js, webpack, or build step required.<\/p><\/dd>\n<dt id=\"how%20does%20the%20language%20auto-detection%20work%3F\"><h3>How does the language auto-detection work?<\/h3><\/dt>\n<dd><p>The plugin uses a multi-layer approach:\n1. Explicit language selection in block settings (highest priority).\n2. Markdown fence detection (```language).\n3. First-line language markers.\n4. Smart heuristics for PHP, Bash, JavaScript, SQL, and other languages.\n5. Highlight.js auto-detection (with Swift Guard to prevent false positives).<\/p><\/dd>\n<dt id=\"can%20i%20migrate%20my%20existing%20code%20blocks%3F\"><h3>Can I migrate my existing code blocks?<\/h3><\/dt>\n<dd><p>Yes! Go to <strong>Tools \u2192 Kodosvet Code Block<\/strong> and click <strong>Scan Posts<\/strong>. The migrator will find all posts with <code>core\/code<\/code> or <code>core\/preformatted<\/code> blocks and let you preview and migrate them individually or in bulk.<\/p><\/dd>\n<dt id=\"does%20migration%20create%20revisions%3F\"><h3>Does migration create revisions?<\/h3><\/dt>\n<dd><p>Yes. The migrator uses <code>wp_update_post()<\/code>, so WordPress creates a revision for each migrated post. You can roll back through the standard Revisions interface.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20delete%20the%20plugin%3F\"><h3>What happens when I delete the plugin?<\/h3><\/dt>\n<dd><p>The plugin removes its settings (theme preference and color palette) from the database. Your code block content remains in the posts as Gutenberg block comments.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Renamed: plugin is now \"Kodosvet Code Block\" (slug <code>kodosvet-code-block<\/code>). Internal identifiers (block name <code>stodum\/code-block<\/code>, option names, CSS classes) are unchanged so existing content keeps working.<\/li>\n<li>Removed: bundled translation files and <code>load_plugin_textdomain()<\/code> \u2014 translations are handled by translate.wordpress.org.<\/li>\n<li>Changed: <code>register_setting()<\/code> sanitize callbacks use <code>sanitize_key()<\/code> + strict whitelist comparison.<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Fixed: Migrator preview modal showed \"undefined (undefined blocks)\" instead of the post title and block count.<\/li>\n<li>Fixed: Missing translator comments and unescaped output flagged by Plugin Check; <code>$wpdb-&gt;prepare()<\/code> call inlined.<\/li>\n<li>Changed: Highlight.js script\/style handles are now prefixed (<code>stodum-hljs-*<\/code>) to avoid clashes with other plugins.<\/li>\n<li>Changed: Block title now has a small gap from the brand label in the toolbar.<\/li>\n<li>Added: <code>Author URI<\/code>, <code>License URI<\/code>, LICENSE file for the bundled Highlight.js, \"Third-Party Libraries\" section in readme.<\/li>\n<li>Added: JS translation JSON for the block editor (<code>wp i18n make-json<\/code>); POT\/ru_RU refreshed.<\/li>\n<li>Tested up to WordPress 7.0.<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>Changed: Highlight.js is now bundled locally (vendor\/hljs\/). CDN dependency removed. Plugin is now fully self-contained and compatible with WordPress.org guidelines.<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Fixed: Block now uses <code>get_block_wrapper_attributes()<\/code> for proper wide\/full alignment support.<\/li>\n<li>Fixed: Migrator creates revisions via <code>wp_update_post()<\/code>.<\/li>\n<li>Fixed: Migrate All AJAX array serialization.<\/li>\n<li>Fixed: All editor strings now translatable.<\/li>\n<li>Added: <code>uninstall.php<\/code> for clean removal.<\/li>\n<li>Removed: Debug console.log output.<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Fixed: Complete rewrite of editor language detection with working Smart Heuristics.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Added: Smart Language Heuristics for PHP, Bash, JavaScript.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Fixed: Swift Auto-Detect Guard for Highlight.js 11+.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Fixed: Data attribute naming mismatch and regex lastIndex bug.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Fixed: Strict language mapping and <code>data-stodum-lang<\/code> signal.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Added: Global markdown paste interceptor.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Lightweight Gutenberg code block with Highlight.js syntax highlighting, smart language detection, and a built-in legacy block migrator.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/355969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=355969"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/kotophalk"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=355969"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=355969"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=355969"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=355969"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=355969"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=355969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}