Code Snippets CPT Code Snippets CPT

Code Snippets CPT

Created by: Jtsternberg

Rating:
Downloaded: 8k times

A WordPress plugin for elegantly hosting, managing, and displaying code snippets. Own your own data!

Adds a custom post type for managing your code snippets with taxonomies for classifying the snippets. Embed snippets with syntax highlighting to posts or pages via a handy shortcode insert button that allows you to pick from the most recent snippets. Syntax highlighting provided by the Prettify javascript library and the Ace Editor.

Features:

  • Host your own snippet library.
  • Button for easy-copying of snippet (disable with: add_filter( 'dsgnwrks_snippet_do_click_to_copy', '__return_false' )).
  • Button to enable full-screen snippet view (disable with: add_filter( 'dsgnwrks_snippet_enable_full_screen_view', '__return_false' )).
  • Two frontend render engines, prettify (with 2 themes) or Ace (with 32 themes).
  • WordPress editor shortcode button for embedding snippets in your content, and creating/editing those snippets on the fly.
  • Live (tinymce) previews of the snippets in your content editor.
  • Programming language picker (for syntax).
  • Snippet tags and categories.

Feel free to fork or contribute on Github.

Screenshots

  • Code Snippets admin listing
  • Editing code snippet
  • Code snippet shortcode in a post
  • Code snippet insert button/modal
  • Front-end snippet view, using Ace with the monokai theme
  • Full-screen snippet view
  • Snippet easy-copy window
  • Inline snippet editor

Categories

Get New Themes & Resources