GaryJones / Gamajo-Template-Loader

A class to copy into your WordPress plugin, to allow loading template parts with fallback through the child theme > parent theme > plugin.
GNU General Public License v2.0
292 stars 61 forks source link

Make locate_template() method public #3

Closed bradyvercher closed 10 years ago

bradyvercher commented 10 years ago

Template parts have to follow a specific naming pattern when using get_template_part(), while locate_template() isn't concerned with the template names. For instance, it might be necessary to use a convention similar to the WordPress Template Hierarchy:

Another application that can't be achieved with get_template_part() is searching for templates that don't use a .php extension.