Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Thanks kaiser. Can you check my question update?. Your code working fine. But it gets published automatically. Is it possible to publish it after admin approval? –  Giri Jan 7 '13 at 13:15
    
@Giri I'll post and update –  kaiser Jan 7 '13 at 13:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.