developing a plugin, how do I know the post id?
-
I am developing a new plugin. My plugin is performaing an action on a post as it is published to the blog so I have this function call:
add_action('publish_post', 'send_email');For some reason, I don’t have the post ID when I am trying to get some information about the post. What variable should I be checking for? Currently, I am checking for $post_id but it is not coming over. I have deactivated all other plugins on this particular blog so no other plugins should be interfering with (or not returning) the post id.
Thanks for any help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘developing a plugin, how do I know the post id?’ is closed to new replies.