| 开发者 | cr8vstacks |
|---|---|
| 更新时间 | 2026年6月1日 19:27 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
<pre> blocks and lets you apply LumiCode with one click, or dismiss<pre> blocks automatically on the frontend without touching your content<pre class="lumicode-pre"> elements in a beautiful VS Code–style chrome (titlebar, statusbar, line numbers, copy button) and runs highlight.js for syntax coloring.
No page builders required. Works with any theme.
Shortcode Usage
[lumicode lang="javascript"] const greeting = "Hello, world!"; console.log(greeting); [/lumicode]
All shortcode attributes:
lang — language identifier (e.g. php, python, typescript)title — filename shown in titlebar (e.g. config.js)highlight — lines to accent (e.g. 1,3-5)collapse — force collapse (true/false)collapse-after — collapse after N lines (overrides global setting)lumicode-syntax-highlighter folder through Plugins -> Add New -> Upload Plugin, or place it in your site's plugins directory.
— OR — install directly from the WordPress plugin search: Plugins → Add New → search "LumiCode"[lumicode lang="php"]...[/lumicode]Yes. LumiCode includes a native Gutenberg block. Search for "LumiCode" in the block inserter.
Yes. LumiCode adds an âš¡ Code button to the Classic Editor (TinyMCE) toolbar. Click it to open the Insert Code Block dialog with language detection, filename, highlight lines, and collapse options.
<pre> blocks?No. LumiCode's auto-detect mode wraps existing <pre> blocks on the frontend only — your database content is never modified. You can also use the Code Scanner (LumiCode → Code Scanner) to see what it finds and apply the design selectively.
All 13 built-in themes are bundled and available in Settings. Currently custom themes aren't supported.
LumiCode is designed for performance. highlight.js is served completely locally from your own server, eliminating third-party asset requests. Our own CSS + JS is under 15 KB combined, ensuring your site remains blazingly fast.
Yes. Per-block overrides work via shortcode attributes (lang, title, highlight, collapse, collapse-after) and via the TinyMCE dialog fields. Global defaults come from Settings.
Yes. LumiCode is purely frontend-rendered — there are no per-request PHP computations on the frontend. Works with WP Rocket, W3 Total Cache, LiteSpeed Cache, and any other caching plugin.
PHP 8.0 or higher. WordPress 6.0 or higher.
appearance property in dialog.<code>, <kbd>, <samp>, and <var>.service-row, service-row-1, and similar tokens render clearly in paragraphs and lists.#1e40af text color, and a matching blue border color scheme..lc-pw-lined when line numbers are on