Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am developing a plugin for a WordPress install so lower users can submit a new page or page revision so an Editor can approve it.

I would like to do this by creating this post as a draft, then notifying an Editor via email...

Is this possible?

Thanks in advanced.

share|improve this question

1 Answer 1

You can use the function wp_insert_post for this

$my_post = array(
   'post_title' => $title,
   'post_content' => $content,
   'post_status' => 'draft',
   'post_type' => 'page',
   'post_author' => $author

wp_insert_post( $my_post );

then you can use wp_mail(); to notify someone.

share|improve this answer

Your Answer


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.