Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement