WebDevStudios / WDS-Simple-Page-Builder

Uses existing template parts in the currently-active theme to build a customized page with rearrangeable elements.
GNU General Public License v2.0
136 stars 25 forks source link

Load template parts from inside a plugin #15

Closed jazzsequence closed 9 years ago

jazzsequence commented 9 years ago

It would be cool if a plugin could add template parts to the list of template parts PB uses, so all functionality could be contained inside the plugin. Ultimately, this would prevent parts of the page from being broken if there was a badly written template part that was dependant upon a plugin that was disabled.

jtsternberg commented 9 years ago

We should look to BuddyPress for prior art.

dustyf commented 9 years ago

On a side note, but related, when loading from a theme maybe we should allow Child Themes to load them too. get_template_directory returns the parent theme. We should probably have it so it overrides Child > Parent > Plugin.

jazzsequence commented 9 years ago

This is now working in refactor-2 and will soon be added to develop. Props @modemlooper.