syntax-highlighting-fuer-wordpress-mit-prism

PRISM ist wohl eines der besten Syntax-Highlighting-Tools und lässt sich leicht in WordPress integrieren:

functions.php

function my_theme_resources()
{
    // Prism laden | http://prismjs.com
    wp_enqueue_style('prism-css', get_stylesheet_directory().'/libs/prism/prism.css');
    wp_enqueue_script('prism-js', get_stylesheet_directory().'/libs/prism/prism.js');
}
add_action('wp_enqueue_scripts', 'my_theme_resources');

WordPress-Texteditor

<pre><code class="language-php">
// PHP-Beispiel-Code
$prism=true;</code></pre>