Created
November 8, 2018 12:43
-
-
Save deckerweb/714869320ead554f4e058ea2525a986e to your computer and use it in GitHub Desktop.
Make the "Builder Template Category" taxonomy public. - For plugin: "Builder Template Taxonomies"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PLEASE BE AWARE of the consequences of making this taxonomy "public" that means it could appear on frontend: