{"id":864,"date":"2013-06-13T21:50:40","date_gmt":"2013-06-14T02:50:40","guid":{"rendered":"http:\/\/trillworks.com\/nick\/?p=864"},"modified":"2013-06-27T11:55:26","modified_gmt":"2013-06-27T16:55:26","slug":"wordpress-has-great-docs","status":"publish","type":"post","link":"https:\/\/trillworks.com\/nick\/2013\/06\/13\/wordpress-has-great-docs\/","title":{"rendered":"WordPress has great docs"},"content":{"rendered":"<p>See those nicely ordered links in the sidebar?<\/p>\n<blockquote><p>&#8220;Projects, Mentions, Web Development Tools&#8221;<\/p><\/blockquote>\n<p>Thank the WordPress documentarians for that.\u00a0This theme (wp_svbtle) doesn&#8217;t sort them by page_order by default. You have to add this snippet in its header.php.<\/p>\n<pre class=\"brush:php\">$pagesArgs = Array(\r\n    'sort_order' =&gt; 'ASC',\r\n    'sort_column' =&gt; 'menu_order'\r\n);      \r\n$pages = get_pages($pagesArgs);<\/pre>\n<p>I know this because the WordPress docs are phenomenal. Check it:\u00a0<a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/get_pages\">http:\/\/codex.wordpress.org\/Function_Reference\/get_pages<\/a><\/p>\n<p>This is a blueprint for every software project.<\/p>\n<p><strong>Usage<\/strong><br \/>\n<strong>Default Usage<\/strong><br \/>\n<strong>Params<\/strong> (with human-friendly explanations)<br \/>\n<strong>Return<\/strong> (way faster than inspecting in a debugger)<br \/>\n<strong>Example<\/strong> (contains multiple)<br \/>\n<strong>Changelog<\/strong><br \/>\n<strong>Source File<\/strong> (saves so much time if you want to read the code)<br \/>\n<strong>Related<\/strong> (similar functions, great for devs unfamiliar with the library)<\/p>\n<p>Even the page is nicely formatted. WordPress deserves a hand.\u00a0I know they had 10 years to get it right, but it&#8217;s still something to strive for.<\/p>\n<p>Related: My buddy Alban tells of his <a href=\"http:\/\/www.oneurl.me\/2013\/02\/how-php-ruined-life-software-developer\/\">sordid past<\/a> with PHP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>See those nicely ordered links in the sidebar? &#8220;Projects, Mentions, Web Development Tools&#8221; Thank the WordPress documentarians for that.\u00a0This theme (wp_svbtle) doesn&#8217;t sort them by page_order by default. You have to add this snippet in its header.php. $pagesArgs = Array( &#8216;sort_order&#8217; =&gt; &#8216;ASC&#8217;, &#8216;sort_column&#8217; =&gt; &#8216;menu_order&#8217; ); $pages = get_pages($pagesArgs); I know this because the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/trillworks.com\/nick\/2013\/06\/13\/wordpress-has-great-docs\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;WordPress has great docs&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[],"class_list":["post-864","post","type-post","status-publish","format-standard","hentry","category-technical"],"_links":{"self":[{"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/posts\/864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/comments?post=864"}],"version-history":[{"count":4,"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/posts\/864\/revisions"}],"predecessor-version":[{"id":882,"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/posts\/864\/revisions\/882"}],"wp:attachment":[{"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/media?parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/categories?post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trillworks.com\/nick\/wp-json\/wp\/v2\/tags?post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}