WordPress plugin intelligence profile

Prettify GC Syntax Highlighter

Your code will look exactly like it does on google-code.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.4
Current version1.6.0
WordPress coverageTested up to WordPress 3.4
Minimum stackWP 3.0.5 · PHP —
Directory statusactive
Last directory update28 Aug 201214y ago
Active installations20Adoption metric — not a quality score
WordPress.org rating4.3 / 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 Prettify GC Syntax Highlighter version 1.6.0 as active, updated 14y ago and tested up to WordPress 3.4.

Overview

About this plugin

js copied directly from google-code source browser. So your code will look exactly like it does on google-code.

CSS is slightly modified to embolden keywords and types.

License

0). Other files are available under GPLv2.

Usage

<pre class="prettyprint">

// Put your code here.

</pre>

Or with shortcode:

[code]

// Put your code here.

[/code]

Making Code HTML Safe

The plugin automatically makes highlighted code html-safe:

<pre class="prettyprint">

Anything that goes here will be quoted to appear on the page as-is.

For example: <head></head><body></body>

</pre>

To avoid quoting your code, add dontquote as the first class.

<pre class="dontquote prettyprint">

Remember to quote manually.

For example: &lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;

</pre>

Line Numbering

Line numbdering can be enabled as follows:

<pre class="prettyprint linenums">

// Put your code here.

</pre>

If you want to start with a line number 42, you can do the following:

<pre class="prettyprint linenums:42">

// Put your code here.

</pre>

Highlighting Lines

When line numbering is enabled you can highlight one or several lines of code using the highlight class:

<pre class="prettyprint lang-YOURLANG linenums highlight:2,4">

// line 2

// line 3

// line 4

</pre>

Alternatively you can highlight one or several code segments:

<pre class="prettyprint lang-YOURLANG linenums highlight:1-3,5-6">

// line 2

// line 3

// line 4

// line 5

</pre>

Note: This feature is not available when line numbering is disabled.

Specifying Language

Most of the time the highlighter will do a good job guessing how to highlight the code. However, to achieve the best result, you should specify the language:

<pre class="prettyprint lang-YOURLANG">

// Put your code here.

</pre>

Replace YOURLANG with one of the following:

  • aea
  • agc
  • apollo
  • bsh
  • c
  • cc
  • cl
  • cpp
  • cs
  • csh
  • css-str
  • cv
  • cxx
  • cyc
  • default-markup
  • el
  • fs
  • go
  • hs
  • htm
  • html
  • java
  • js
  • json
  • lisp
  • lua
  • m
  • ml
  • mxml
  • perl
  • pl
  • pm
  • proto
  • py
  • rb
  • scala
  • scm
  • sh
  • sql
  • vhd
  • vhdl
  • wiki
  • xhtml
  • xml
  • xsl
  • yaml
  • yml

Shortcode

Here is a quick example. All the parameters are optional.

[code lang=”scala” start=”1″ highlight=”1-3,6,10-14″ background=”#C0FFB3″]

// Put your code here.

[/code]

Html quoting can be disabled as follows:

[code quote=”false”]

// Put your code here.

[/code]

The contents of shortcodes is auto-formatted by WP. As a result <p> and <br/> tags along

with some formatting will be lost. If you need to preseve the original formatting use

html notation instead of the shortcode.

Please Support

If you like Prettify GC Syntax Highlighter plugin, please donate a minute of your time and vote for it. Thank you!

WordPress.org metadata

Plugin tags

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

  • google code
  • prettify js
  • syntax highlighter
  • prettify.js
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.4

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

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.4
Minimum requirementsWordPress 3.0.5 · PHP not listed
Update activity28 Aug 201214y 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.