{"id":600,"date":"2017-02-16T01:01:00","date_gmt":"2017-02-16T07:01:00","guid":{"rendered":"http:\/\/rrbits.com\/epb\/?p=600"},"modified":"2017-02-16T01:01:55","modified_gmt":"2017-02-16T07:01:55","slug":"wordpress-code-generation","status":"publish","type":"post","link":"https:\/\/rrbits.com\/epb\/2017\/02\/16\/wordpress-code-generation\/","title":{"rendered":"WordPress Code Generation"},"content":{"rendered":"<p>Over the past few months, I&#8217;ve been heavily involved in some heavily customized WordPress development projects.  Well, years, actually.  There&#8217;s a bit of boilerplate involved for sure, and that&#8217;s where code generators step in.  At least I would argue that defining the callbacks and hooking into the necessary actions is boilerplate.<\/p>\n<p><!--more--><\/p>\n<p>WordPress&#8217;s setup is very flexible (in most regards) so that boilerplate is by design.  It allows most anything later down the chain to be overridden or removed entirely.  That said, it&#8217;s certainly not something I can do from memory myself, so I either have to go back and review pages and pages of documentation from the codex or, as I have been lately, turning to code scaffolding tools.<\/p>\n<p>For example, the ones at <a href=\"https:\/\/generatewp.com\/\">Generate WP<\/a> have been tremendously helpful.  (As an aside: I seem to have to change the cron generator&#8217;s output to run during `init` rather than during the `wp` action.)  They are rarely 100% what I want, but good enough to give me a good running start for those common, often tedious, parts of a project.<\/p>\n<p>I&#8217;m now always on the lookout for more tools like that as a computer can usually do a repetitive task better than a human is able to.  If you&#8217;re one of the three or four people who happen to stumble on this post, feel free to drop a comment so I can check them out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the past few months, I&#8217;ve been heavily involved in some heavily customized WordPress development projects. Well, years, actually. There&#8217;s a bit of boilerplate involved for sure, and that&#8217;s where code generators step in. At least I would argue that defining the callbacks and hooking into the necessary actions is boilerplate.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3999,149],"tags":[4644],"class_list":["post-600","post","type-post","status-publish","format-standard","hentry","category-programming","category-wordpress","tag-tools"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/comments?post=600"}],"version-history":[{"count":1,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/600\/revisions"}],"predecessor-version":[{"id":601,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/posts\/600\/revisions\/601"}],"wp:attachment":[{"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/media?parent=600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/categories?post=600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rrbits.com\/epb\/wp-json\/wp\/v2\/tags?post=600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}