Allow devs to filter menu template hierarchy #50

naomicbush opened this Issue Dec 31, 2013 · 5 comments


None yet
3 participants

No description provided.

@naomicbush naomicbush added a commit to naomicbush/hybrid-core that referenced this issue Dec 31, 2013

@naomicbush naomicbush Allow devs to filter menu template hierarchy. Fix #50 ab94692

Rarst commented Dec 31, 2013

Native get_query_template() filters template lookup result rather than input. On one hand I don't like it very much because it might mean discarded lookup and making extra one, on other hand I would think it might make sense to keep behavior consistent with core.

@Rarst actually, the behavior here is consistent with Hybrid Core — see the hybrid_content_template_hierarchy filter which is already in 2.0.

If you have an issue with the use of a filter on these functions in general, you should open a separate issue.


Rarst commented Dec 31, 2013

Ah, sorry I hadn't seen much of 2.0 yet. :) By "core" I meant WP core.

To be precise there are filters both for input and output of template lookup in hybrid_get_content_template().


justintadlock commented Dec 31, 2013

To be consistent with core WP, it should behave like get_sidebar(), get_header(), and get_footer(), which don't allow you to filter at all.

Nevertheless, I'm most likely going to add a hook there. I'll be going over all of the newer 2.0 stuff in this next week and making some decisions.


justintadlock commented Feb 14, 2015

I know this is a long overdue response, but I decided to leave this as is for consistency with the core WP functions. That was the original intention of the function.

The content template function is different scenario and behaves more like the template hierarchy, just on a smaller scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment