how to filter register_taxonomy

register_taxonomy( 'email_lists', array(
    'subscriber',
    'newsletter'
   ), array(
    'public' => false,
    'hierarchical' => false,
    'labels' => $labels,
    'show_ui' => true,
    'update_count_callback' => array( &$this, 'update_post_term_count' ),
    'show_in_nav_menus' => true,
    'show_tagcloud' => false,
    'query_var' => true,
    'capabilities' => array(
     'manage_terms' => 'email_edit_lists',
     'edit_terms' => 'email_edit_lists',
     'delete_terms' => 'email_delete_lists',
     'assign_terms' => 'email_assign_lists',

    ),
   ) );

basing on what above is it possible to manage filter based on external attribute added on WP_terms ?

Related posts

Leave a Reply

1 comment

  1. Obviously this is quite an old question, but the register_taxonomy_args filter was introduced in WordPress 4.4 which allows any of the arguments to be filtered.

    For example, if you wanted to make the taxonomy not public:

    function so_22326532_register_taxonomy_args( $args, $taxonomy ) {
    
        if ( $taxonomy == 'email_lists' ) {
    
            $args['public'] = false;
    
        }
    
        return $args;
    
    }
    
    add_filter( 'register_taxonomy_args', 'so_22326532_register_taxonomy_args', 10, 2 );