Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Created November 8, 2018 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/714869320ead554f4e058ea2525a986e to your computer and use it in GitHub Desktop.
Save deckerweb/714869320ead554f4e058ea2525a986e to your computer and use it in GitHub Desktop.
Make the "Builder Template Category" taxonomy public. - For plugin: "Builder Template Taxonomies"
<?php
/** Do NOT include the opening php tag */
add_filter( 'register_taxonomy_args', 'ddw_btc_make_tax_public', 10, 2 );
/**
* Make the "Builder Template Category" taxonomy public.
* For plugin: "Builder Template Taxonomies".
*
* @author David Decker - DECKERWEB
* @link https://gist.github.com/deckerweb/714869320ead554f4e058ea2525a986e
*
* @param array $args Array of taxonomy arguments for registering.
* @param string $taxonomy ID of the taxonomy to change arguments for.
* @return array Modified array of taxonomy arguments.
*/
function ddw_btc_make_tax_public( array $args, $taxonomy ) {
$taxonomy = 'builder-template-category';
$args[ 'public' ] = TRUE;
return $args;
} // end function
@deckerweb
Copy link
Author

PLEASE BE AWARE of the consequences of making this taxonomy "public" that means it could appear on frontend:

  • plugin/ taxonomy registration was not build for this!
  • it was not tested with being a public taxonomy
  • I cannot and will not support anything related to this taxonomy being made public! (as it is not the purpose of the plugin!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment