Skip to content

gigimaor/wordpress-new-tag-restrict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

wordpress-new-tag-restrict

Restrict add new tag to post by user role. Only admin can add new tag.

function undo_create_term ($term_id, $tt_id, $taxonomy) {
	if (!current_user_can( 'administrator' ))  {
    	if($taxonomy == 'post_tag') {
    		wp_delete_term($term_id,$taxonomy);
   	 	} 	 
    }
}

About

Restrict add new tag to post by user role. Only admin can add new tag.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published