{"id":33514,"date":"2014-12-20T04:44:08","date_gmt":"2014-12-20T04:44:08","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/code-snippets-cpt\/"},"modified":"2017-04-05T19:09:53","modified_gmt":"2017-04-05T19:09:53","slug":"code-snippets-cpt","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/code-snippets-cpt\/","author":6048912,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.1.0","stable_tag":"trunk","tested":"","requires":"","requires_php":"","requires_plugins":"","header_name":"Code Snippets CPT","header_author":"Jtsternberg","header_description":"","assets_banners_color":"385b5a","last_updated":"2017-04-05 19:09:53","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/j.ustin.co\/rYL89n","header_plugin_uri":"http:\/\/j.ustin.co\/jAHRM3","header_author_uri":"http:\/\/dsgnwrks.pro","rating":4.6,"author_block_rating":0,"active_installs":100,"downloads":9085,"num_ratings":8,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog","faq"],"tags":[],"upgrade_notice":{"2.1.0":"<ul>\n<li>Fix issue with double trailing slashes on <code>DWSNIPPET_URL<\/code> causing resources to no load under some circumstances.<\/li>\n<\/ul>","2.0.9":"<ul>\n<li>Fix issue with calling <code>wp.mce<\/code> when it doesn&#039;t exist (in instances where only quicktags are enqueued).<\/li>\n<\/ul>","2.0.8":"<ul>\n<li>Fix ACE frontend to honor the &#039;Display Line Numbers&#039; setting. Fixes <a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/issues\/29\">#29<\/a>.<\/li>\n<\/ul>","2.0.7":"<ul>\n<li>Fix &quot;Uncaught Error: Call to undefined function post_categories_meta_box()&quot; occurring when not on post-pages. Fixes <a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/issues\/28\">#28<\/a>.<\/li>\n<\/ul>","2.0.6":"<ul>\n<li>Update snippet-copy URL so that it doesn&#039;t 404 when nonce is expired, and also <code>noindex,nofollow<\/code> the snippet-copy pages when the nonce has expired.<\/li>\n<\/ul>","2.0.5":"<ul>\n<li>Enable native copy functionality available in newer browsers. Props <a href=\"https:\/\/github.com\/ramiabraham\">ramiabraham<\/a>, <a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/pull\/27\">#27<\/a>.<\/li>\n<li>Clean up styles a bit for full-screen view.<\/li>\n<li>Clean up Ace front-end view.<\/li>\n<\/ul>","2.0.4":"<ul>\n<li>Fix bug causing the shortcode button not to insert the snippet when in visual mode.<\/li>\n<\/ul>","2.0.3":"<ul>\n<li>The front-end script needs to load in the footer so that <code>wp_localize_script()<\/code> works as expected.<\/li>\n<li>Better styling for the full-width view and the buttons in the full-width view<\/li>\n<\/ul>","2.0.2":"<ul>\n<li>Better Ace editor support for inline php snippets (i.e. no opening `<\/li>\n<\/ul>","2.0.1":"<ul>\n<li>Use Ace editor for the snippet add\/edit shortcode modal.<\/li>\n<\/ul>","2.0.0":"<ul>\n<li>Button for opening modal for easy-copying of snippet.<\/li>\n<li>Button to enable full-screen snippet view.<\/li>\n<li>(When using Ace frontend) Button to toggle line-numbers.<\/li>\n<li>(When using Ace frontend) Button to collapse\/minify the snippet.<\/li>\n<li>(When logged-in) Button to edit Snippet.<\/li>\n<li>View individual snippet pages, and link to full-screen snippets.<\/li>\n<li>Live (tinymce) previews of the snippets in your content editor, and edit them in place.<\/li>\n<li>Option to choose the front-end display theme and render engine (prettify or Ace).<\/li>\n<li>Ace editor on the snippet-edit page, and option to use the Ace render engine on the front-end. Props <a href=\"https:\/\/github.com\/JayWood\">JayWood<\/a> (<a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/pull\/22\">#22<\/a>).<\/li>\n<\/ul>","1.0.5":"<ul>\n<li>Add C# as available language.<\/li>\n<\/ul>","1.0.4":"<ul>\n<li>BUG FIX: Remove &#039;html_entity_decode&#039; around snippet output, as it will cause the page display to break under certain circumstances.<\/li>\n<\/ul>","1.0.3":"<ul>\n<li>Shortcodes now use slugs, new filter added, &#039;dsgnwrks_snippet_display&#039;, Better handling of WordPress-converted html entities, convert tabs to spaces for better readability, &amp; Added title attribute to <code>pre<\/code> element to display title of snippet on hover.<\/li>\n<\/ul>","1.0.2":"<ul>\n<li>Add more languages, add lang parameter to shortcode attributes, selected snippet language is set on shortcode lang parameter automatically, and allow shortcode to specify line number to start with.<\/li>\n<\/ul>","1.0.1":"<ul>\n<li>WP editor buttons for inserting snippet shortcodes<\/li>\n<\/ul>","1.0.0":"<ul>\n<li>First Release<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":"1","4":"1","5":"6"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1474001","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1474001","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1474001","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1474001","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1474014","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1474014","resolution":"3","location":"assets"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1474014","resolution":"4","location":"assets"},"screenshot-5.png":{"filename":"screenshot-5.png","revision":"1474361","resolution":"5","location":"assets"},"screenshot-6.png":{"filename":"screenshot-6.png","revision":"1474361","resolution":"6","location":"assets"},"screenshot-7.png":{"filename":"screenshot-7.png","revision":"1474361","resolution":"7","location":"assets"},"screenshot-8.png":{"filename":"screenshot-8.png","revision":"1474362","resolution":"8","location":"assets"}},"screenshots":{"1":"Code Snippets admin listing","2":"Editing code snippet","3":"Code snippet shortcode in a post","4":"Code snippet insert button\/modal","5":"Front-end snippet view, using Ace with the monokai theme","6":"Full-screen snippet view","7":"Snippet easy-copy window","8":"Inline snippet editor"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[78223],"plugin_business_model":[],"class_list":["post-33514","plugin","type-plugin","status-closed","hentry","plugin_contributors-jtsternberg","plugin_committers-jtsternberg"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/code-snippets-cpt_385b5a.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/code-snippets-cpt\/assets\/screenshot-1.png?rev=1474001","caption":"Code Snippets admin listing"},{"src":"https:\/\/ps.w.org\/code-snippets-cpt\/assets\/screenshot-2.png?rev=1474014","caption":"Editing code snippet"},{"src":"https:\/\/ps.w.org\/code-snippets-cpt\/assets\/screenshot-3.png?rev=1474014","caption":"Code snippet shortcode in a post"},{"src":"https:\/\/ps.w.org\/code-snippets-cpt\/assets\/screenshot-4.png?rev=1474014","caption":"Code snippet insert button\/modal"},{"src":"https:\/\/ps.w.org\/code-snippets-cpt\/assets\/screenshot-5.png?rev=1474361","caption":"Front-end snippet view, using Ace with the monokai theme"},{"src":"https:\/\/ps.w.org\/code-snippets-cpt\/assets\/screenshot-6.png?rev=1474361","caption":"Full-screen snippet view"},{"src":"https:\/\/ps.w.org\/code-snippets-cpt\/assets\/screenshot-7.png?rev=1474361","caption":"Snippet easy-copy window"},{"src":"https:\/\/ps.w.org\/code-snippets-cpt\/assets\/screenshot-8.png?rev=1474362","caption":"Inline snippet editor"}],"raw_content":"<!--section=description-->\n<p>A WordPress plugin for elegantly hosting, managing, and displaying code snippets. Own your own data!<\/p>\n\n<p>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 <a href=\"https:\/\/github.com\/google\/code-prettify\">Prettify javascript library<\/a> and the <a href=\"https:\/\/ace.c9.io\/\">Ace Editor<\/a>.<\/p>\n\n<p>Features:<\/p>\n\n<ul>\n<li>Host your own snippet library.<\/li>\n<li>Button for easy-copying of snippet (disable with: <code>add_filter( 'dsgnwrks_snippet_do_click_to_copy', '__return_false' )<\/code>).<\/li>\n<li>Button to enable full-screen snippet view (disable with: <code>add_filter( 'dsgnwrks_snippet_enable_full_screen_view', '__return_false' )<\/code>).<\/li>\n<li>Two frontend render engines, prettify (with 2 themes) or Ace (with 32 themes).<\/li>\n<li>WordPress editor shortcode button for embedding snippets in your content, and creating\/editing those snippets on the fly.<\/li>\n<li>Live (tinymce) previews of the snippets in your content editor.<\/li>\n<li>Programming language picker (for syntax).<\/li>\n<li>Snippet tags and categories.<\/li>\n<\/ul>\n\n<p>Feel free to <a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\">fork or contribute on Github<\/a>.<\/p>\n\n<!--section=changelog-->\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>Fix issue with double trailing slashes on <code>DWSNIPPET_URL<\/code> causing resources to no load under some circumstances.<\/li>\n<\/ul>\n\n<h4>2.0.9<\/h4>\n\n<ul>\n<li>Fix issue with calling <code>wp.mce<\/code> when it doesn't exist (in instances where only quicktags are enqueued).<\/li>\n<\/ul>\n\n<h4>2.0.8<\/h4>\n\n<ul>\n<li>Fix ACE frontend to honor the 'Display Line Numbers' setting. Fixes <a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/issues\/29\">#29<\/a>.<\/li>\n<\/ul>\n\n<h4>2.0.7<\/h4>\n\n<ul>\n<li>Fix \"Uncaught Error: Call to undefined function post_categories_meta_box()\" occurring when not on post-pages. Fixes <a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/issues\/28\">#28<\/a>.<\/li>\n<\/ul>\n\n<h4>2.0.6<\/h4>\n\n<ul>\n<li>Update snippet-copy URL so that it doesn't 404 when nonce is expired, and also <code>noindex,nofollow<\/code> the snippet-copy pages when the nonce has expired.<\/li>\n<\/ul>\n\n<h4>2.0.5<\/h4>\n\n<ul>\n<li>Enable native copy functionality available in newer browsers. Props <a href=\"https:\/\/github.com\/ramiabraham\">ramiabraham<\/a>, <a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/pull\/27\">#27<\/a>.<\/li>\n<li>Clean up styles a bit for full-screen view.<\/li>\n<li>Clean up Ace front-end view.<\/li>\n<\/ul>\n\n<h4>2.0.4<\/h4>\n\n<ul>\n<li>Fix bug causing the shortcode button not to insert the snippet when in visual mode.<\/li>\n<\/ul>\n\n<h4>2.0.3<\/h4>\n\n<ul>\n<li>The front-end script needs to load in the footer so that <code>wp_localize_script()<\/code> works as expected.<\/li>\n<li>Better styling for the full-width view and the buttons in the full-width view<\/li>\n<\/ul>\n\n<h4>2.0.2<\/h4>\n\n<ul>\n<li>Better Ace editor support for inline php snippets (i.e. no opening <code>&lt;?php<\/code> tag).<\/li>\n<li>Minify css files.<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Use Ace editor for the snippet add\/edit shortcode modal.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Button for opening modal for easy-copying of snippet.<\/li>\n<li>Button to enable full-screen snippet view.<\/li>\n<li>(When using Ace frontend) Button to toggle line-numbers.<\/li>\n<li>(When using Ace frontend) Button to collapse\/minify the snippet.<\/li>\n<li>(When logged-in) Button to edit Snippet.<\/li>\n<li>View individual snippet pages, and link to full-screen snippets.<\/li>\n<li>Live (tinymce) previews of the snippets in your content editor, and edit them in place.<\/li>\n<li>Option to choose the front-end display theme and render engine (prettify or Ace).<\/li>\n<li>Ace editor on the snippet-edit page, and option to use the Ace render engine on the front-end. Props <a href=\"https:\/\/github.com\/JayWood\">JayWood<\/a> (<a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/pull\/22\">#22<\/a>).<\/li>\n<li>Add new snippets on the fly via the shortcode button (vs having to leave your post and to create them). Props <a href=\"https:\/\/github.com\/JayWood\">JayWood<\/a> (<a href=\"https:\/\/github.com\/jtsternberg\/Code-Snippets-CPT\/pull\/22\">#22<\/a>).<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Add C# as available language.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>BUG FIX: Remove 'html_entity_decode' around snippet output, as it will cause the page display to break under certain circumstances.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Replace shortcode button's usage of ids with slugs because ids can change during a migration.<\/li>\n<li>Added filter, 'dsgnwrks_snippet_display'.<\/li>\n<li>Better handling of WordPress-converted html entities.<\/li>\n<li>By default, convert tabs to spaces for better readability. Can be disabled with: <code>remove_filter( 'dsgnwrks_snippet_content', 'dsgnwrks_snippet_content_replace_tabs' );<\/code><\/li>\n<li>Added title attribute to <code>pre<\/code> element to display title of snippet on hover.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Add more languages<\/li>\n<li>Add lang parameter to shortcode attributes.<\/li>\n<li>Use selected snippet language to set the shortcode lang parameter.<\/li>\n<li>Allow shortcode to specify line number to start with<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>WP editor buttons for inserting snippet shortcodes<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First Release<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Upload the entire <code>\/code-snippets-cpt<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate Code Snippets CPT through the 'Plugins' menu in WordPress.<\/li>\n<li>Create a snippet.<\/li>\n<li>Insert a snippet shortcode via the snippet tinymce button.<\/li>\n<\/ol><\/dd>\n\n<\/dl>","raw_excerpt":"Tags snippets, code, code snippets, syntax highlighting, shortcode Requires at least: 3.8.0 Tested up to: 4.7.3 Stable tag: 2.1.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/33514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=33514"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jtsternberg"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=33514"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=33514"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=33514"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=33514"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=33514"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=33514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}