Come avrete notato, in vari miei articoli ho utilizzato un interessante plugin per colorare la sintassi del codice HTML utilizzato. Questo plugin è CodeColorer, disponibile sul sito ufficiale di WordPresso a questo link.

Di seguito una guida per l’installazione e l’utilizzo di CodeColorer:

Installation
  1. Download and unpack plugin files to wp-content/plugins/codecolorer directory.
  2. Enable CodeColorer plugin on your Plugins page in Site Admin.
  3. Go to the Options/CodeColorer page in Site Admin and change plugin’s options as you wish.
  4. Use [cc lang="lang"]code[/cc] or <code lang="lang">code</cc> syntax to insert code snippet into the post (you could skip lang=”lang” , in this case code would be in CodeColorer’s code block, but without syntax highlighting). Also you can use [cci lang="lang"]code[/cci] to format inline code (see the “inline” option description).
  5. Have fun!
Syntax

To insert code snippet into your post (or comment) you should use [cc lang="lang"]code[/cc] or <code lang="lang">code</cc> syntax. Starting from version 0.6.0 you could specify additional CodeColorer options inside [cc] tag:

[cc lang="php" tab_size="2" lines="40"] // some code [/cc]

Note: You should always use double quotes or single quotes around the parameter value. Boolean values could be passed using string true or false, on or off, number1 or 0.

Short codes

Starting from CodeColorer 0.8.6 you can use short codes to insert code snippets. The short code in common looks like [ccM_LANG], where Continua >