Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_action( 'pre_insert_term', function ( $term, $taxonomy )
{
return ( 'tutaxonomia' === $taxonomy && !current_user_can( 'manage_options' ) )
? new WP_Error( 'term_addition_blocked', __( 'No puedes añadir términos a esta taxonomía.' ) )
: $term;
}, 0, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.