WordPress plugin intelligence profile

Prettify Code Syntax

Code syntax highlighter using Google Prettify, supporting the HTML5 recommendation, and caching plugins.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.5
Current version1.2.1
WordPress coverageTested up to WordPress 3.5
Minimum stackWP 3.0.1 · PHP —
Directory statusactive
Last directory update21 Mar 201313y ago
Active installations70Adoption metric — not a quality score
WordPress.org rating4.2 / 5 from 12 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 Prettify Code Syntax version 1.2.1 as active, updated 13y ago and tested up to WordPress 3.5.

Overview

About this plugin

The main reason for the development of this plugin was the lack of options supporting the HTML5 recommendation, where the code snippets should be tagged with pre followed by code, and optionally a class starting with language- and then our language.

You can use the plugin like this:

<pre class="prettyprint"><code class="language-php"> // my code </code></pre>

Also very important is that although this plugin loads different files depending on your configuration, it fully supports caching scripts ( W3 Total Cache ) to concatenate and compress all the css and js, so the impact in performance will be minimum.

Languages

This syntax highlighter is based on Google Code Prettify and should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, Javascript, Makefiles, and Rust. It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl and Ruby, but, because of commenting conventions, doesn’t work on Smalltalk.

Other languages are supported via an extension (plugin options): CSS, SQL, YAML, Visual Basic, Clojure, Scala, Latek (TeX, LaTeX), WikiText, Erlang, Go, Haskell, Lua, OCAML, SML, F#, Nemerle, Protocol Buffers, CHDL (VHDL), XQ (XQuery), Lisp, Scheme, Dart, Llvm, Mumps, Pascal, R, S, RD, TCL

Styles

Four different styles are provided, and they can be previewed in the plugin options. They are modified to make sure they don’t clash with any other styles in your theme.

You have also the option to include your custom style.

If you have a style that would like to see included in the option list, just contact me, or fork me.

Notes

-

Plugin options are at Settings > Prettify Code Syntax. Have a look at the Screenshots tab to see how it looks like.

-

If you don’t care too much about the HTML5 recommendation, you can skip the language- class. The code always gets detected automatically.

-

)

-

Be careful using the Visual Editor tab when inserting code, as some HTML tags will be modified or removed.

-

Using a chaching plugin like W3 Total Cache is highly recommended.

Demo

You can find a front end demo here a the bottom.

WordPress.org metadata

Plugin tags

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

  • code
  • highlighter
  • markup
  • prettify
  • syntax
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.0.1 · PHP not listed
Update activity21 Mar 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.