mattweber / solr-for-wordpress

A WordPress plugin that replaces the default WordPress search with Solr
85 stars 36 forks source link

updated template loading #32

Closed nullvariable closed 12 years ago

nullvariable commented 12 years ago

I adjusted the template loading feature located on line 1253 to use the WordPress locate_template function instead of the TEMPLATEPATH constant as locate_template supports child themes, where the TEMPLATE path constant does not. This allows for a BuddyPress site to use the normal theme structure of a child theme instead of needing to place a template file in the BuddyPress plugin directory. This would also affect anyone building a child theme of the standard WordPress themes and certain frameworks etc.

Example: output of TEMPLATEPATH in a BuddyPress site would be similar to:

/var/www/wp-content/plugins/buddypress/bp-themes/bp-default

Where in most cases a theme developer would be building a theme sourced from

/var/www/wp-content/themes/my-cool-theme

Thanks!

nullvariable commented 12 years ago

sorry, that code didn't properly load the template as it should have.