Problem with using admin_head in my plugin
-
I need to put a HTML code (meta redirect) to the <head> section in my WP admin after a user submits a form and certain conditions are met. Unfortunately it seems that using add_action(‘admin_head’, ‘my_custom_admin_head’); doesn’t work if I put it in the function used for printing my options page.
If it is anywhere else, it works, but then I would have to add an option to a database and constantly check it for changes to determine if the script is allowed put the redirect code to <head>.
Isn’t there a way to achieve this in a simpler way?
When I just use header() or wp_redirect() I get the “headers already sent” error.Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problem with using admin_head in my plugin’ is closed to new replies.