If I want to get a ID of the blog and ID of the post, can I get it with publish_post or save_post or should I use another action?
If I want to get a ID of the blog and ID of the post, can I get it with publish_post or save_post or should I use another action?
Use save_post:
add_action('save_post', 'post_handle_save', 9 , 2);
Which passes in two arguments the post_id and an object containing the posts details.
You will have to use a function call to get the blog_id though (or can blog_id be called with as a global variable now???) - not 100% on that one, so you might have to investigate or some other more knowledgeable person might reply below.
Thanks for trying cafespain. Anybody else have suggestions?
You mean you tried it and it didn't work?
Worked fine for me on the Vent plugin.
You can get the blogid by declaring:
global $blog_id;
at the top of the called function.
I will try it again. I made some stupid misstake probably ...