{"id":1073,"date":"2009-09-06T18:38:01","date_gmt":"2009-09-06T17:38:01","guid":{"rendered":"http:\/\/toki-woki.net\/blog\/?p=1073"},"modified":"2022-03-29T21:53:03","modified_gmt":"2022-03-29T20:53:03","slug":"snips-2","status":"publish","type":"post","link":"http:\/\/toki-woki.net\/blog\/p1073-snips-2","title":{"rendered":"Snips2"},"content":{"rendered":"<p>Remember my first and only WordPress plugin? Well it just got better.<\/p>\n<p style=\"text-align: center;\"><a class=\"img\" href=\"http:\/\/wordpress.org\/extend\/plugins\/snips\/\"><img loading=\"lazy\" class=\"size-full wp-image-1076 aligncenter\" title=\"Snips2\" src=\"http:\/\/toki-woki.net\/blog\/wp-content\/uploads\/2009\/09\/snips2.jpg\" alt=\"Snips2\" width=\"560\" height=\"225\" srcset=\"http:\/\/toki-woki.net\/blog\/wp-content\/uploads\/2009\/09\/snips2.jpg 560w, http:\/\/toki-woki.net\/blog\/wp-content\/uploads\/2009\/09\/snips2-300x120.jpg 300w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/a><\/p>\n<p>Snips 2.0 is basically <a href=\"http:\/\/toki-woki.net\/blog\/p67-snips-wordpress-snippet-plugin\">Snips<\/a> rewritten from scratch, updated to fit WordPress&#8217; <a href=\"http:\/\/codex.wordpress.org\/Shortcode_API\">Shortcode API<\/a>. Let&#8217;s see how good it is&#8230;<!--more--><\/p>\n<p>Tired of having to copy paste nasty HTML code from sites such as YouTube, Vimeo and so on? Looking for a way to insert recurrent content in your posts without having to type it every time? Would like to be able to inject parameters in these snippets? Well, now you can.<\/p>\n<p>Just install Snips and use the bundled shortcodes or create\/edit your own!<\/p>\n<p>Each Snip is a combination of a <strong>name<\/strong>, a <strong>model <\/strong>and optional <strong>parameters<\/strong>. The name defines the shortcode tag you will be able to use, the model is the content that will replace your shortcode calls and the parameters (that look like #the-parameter# in the model) are portions of the model that can change from a call to an other. Those parameters can have default values or can be left empty and then become mandatory.<\/p>\n<p>All of this can be edited via a simple UI, found under Settings &gt; Snips&#8230; Here&#8217;s screenshot:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" class=\"size-full wp-image-1078 aligncenter\" title=\"Snips2 screenshot\" src=\"http:\/\/toki-woki.net\/blog\/wp-content\/uploads\/2009\/09\/snips2-screenshot.jpg\" alt=\"Snips2 screenshot\" width=\"560\" height=\"394\" srcset=\"http:\/\/toki-woki.net\/blog\/wp-content\/uploads\/2009\/09\/snips2-screenshot.jpg 560w, http:\/\/toki-woki.net\/blog\/wp-content\/uploads\/2009\/09\/snips2-screenshot-300x211.jpg 300w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/p>\n<p><strong>For those that used Snips&#8217; first version:<\/strong> (0.2) everything should be OK, the previous syntax will work ; but I recommend using the new one and the corresponding updated model files (ex: yt becomes yt2). Also, the #up# parameter (used in <strong>mp3 <\/strong>and <strong>swf<\/strong> snips) has to be set manually to your blog&#8217;s upload path.<\/p>\n<p>If you use it and find bugs, please let me know! This is the first time I use jQuery behavior (for the parameters&#8217; detection in the Settings page) so it could act a little weird.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remember my first and only WordPress plugin? Well it just got better. Snips 2.0 is basically Snips rewritten from scratch, updated to fit WordPress&#8217; Shortcode API. Let&#8217;s see how good it is&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[110,55,54,53,52],"acf":[],"_links":{"self":[{"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/posts\/1073"}],"collection":[{"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/comments?post=1073"}],"version-history":[{"count":17,"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/posts\/1073\/revisions"}],"predecessor-version":[{"id":1093,"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/posts\/1073\/revisions\/1093"}],"wp:attachment":[{"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/media?parent=1073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/categories?post=1073"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/toki-woki.net\/blog\/wp-json\/wp\/v2\/tags?post=1073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}