Add support for a custom template path. #89

Merged
merged 1 commit into from Jan 30, 2013

Conversation

Projects
None yet
2 participants
Contributor

cfg commented Jan 29, 2013

Using the liveblog_template_path filter developers can provide a new path for template files. If a template file is not found, the default template will be used.

@cfg cfg Add support for a custom template path.
Using the `liveblog_template_path` filter developers can provide a new path for template files. If a template file is not found, the default template will be used.
f0894ae

nb commented on f0894ae Jan 30, 2013

Looks good. Good thinking about the realpath.

Why are you running this on handle_request? It sounds arbitrary. It looks like this should be done on init, but that's usually when your plugin will hook to the filter and there's a chance that it will run earlier than liveblog's init.

So, how about we run the filter on demand in get_template_part() and cache it? A method like get_templates_path() or even get_template_path( $template_file ) can do a good job. What do you think?

Owner

nb commented Jan 30, 2013

It's good enough for now.

@nb nb added a commit that referenced this pull request Jan 30, 2013

@nb nb Merge pull request #89 from cfg/custom-template-path
Add support for a custom template path
a5d0a20

@nb nb merged commit a5d0a20 into Automattic:master Jan 30, 2013

nb referenced this pull request Jun 29, 2015

Open

Templates cleanup #90

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