parse_query() method of the
WP_Query class sets the variables on which the conditional tags are based.
parse_query hook are executed before returning from
parse_query() method, variables are already set (eg.
is_home, used by
is_front_page() will work, but function that changes the current state can be hooked to
parse_query (it's still
parse_query() method, which sets variables like
pre_get_posts is executed directly after
parse_query, that is why it is for me the first safe hook to use conditional tags.
Conditional Tags in Codex
You can only use conditional query tags after the
posts_selection action hook in WordPress (the
wp action hook is the first one through which you can use these conditionals). For themes, this means the conditional tag will never work properly if you are using it in the body of
functions.php, i.e. outside of a function.
However: if you have a reference to the query object (for example, from within the
pre_get_posts hooks), you can use the WP_Query conditional methods (eg: