Despite two plugins already on wordpress.org I decided to write my own from scratch. The result is a minimalistic but powerful plugin with only ~250 lines of PHP.
- Supports every possible Prism configuration.
- Adds TinyMCE dropdown lost for
<code class="language-xxx"> and <pre class="language-xxx">for bash, css, js, markup, php, scss. (I can make a filter if you want to add more.)
- Does not load prism on every page, only when needed.
- Supports automatic detection of prism HTML.
- Supports displaying code from custom fields with
- Developers may use the
prismhandle to enqueue the pre-registered script and style.
- Has admin editor button for quick shortcode template snippet.
- Has no options page by design.
- Read more -> Prism Syntax Highlighter for WordPress
Bundled Prism Version (2016-09-17)
- Sass (Scss)
- Line Highlight
- Line Numbers
- WebPlatform Docs
- Show Language
No idea how.
- Will the data mining ever end?
What data mining?
Contributors & Developers
“Prism Syntax Highlighter for WordPress” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
1.1.0 — 2016-09-18
- Updated bundled prism.js.
- Added quotes to the shortcode included with the buttin click.
- Always scan archives, abodon the define switch.
- Added TinyMCE dropdown styles to style
<pre>tags with language-xxx classes.
- Added SVG icon for plugin installer
- Updated bundled Prism version
- Fix: Missing data-manual output
- Improved: WTFAQ
- Fix: Screenshots