Code Snippets CPT banner
jtsternberg jtsternberg

Code Snippets CPT

Development community

Description

A WordPress plugin for managing and displaying code snippets

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Code Snippets CPT - 2.1.0

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](https://github.com/google/code-prettify) and the [Ace Editor](https://ace.c9.io/).

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.

[Available on wordpress.org](https://wordpress.org/plugins/code-snippets-cpt/).

Change Log

2.1.0

  • Fix issue with double trailing slashes on DWSNIPPET_URL causing resources to no load under some circumstances.

2.0.9

  • Fix issue with calling wp.mce when it doesn't exist (in instances where only quicktags are enqueued).

2.0.8

  • Fix ACE frontend to honor the 'Display Line Numbers' setting. Fixes #29.

2.0.7

  • Fix "Uncaught Error: Call to undefined function post_categories_meta_box()" occurring when not on post-pages. Fixes #28.

2.0.6

  • Update snippet-copy URL so that it doesn't 404 when nonce is expired, and also noindex,nofollow the sn