{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/jetpack/issues/3477","repository_url":"https://api.github.com/repos/Automattic/jetpack","labels_url":"https://api.github.com/repos/Automattic/jetpack/issues/3477/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/jetpack/issues/3477/comments","events_url":"https://api.github.com/repos/Automattic/jetpack/issues/3477/events","html_url":"https://github.com/Automattic/jetpack/pull/3477","id":137532600,"number":3477,"title":"Top Posts Widget: new filters","user":{"login":"ryanhellyer","id":430544,"avatar_url":"https://avatars.githubusercontent.com/u/430544?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanhellyer","html_url":"https://github.com/ryanhellyer","followers_url":"https://api.github.com/users/ryanhellyer/followers","following_url":"https://api.github.com/users/ryanhellyer/following{/other_user}","gists_url":"https://api.github.com/users/ryanhellyer/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanhellyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanhellyer/subscriptions","organizations_url":"https://api.github.com/users/ryanhellyer/orgs","repos_url":"https://api.github.com/users/ryanhellyer/repos","events_url":"https://api.github.com/users/ryanhellyer/events{/privacy}","received_events_url":"https://api.github.com/users/ryanhellyer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/jetpack/labels/Extra%20Sidebar%20Widgets","name":"Extra Sidebar Widgets","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/jetpack/labels/Test%20on%20WP.com","name":"Test on WP.com","color":"e11d21"},{"url":"https://api.github.com/repos/Automattic/jetpack/labels/[Status]%20Needs%20Author%20Reply","name":"[Status] Needs Author Reply","color":"e11d21"},{"url":"https://api.github.com/repos/Automattic/jetpack/labels/[Type]%20Enhancement","name":"[Type] Enhancement","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/jetpack/milestones/35","html_url":"https://github.com/Automattic/jetpack/milestones/4.0","labels_url":"https://api.github.com/repos/Automattic/jetpack/milestones/35/labels","id":1461071,"number":35,"title":"4.0","description":"","creator":{"login":"jeherve","id":426388,"avatar_url":"https://avatars.githubusercontent.com/u/426388?v=3","gravatar_id":"","url":"https://api.github.com/users/jeherve","html_url":"https://github.com/jeherve","followers_url":"https://api.github.com/users/jeherve/followers","following_url":"https://api.github.com/users/jeherve/following{/other_user}","gists_url":"https://api.github.com/users/jeherve/gists{/gist_id}","starred_url":"https://api.github.com/users/jeherve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeherve/subscriptions","organizations_url":"https://api.github.com/users/jeherve/orgs","repos_url":"https://api.github.com/users/jeherve/repos","events_url":"https://api.github.com/users/jeherve/events{/privacy}","received_events_url":"https://api.github.com/users/jeherve/received_events","type":"User","site_admin":false},"open_issues":202,"closed_issues":5,"state":"open","created_at":"2015-12-15T11:07:52Z","updated_at":"2016-03-01T18:36:56Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-03-01T10:25:04Z","updated_at":"2016-03-02T09:21:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/3477","html_url":"https://github.com/Automattic/jetpack/pull/3477","diff_url":"https://github.com/Automattic/jetpack/pull/3477.diff","patch_url":"https://github.com/Automattic/jetpack/pull/3477.patch"},"body":"We need to implement some extra features into the Jetpack Top Posts widget. To avoid us forking the code, we'd appreciate if some extra hooks and filters could be added to enable us to do this.\r\n\r\nWe need to add (and save) extra fields, and to be able to modify the number of days the statistics are set for on a per widget basis (the current filter limits us to only changing the number of days across all widgets in use on a page).\r\n\r\n#### Changes proposed in this Pull Request:\r\nAdding ability to:\r\n1. Inject extra fields (and save them) into the top posts widget.\r\n2. Filter the number of days on a per-widget basis."},"comment":{"url":"https://api.github.com/repos/Automattic/jetpack/issues/comments/191148319","html_url":"https://github.com/Automattic/jetpack/pull/3477#issuecomment-191148319","issue_url":"https://api.github.com/repos/Automattic/jetpack/issues/3477","id":191148319,"user":{"login":"jeherve","id":426388,"avatar_url":"https://avatars.githubusercontent.com/u/426388?v=3","gravatar_id":"","url":"https://api.github.com/users/jeherve","html_url":"https://github.com/jeherve","followers_url":"https://api.github.com/users/jeherve/followers","following_url":"https://api.github.com/users/jeherve/following{/other_user}","gists_url":"https://api.github.com/users/jeherve/gists{/gist_id}","starred_url":"https://api.github.com/users/jeherve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeherve/subscriptions","organizations_url":"https://api.github.com/users/jeherve/orgs","repos_url":"https://api.github.com/users/jeherve/repos","events_url":"https://api.github.com/users/jeherve/events{/privacy}","received_events_url":"https://api.github.com/users/jeherve/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T09:21:09Z","updated_at":"2016-03-02T09:21:09Z","body":"> I hadn't added those docs as most of the existing ones were missing them.\r\n\r\nAll hooks (`apply_filters`, `do_action`) in Jetpack are documented. If you find a hook that's not documented, let us know!\r\n\r\n> I've added inline documentation now for the relevant filters and hooks, plus I've modified the existing inline documentation for the jetpack_top_posts_days filter.\r\n\r\nThanks!\r\n\r\n> I have not modified any of the existing functions inline documentation where they have no documentation. If you would like me to do that, I can do that for too.\r\n\r\nNo, that's alright. Although it can be useful, documenting functions is not a requirement when adding new code to Jetpack."}}