{"action":"closed","issue":{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/57","labels_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/57/comments","events_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/57/events","html_url":"https://github.com/eventespresso/event-espresso-core/issues/57","id":53262793,"number":57,"title":"Request a filter for $template_args","user":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars.githubusercontent.com/u/2306629?v=3","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/labels/Feature%20Request","name":"Feature Request","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"tn3rb","id":1751030,"avatar_url":"https://avatars.githubusercontent.com/u/1751030?v=3","gravatar_id":"","url":"https://api.github.com/users/tn3rb","html_url":"https://github.com/tn3rb","followers_url":"https://api.github.com/users/tn3rb/followers","following_url":"https://api.github.com/users/tn3rb/following{/other_user}","gists_url":"https://api.github.com/users/tn3rb/gists{/gist_id}","starred_url":"https://api.github.com/users/tn3rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tn3rb/subscriptions","organizations_url":"https://api.github.com/users/tn3rb/orgs","repos_url":"https://api.github.com/users/tn3rb/repos","events_url":"https://api.github.com/users/tn3rb/events{/privacy}","received_events_url":"https://api.github.com/users/tn3rb/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-01-02T16:49:00Z","updated_at":"2015-05-15T21:34:14Z","closed_at":"2015-05-15T21:34:14Z","body":"It would be nice if it was possible to hook into the ```$template_args```  before they're passed to a template. In a couple instances I had to duplicate an entire template when I just wanted to modify one piece of data (like who an Invoice should be addressed to).\r\n\r\nThe most abstracted place to put this filter would be in ```EEH_Template::locate_template()``` before the template is loaded:\r\n\r\n```apply_filters( 'FEEH_Template__filter_template_args', $template_args, $templates );```\r\n\r\nThe downside to this is that the only way to figure out the context is to look at the paths inside ```$templates```, which I suspect is prone to changing over time. I don't have a better idea for getting around this, though."}}