Support » Plugin: Radio Buttons for Taxonomies » Private Taxomy

  • Resolved Davide Prevosto


    Hi there,

    I would like to add our “not public” taxonomies and I did add in your code:

    $args['public'] = false;
    $private = get_taxonomies( $args, 'objects' );
    $taxonomies = apply_filters( 'radio_buttons_for_taxonomies_taxonomies', array_merge( $defaults, $custom, $private ) );

    Is there a way to hook your code, or is it possible to add a filter to do that?

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author HelgaTheViking


    You can use the radio_buttons_for_taxonomies_taxonomies filter that you referenced. Possibly like this from your theme’s functions.php or a site-seecific plugin, but I can’t test right now:

    function kia_add_private_taxonomies( $taxonomies ){
    	$private = get_taxonomies( array( 'public' => false ), 'objects' );
    	return array_merge( $taxonomies, $private );
    add_filter( 'radio_buttons_for_taxonomies_taxonomies', 'kia_add_private_taxonomies' );
    Thread Starter Davide Prevosto


    I did try but without success. I will give another try, maybe I’d miss something.

    Thanks for your fast reply.

    Plugin Author HelgaTheViking


    Please post your code and I will look at it when I can.

    Thread Starter Davide Prevosto


    It was me @helgatheviking!

    Your code works like a charm. Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Private Taxomy’ is closed to new replies.