{"id":8476,"date":"2010-03-19T05:06:19","date_gmt":"2010-03-19T05:06:19","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-syntax-download-extension\/"},"modified":"2024-04-13T01:54:26","modified_gmt":"2024-04-13T01:54:26","slug":"wp-syntax-download-extension","status":"publish","type":"plugin","link":"https:\/\/mai.wordpress.org\/plugins\/wp-syntax-download-extension\/","author":5623237,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.3","stable_tag":"1.1.3","tested":"3.4.2","requires":"3.0","requires_php":"","requires_plugins":null,"header_name":"WP-Syntax Download Extension","header_author":"Akinori MUSHA","header_description":"","assets_banners_color":"","last_updated":"2024-04-13 01:54:26","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/github.com\/knu","header_plugin_uri":"https:\/\/wordpress.org\/extend\/plugins\/wp-syntax-download-extension","header_author_uri":"https:\/\/akinori.org\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":9067,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"Akinori MUSHA","date":"2010-03-19 05:07:46"},"1.0.1":{"tag":"1.0.1","author":"Akinori MUSHA","date":"2010-03-19 09:11:31"},"1.0.2":{"tag":"1.0.2","author":"Akinori MUSHA","date":"2011-10-17 08:24:51"},"1.0.3":{"tag":"1.0.3","author":"Akinori MUSHA","date":"2011-10-17 08:38:54"},"1.0.4":{"tag":"1.0.4","author":"Akinori MUSHA","date":"2012-09-30 13:48:51"},"1.1.0":{"tag":"1.1.0","author":"Akinori MUSHA","date":"2013-03-07 08:41:38"},"1.1.1":{"tag":"1.1.1","author":"Akinori MUSHA","date":"2014-05-02 08:21:34"},"1.1.2":{"tag":"1.1.2","author":"Akinori MUSHA","date":"2024-04-13 01:46:54"},"1.1.3":{"tag":"1.1.3","author":"Akinori MUSHA","date":"2024-04-13 01:54:26"}},"upgrade_notice":{"1.1.0":"<p>This version is for use with WP-Syntax 1.0 or higher.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2","1.0.3","1.0.4","1.1.0","1.1.1","1.1.2","1.1.3"],"block_files":[],"assets_screenshots":{"screenshot-3.png":{"filename":"screenshot-3.png","revision":3069834,"resolution":"3","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3069834,"resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":3069834,"resolution":"1","location":"plugin"}},"screenshots":{"1":"<p>Output sample in the default style.<\/p>","2":"<p>Output sample in a user customized style.<\/p>","3":"<p>Admin options screen.<\/p>"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1214,1975,3986,2207,4609],"plugin_category":[],"plugin_contributors":[88901],"plugin_business_model":[],"class_list":["post-8476","plugin","type-plugin","status-publish","hentry","plugin_tags-code","plugin_tags-formatting","plugin_tags-highlight","plugin_tags-syntax","plugin_tags-syntax-highlighting","plugin_contributors-akinori-musha","plugin_committers-akinori-musha"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-syntax-download-extension.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-syntax-download-extension\/trunk\/screenshot-1.png?rev=3069834","caption":"<p>Output sample in the default style.<\/p>"},{"src":"https:\/\/ps.w.org\/wp-syntax-download-extension\/trunk\/screenshot-2.png?rev=3069834","caption":"<p>Output sample in a user customized style.<\/p>"},{"src":"https:\/\/ps.w.org\/wp-syntax-download-extension\/trunk\/screenshot-3.png?rev=3069834","caption":"<p>Admin options screen.<\/p>"}],"raw_content":"<!--section=description-->\n<p>This plug-in adds download facility to\n<a href=\"https:\/\/wordpress.org\/extend\/plugins\/wp-syntax\/\">WP-Syntax<\/a>, putting a\npretty caption to each syntax highlighted code snippet, which contains\na permalink anchor and a couple of action buttons: \"raw\" and\n\"download\".<\/p>\n\n<p>The usage is easy.  You just put an attibute <code>filename=\"...\"<\/code> to\na <code>&lt;pre&gt;<\/code> element and the snippet will have a caption.<\/p>\n\n<p>I strongly recommend that you use the <a href=\"https:\/\/wordpress.org\/extend\/plugins\/tinymce-valid-elements\/\">TinyMCE Valid\nElements<\/a>\nplug-in to make the non-standard attributes of the <code>&lt;pre&gt;<\/code> element\ntreated as valid and get preserved in the visual editor.  Configure it\nso that the <code>pre<\/code> element can have the following attributes:<\/p>\n\n<ul>\n<li><code>class<\/code><\/li>\n<li><code>dir<\/code><\/li>\n<li><code>escaped<\/code><\/li>\n<li><code>filename<\/code><\/li>\n<li><code>highlight<\/code><\/li>\n<li><code>id<\/code><\/li>\n<li><code>lang<\/code><\/li>\n<li><code>line<\/code><\/li>\n<li><code>style<\/code><\/li>\n<li><code>title<\/code><\/li>\n<li><code>wrap<\/code><\/li>\n<\/ul>\n\n<p>You can alter the visual style of captions with CSS via admins menu.\nThis plug-in was first developed for PHP 5.2.12 and is currently\ntested only with 5.4.  It will never work with PHP 4.<\/p>\n\n<h3>License<\/h3>\n\n<p>Copyright (c) 2010-2024 Akinori MUSHA<\/p>\n\n<p>All rights reserved.<\/p>\n\n<p>Redistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:<\/p>\n\n<ol>\n<li><p>Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.<\/p><\/li>\n<li><p>Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and\/or other materials provided with the distribution.<\/p><\/li>\n<\/ol>\n\n<p>THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\nOR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\nHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\nLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\nOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGE.<\/p>\n\n<!--section=installation-->\n<ol>\n<li><p>Upload the <code>wp-syntax-download-extension<\/code> directory to the\n   \/wp-content\/plugins\/ directory.<\/p><\/li>\n<li><p>Activate the plugin through the 'Plugins' menu in WordPress.  Of\ncource you have to have WP-Syntax activated as well.<\/p><\/li>\n<li><p>Add an attribute <code>filename=\"filename.ext\"<\/code> to the <code>&lt;pre\nlang=\"...\"&gt;<\/code> snippet that you want to make downloadable.<\/p><\/li>\n<li><p>Adjust the design of captions with CSS via admins menu.<\/p><\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>Q.  This plug-in does not work with WP-Syntax <em>&lt;some old\n    version&gt;<\/em>!<\/p>\n\n<p>A.  No surprise.  This plug-in depends on WP-Syntax's internals.  Fix\n    it yourself or upgrade WP-Syntax.<\/p>\n\n<p>Q.  This plug-in does not work with WP-Syntax <em>&lt;the latest\n    version&gt;<\/em>!<\/p>\n\n<p>A.  Bad surprise to me.  This plug-in depends on WP-Syntax's internals.\n    Fix it yourself or wait until I fix it.<\/p>\n\n<p>Q.  How do you customize the styles of the code?<\/p>\n\n<p>A.  Amongst the options I am using the <a href=\"https:\/\/wordpress.org\/extend\/plugins\/wp-syntax-hacktify\/\">WP-Syntax\n    Hacktify<\/a>\n    plug-in.<\/p>\n\n<!--section=changelog-->\n<h4>1.1.3<\/h4>\n\n<p>Fix a fatal error and suppress a warning with PHP 8.<\/p>\n\n<h4>1.1.1<\/h4>\n\n<p>Add support for a file name with directory separators.\nAutomatically suppress W3TC comments in raw\/download output.<\/p>\n\n<h4>1.1.0<\/h4>\n\n<p>Update for WP-Syntax 1.0, dropping support for 0.9.13 and prior.<\/p>\n\n<h4>1.0.4<\/h4>\n\n<p>Update for WP-Syntax 0.9.13, dropping support for 0.9.12 and prior.\nTake care of extended_valid_elements of TinyMCE.<\/p>\n\n<h4>1.0.3<\/h4>\n\n<p>Fix a bug where the CSS is not read.<\/p>\n\n<h4>1.0.2<\/h4>\n\n<p>Follow the critical change made in WP-Syntax 0.9.11, which is now the\nleast requirement version.  As a bonus, WordPress 3.0 or later is\nrequired.<\/p>\n\n<h4>1.0.1<\/h4>\n\n<p>Do not fail when WP-Syntax is not installed or activated.\nImprove this document.<\/p>\n\n<h4>1.0<\/h4>\n\n<p>First release.<\/p>","raw_excerpt":"This plug-in makes WP-Syntax highlighted code snippets downloadable from nice captions.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/8476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=8476"}],"author":[{"embeddable":true,"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/akinori-musha"}],"wp:attachment":[{"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=8476"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=8476"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=8476"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=8476"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=8476"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/mai.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=8476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}