{"id":75,"date":"2005-09-26T17:04:50","date_gmt":"2005-09-26T07:04:50","guid":{"rendered":"http:\/\/www.thunderguy.com\/semicolon\/?p=75"},"modified":"2005-09-26T17:06:27","modified_gmt":"2005-09-26T07:06:27","slug":"plaintext-a-wordpress-plugin","status":"publish","type":"post","link":"https:\/\/thunderguy.com\/semicolon\/2005\/09\/26\/plaintext-a-wordpress-plugin\/","title":{"rendered":"Plaintext: a WordPress plugin"},"content":{"rendered":"<p>When you click one of my PHP code download links (for example, the <a href=\"\/semicolon\/plaintext\/less.php\">Less WordPress plugin<\/a>), you see the PHP source code on your screen, even though the file is a <code>.php<\/code> file. How do I stop the server executing the PHP code? With a WordPress plugin, of course.<\/p>\n<p><cite>Plaintext<\/cite> is a <a href=\"http:\/\/wordpress.org\/\">WordPress<\/a> plugin that helps you to distribute your Web source code to an admiring public, whether it&#8217;s PHP, HTML, ASP or anything else. I&#8217;ve been tweaking it for a while, and now I thought I&#8217;d make it public.<\/p>\n<p>I would really appreciate comments on the implementation. While testing Plaintext, I learned a lot about two areas in particular. In mod_rewrite, I couldn&#8217;t use RewriteRule&#8217;s <cite>type<\/cite> flag, apparently because of differences in PHP setup; and I couldn&#8217;t find a good way of finding out the file path of the blog home directory.<\/p>\n<p>For more details and the plugin download, see the main <a href=\"http:\/\/www.thunderguy.com\/semicolon\/wordpress\/plaintext-wordpress-plugin\/\">Plaintext WordPress plugin<\/a> page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you click one of my PHP code download links (for example, the Less WordPress plugin), you see the PHP source code on your screen, even though the file is a .php file. How do I stop the server executing the PHP code? With a WordPress plugin, of course. Plaintext is a WordPress plugin that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[83],"class_list":["post-75","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":0,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"wp:attachment":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}