Redirect on publish_post action hook
I’m writing a plugin that integrates WP with another application… it’s nearly complete but I need one last little line of code worked out.
I have an action hook on “publish_post” that runs some db lookups and some logic then it generates a url and I want it to open that url either in the current window or a new window (it doesn’t matter).
wp_redirect($url);doesn’t do anything
and neither does
the only thing that will open my url in a new window is this:
doing that will open my page in a new window, but the current page (the WP post editor) will crash with the following message:
Warning: Cannot modify header information – headers already sent by (output started at
/serverurl/wp-includes/pluggable.php on line 275
where serverurl is the complete path on my server and wp_smf_commenter is the name of my plugin.
- The topic ‘Redirect on publish_post action hook’ is closed to new replies.