I might not be thinking this right but here is my situation:
- I have a custom post type called
events
. - Some of my events are imported from an API and inserted through
wp_insert_post()
(in a plugin), some are added manually in the admin edit screen. - On post saving I need to add some informations to the
post_meta
but only if the post is added manually (through the admin edit screen).
So I am hooking into save_post_events
and performing some security checks but I have no idea how to check if the request is only coming from the admin edit page because right now the save_post
action triggers also if the post is added with the wp_insert_post
function.
Any ideas?
Thanks