{"id":7077006,"date":"2016-02-17T21:23:51","date_gmt":"2016-02-17T21:23:51","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/add-shortcode-attribute-for-include_children\/"},"modified":"2016-08-31T13:34:59","modified_gmt":"2016-08-31T13:34:59","slug":"add-shortcode-attribute-for-include_children","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/add-shortcode-attribute-for-include_children\/","title":{"rendered":"Add shortcode attribute for include_children"},"content":{"rendered":"<p>Would it be possible to include a dg shortcode attribute for include_children to be passed through to the taxonomy parameters gereneration for the WP Query?<\/p>\n<p>For the project I&#8217;m currently working on I&#8217;ve had to hack the plugin adding this line within the DGGallery-&gt;setTaxa() function to acheive this:<\/p>\n<pre><code>$taxa[] = array(\n\t&#039;taxonomy&#039; =&gt; $taxon,\n\t&#039;field&#039;    =&gt; &#039;id&#039;,\n\t&#039;include_children&#039; =&gt; false,\n\t&#039;terms&#039;    =&gt; $terms,\n\t&#039;operator&#039; =&gt; isset( $operator[ $taxon ] ) ? $operator[ $taxon ] : &#039;IN&#039;\n);<\/code><\/pre>\n<p>Thanks!<br \/>\nJohn<\/p>\n<p>https:\/\/wordpress.org\/plugins\/document-gallery\/<\/p>\n","protected":false},"template":"","class_list":["post-7077006","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7077006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7077006\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7077006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}