Hi guys, I want to create new post with some parameters after original post is published, can this be done, I mean can I trigger wp_insert_post function from plugin?
I tried and everything is ok, i mean there is no exceptions, but no new post is writen to the database.
This is my first plugin, sorry if I ask dumb questions...
Jelena
function asd (){
.
.
.
wp_insert_post( $my_new_post );
}
add_action ('publish_post', 'asd');