WordPress plugin intelligence profile

Prism Syntax Highlighter (detached)

Adds Prism Syntax Highlighting to WordPress, using custom fields for your code examples.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.5
Current version1.5
WordPress coverageTested up to WordPress 3.5
Minimum stackWP 3.4.0 · PHP —
Directory statusactive
Last directory update30 Jul 201313y ago
Active installations10Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 3 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Prism Syntax Highlighter (detached) version 1.5 as active, updated 13y ago and tested up to WordPress 3.5.

Overview

About this plugin

Integrates the Prism Syntax Highlighting Library in WordPress.

It is called detached, since the code examples are not stuffed into the rich text editor, together with all the

other texts and content, but they are added separately as custom fields and just referenced via short tags (like footnotes).

Check Other Notes for usage documentation.

The official development repository is hosted on Github.

Usage

The basic procedure is:

  • Create a custom field and paste the code into it.
  • Insert the [prism...] shorttag in your code, where you want the code block to appear.

Shorttag

"]

  • key: the name of the custom field, which contains the code ( required )
  • language: the language to highlight
  • line: highlighted lines (for syntax, check the offical docs )
  • line_offset: the offset, with which the line numbering should start
  • post: if you want to include a code piece of another post, you can explicitly specify the post id here

Cached Assets loader

3 on) a cached assets loader, so that all needed assets are concatenated into

one js and one css file to minimize the HTTP requests.

To make use of the cached assets loader, just create a directory /cache/ inside your plugin directory and make it writable for PHP.

Supported languages

Only the ones from the official PrismJS repository

  • bash (Bash Unix Shell)
  • c
  • clike
  • coffeescript
  • cpp (C++)
  • css
  • groovy
  • java
  • javascript
  • markup (like: xHTML, MathML, SVG, LaTeX, RSS, XML, OWL, etc.)
  • php
  • python
  • scss (Sassy CSS)
  • sql

Creating Custom Extensions

Please read the wiki page: Creating A Custom Extension.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • syntax highlighting
  • prism
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.5

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.5.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.5
Minimum requirementsWordPress 3.4.0 · PHP not listed
Update activity30 Jul 201313y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.