{"action":"opened","issue":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/1986","labels_url":"https://api.github.com/repos/WP-API/WP-API/issues/1986/labels{/name}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/1986/comments","events_url":"https://api.github.com/repos/WP-API/WP-API/issues/1986/events","html_url":"https://github.com/WP-API/WP-API/issues/1986","id":126013374,"number":1986,"title":"Abstract Attachment-specific conditionals to Attachments controller","user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WP-API/WP-API/labels/Enhancement","name":"Enhancement","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/WP-API/WP-API/milestones/26","html_url":"https://github.com/WP-API/WP-API/milestones/2.0%20Beta%2011","labels_url":"https://api.github.com/repos/WP-API/WP-API/milestones/26/labels","id":1483702,"number":26,"title":"2.0 Beta 11","description":"","creator":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":0,"state":"open","created_at":"2016-01-04T23:11:36Z","updated_at":"2016-01-11T19:05:19Z","due_on":"2016-01-26T08:00:00Z","closed_at":null},"comments":0,"created_at":"2016-01-11T19:05:19Z","updated_at":"2016-01-11T19:05:19Z","closed_at":null,"body":"There are a few instances of Attachment-specific conditionals in the Posts controller that would be better off in the Attachments controller:\r\n\r\n* [ ] https://github.com/WP-API/WP-API/blob/a93ea66d361ae24882cd002b0fa0ff1503726522/lib/endpoints/class-wp-rest-posts-controller.php#L537-L539\r\n* [ ] https://github.com/WP-API/WP-API/blob/a93ea66d361ae24882cd002b0fa0ff1503726522/lib/endpoints/class-wp-rest-posts-controller.php#L962-L972\r\n* [ ] https://github.com/WP-API/WP-API/blob/a93ea66d361ae24882cd002b0fa0ff1503726522/lib/endpoints/class-wp-rest-posts-controller.php#L1615\r\n* [ ] https://github.com/WP-API/WP-API/blob/a93ea66d361ae24882cd002b0fa0ff1503726522/lib/endpoints/class-wp-rest-posts-controller.php#L1636"}}