Wisps
Wisps are Gist-like code posts for WordPress
★ 2stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/emrikol/wisps/archive/refs/heads/master.zipDeclares an update source (https://github.com/emrikol/wisps), so updates arrive through the plugin's own updater.
From the readme
GitHub Plugin URI: https://github.com/emrikol/Wisps
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 /view/ or /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.php template, which will continue to display Wisps in the loop securely, or you can use addthemesupport( '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.
1. Upload the plugin package to the plugins directory.
2. Login to the dashboard and activate the plugin.
3. Enjoy your new Wisps
1. A Wisp being edited.