This repository has been archived by the owner. It is now read-only.
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README
highlight.php

README

=== Highlight plugin ===

This plugin uses highlight (http://www.andre-simon.de) to add syntax highlighting to WordPress.

== Description ==

The highlight utility converts source code of 190 programming languages to HTML
with syntax highlighting. This plugin pipes the content of <pre>-Tags associated
with a lang parameter to highlight, and returns the output code which is included
in the WordPress blog entry.

Usage:

Paste the following in the code section of the blog editing form (HTML mode !):

<pre lang="c">#include <stdio.h>

int main (void){
  printf("This is some random code");
  return 0;
}</pre>

Use the lang parameter to define the programming language (c, php, py, xml, etc).
See the highlight documentation to learn all possible languages.
See the highlight.php file for some formatting options (line numbering, code
indentation, line wrapping etc).

== Installation ==

1. Install highlight (www.andre-simon.de) on your host

2. Unzip the wp_highlight.zip file and upload the content to the
   `/wp-content/plugins/` directory

   OR

   Copy the highlight.php file to the `/wp-content/plugins/` directory

3. Activate the plugin in the WordPress backend