jtsternberg / Code-Snippets-CPT

A WordPress plugin for managing and displaying code snippets
http://dsgnwrks.pro
19 stars 17 forks source link

Set shortcode name for Code Snippet #19

Closed marbetschar closed 8 years ago

marbetschar commented 8 years ago

It would be cool to set a shortcode for a Code Snippet for later used from within a blog post for example. Maybe this should just be possible for the PHP language.

For example to define a shortcode [current_year] as follows:

echo date("Y");
marbetschar commented 8 years ago

It is maybe just enough to check the Code Snippet as "Shortcode" and the slug could be used as shortcode name. So adding a setting "Shortcode true/false" should be enough!

jtsternberg commented 8 years ago

This plugin is exclusively for displaying snippets, not running them. There are other snippet plugins out there for executing code, and I don't want to take on that liability. Here is one I have seen by Crowd Favorite: https://github.com/crowdfavorite/wp-cf-snippets

marbetschar commented 8 years ago

Ok!