I need to register an action via
The action works in frontend, but in backend and login page it doesn't work. It seems as if 'wp' hook doesn't exist for administration and login page.
Am I missing something or is there any alternative?
Use case description: I have a special tag (custom taxonomy term) for one of the pages. If user is not logged in and tries to access the backend s/he should be redirected to the page that has the tag. To find out which page has that tag I use WP_Query with tax_query. Therefore, I need a hook that is triggered after custom taxonomies (and custom post types) are registered, but also that is triggered before headers are set.