Frontend tag edit/submit form

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.

Read More

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?

Related posts

Leave a Reply

1 comment

  1. In case that

    1. I have understood your (very brief) question and
    2. you’re not actually talking about the post_tag-taxonomy

    then 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.