twentyten_header_image_height hook called before $wp->query()
|Reported by:||mikeschinkel||Owned by:|
I don't know if this is anything we can address but the twentyten_header_image_height hook is called within the after_setup_theme hook which is well before wp_query has been set up by $wp->query() and hence functions like is_front_page() are as-of-yet undefined.
Of course the header image height is something that would most likely changed based on whether it's front page or not so I thought I'd bring up this issue (in my current project there is a header only on the front page, no where else.)
Not sure what to suggest about this. Ultimately is_page() returns false even though it is a page and thus is_front_page() returns false. Maybe is_front_page() could test if $wp->query() has been run yet and if not do something different?
Or maybe simply throw an error saying is_front_page() not defined yet. That would be better than others repeating my wasted hour trying to figure out why "obviously correct" logic isn't working. :)
Change History (5)
- Summary changed from twentyten_header_image_height hook called before query to twentyten_header_image_height hook called before $wp->query()
- Keywords twentyeleven added
- Milestone Awaiting Review deleted
- Resolution set to maybelater
- Status changed from new to closed