I'm writing a plugin and having a problem. I have add_action('publish_post', 'sender');
and I want this function to run first before the add_filter function, although it won't. Is there a way to do this? I've tried moving the add_filter below add_action but that doesn't work. Also pasting the add_filter one into the add_action function doesn't work. Thanks for the help.
Edit:
For example, if this would work it would be great.
if (add_action('publish_post', 'sender'))
{
add_filter('wp_insert_post_data','changePost','99',2);
}
But it doesn't and somehow still runs the add_filter function first.
wp_insert_post_data
is fired by WordPress beforepublish_post
so I'm not sure thats the way to go, what are you trying to do, maybe we can think of another wayhas_action()
function.