Code Snippet Library

Store a library of reusable code snippets that you can add to any post. Supports 61 programming languages.

Author:Hugh Lashbrooke (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:4.0.1
Plugin version:1.1
Added to WordPress repository:09-03-2013
Last updated:05-09-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:74
Rated by:6
Plugin URI:http://www.hughlashbrooke.com/plugins
Total downloads:6 008
Active installs:300+
plugin download
Click to start download

"Code Snippet Library" is designed for use on code tutorial sites - it gives you a way to store code snippets that you can use numerous times in any post. You simply create the snippet and place the relevant shortcode where you want it to appear. The snippets are managed using WordPress' taxonomy UI, so they are quick and easy to add/edit. This means that if you need edit a snippet that appears in multiple posts you only need to edit it in one place and the changes will take effect everywhere it is displayed.

The primary features of Code Snippet Library include: Support for 61 programming languages, 29 different code editor themes for the admin and front-end displays, easy copy and paste for users without pop-ups, graceful fallback when snippets are viewed in feed readers and full i18n support.

Code Snippet Library uses the Ace code editor to edit and display your snippets (http://ace.ajax.org/) - this is the same editor used by GitHub, Cloud9 and many other services.

You can see the front-end side of the plugin in action on my website. Example: http://www.hughlashbrooke.com/two-methods-for-vertical-centering-in-css/ (displayed using the Monokai theme).

The idea for this plugin is based on WordPress Code Snippet by Allan Collins (http://wordpress.org/extend/plugins/wordpress-code-snippet/).

CONTRIBUTE ON GITHUB: https://github.com/hlashbrooke/Code-Snippet-Library