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.
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.
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?
get_template_path( $template_file )
It's good enough for now.
Merge pull request #89 from cfg/custom-template-path
Add support for a custom template path