Last year I had a need for an editable JSON file that was retrievable via HTTP. Of course there’s a million ways that I could do this, but the easiest I thought of would be to have it inside of WordPress, since all of the people that needed access to edit the file already had edit access to a specific site. So I built a plugin.
Doing this inside WordPress already brings a lot of benefits with little to no effort:
- User Management
- Revision History
- oEmbed Support
- Syntax Highlighting Code Editor
- Self-Hosted Data
Possibly more benefits as well, depending on the setup, such as caching.
I’ve tweaked the plugin some, and I’m almost ready to submit it to the WordPress.org Plugin Repository. I just need to do the hard part of figuring out artwork. Ugh.
Wisps are embeddable and sharable code snippets for WordPress.
With Wisps, you can have code snippets similar to Gist, Pastebin, or similar code sharing sites. Using the built-in WordPress code editor, you can write snippets to post and share. This has the benefit of WordPress revisions, auto-drafts, etc to keep a record of how code changes.
Wisps can be downloaded by appending
/download/to the permalink, or viewed raw by adding
/raw/. There is full oEmbed support so you can just paste in a link to a wisp in the editor and it will be fully embedded.
PrismJS is used for syntax highlighting for oEmbeds.
You can add Wisp support to your theme either by modifying the custom post type
page-wisp.phptemplate, which will continue to display Wisps in the loop securely, or you can use
add_theme_support( 'wisps' )to tell the plugin to not automatically escape the output. You can then do what you like, such as potentially adding frontend support for syntax highlighting.
Currently available on GitHub
Hopefully one day available on the WordPress.org Plugin Repository 🙂
If you give it a try and have any suggestions, or issues drop me a line here or on GitHub!