{"action":"opened","issue":{"url":"https://api.github.com/repos/Automattic/amp-wp/issues/827","repository_url":"https://api.github.com/repos/Automattic/amp-wp","labels_url":"https://api.github.com/repos/Automattic/amp-wp/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/issues/827/comments","events_url":"https://api.github.com/repos/Automattic/amp-wp/issues/827/events","html_url":"https://github.com/Automattic/amp-wp/issues/827","id":280328717,"number":827,"title":"template_redirect vs. template_include?","user":{"login":"mikeschinkel","id":153285,"avatar_url":"https://avatars1.githubusercontent.com/u/153285?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeschinkel","html_url":"https://github.com/mikeschinkel","followers_url":"https://api.github.com/users/mikeschinkel/followers","following_url":"https://api.github.com/users/mikeschinkel/following{/other_user}","gists_url":"https://api.github.com/users/mikeschinkel/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeschinkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeschinkel/subscriptions","organizations_url":"https://api.github.com/users/mikeschinkel/orgs","repos_url":"https://api.github.com/users/mikeschinkel/repos","events_url":"https://api.github.com/users/mikeschinkel/events{/privacy}","received_events_url":"https://api.github.com/users/mikeschinkel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-08T00:32:33Z","updated_at":"2017-12-08T00:32:33Z","closed_at":null,"author_association":"NONE","body":"We have a project where we need to build the entire site in AMP, and we are finding several of the architect decisions for this plugin to make that more difficult than it needs to be. \r\n\r\nIt seems everything assumes routing through `template_redirect` and then to be served inside `AMP_Post_Template->verify_and_include()` and making the `$this` variable visible within the themes _(and hence other AMP plugins are using it)_.\r\n\r\nWhen I discovered this is surprised me because I would have assumed it would follow WordPress architecture, hook `'template_include'` and provide template tags and other template-related functions _(or maybe an `WP_AMP` singleton to encapsulate all the AMP-related functionality.)_\r\n\r\nRight now it seems that anything other that supporting other AMP-equivalent templates other than  `single.php` would be a huge amount of work and I'm not even sure where someone would even start to add that support with this code base.\r\n\r\nDo you think the ship has sailed on the current architecture or that we could revisit this and move in the direction of supporting a more WordPress-compatible approach?  I need to deliver something for a client and I am trying to decide if I should contribute to this project, fork it and modify it, or start from scratch.  \r\n\r\n"}}
{"actor":{"display_login":"mikeschinkel"}}