CC Prism Highlighter
CC Prism Highlighter is a lightweight WordPress plugin that conditionally loads Prism.js syntax highlighting only on singular posts or pages that contain Prism-compatible code blocks.prism Highlighter
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/cclintw/cc-prism-highlighter/archive/refs/heads/main.zipReadme
CC Prism Highlighter
CC Prism Highlighter is a lightweight WordPress plugin that conditionally loads Prism.js syntax highlighting only on singular posts or pages that contain Prism-compatible code blocks.
It is designed for technical articles, tutorials, documentation websites, developer notes, and long-form posts that include code examples.
Features
- Detects
<pre><code class="language-xxx">code blocks - Loads Prism.js assets only when needed
- Supports common languages such as HTML, CSS, JavaScript, PHP, Python, SQL, CSV, Git, and HTTP
- Includes line numbers, toolbar, show-language, and copy-to-clipboard support through the bundled Prism build
- Provides a clean custom code block style
- Translation ready with the
cc-prism-highlightertext domain
Usage
<pre><code class="language-php">
echo 'Hello World';
</code></pre>
Installation
- Upload the plugin folder
cc-prism-highlighterto/wp-content/plugins/ - Activate the plugin in WordPress admin
- Add Prism-compatible code blocks to posts or pages
- View the post or page on the frontend
Third-Party Libraries
This plugin bundles Prism.js.
- Prism.js: https://prismjs.com/
- License: MIT
- License file:
assets/LICENSE-PrismJS.txt
Changelog
1.0.0
- Initial release