I would like to have a separate page to submit/edit tags.
Any user can edit or submit tags. But it should be published only after admin approval.
Is there any function available like wp_insert_tag()
?
Update:
After Kaiser’s answer I’ve tried like this.
$x = wp_insert_term( 'test', 'post_tag', array('description' => 'This is a test tag') );
var_dump($x);
Its working fine. But it gets published automatically. Is it possible to publish it after admin approval?
In case that
post_tag
-taxonomythen you have
wp_insert_term()
, which is the underlying API function.Edit
As to the comment, there’s the need of meta data for a term and administrator approval.
WordPress currently has no native way of adding meta data to a taxonomy taxon. There’re ideas “around” it. IMHO they clutter your DB-options table in seconds without a reason. There’re other ways around this, but this would be too much for a single answer, so I can only recommend to find another way of handling tag maintenance.