{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/99662947","pull_request_review_id":20346646,"id":99662947,"diff_hunk":"@@ -61,22 +61,47 @@ function prepare_jitms( $screen ) {\n \t\t}\n \n \t\tif ( 'edit-comments' == $screen->base && ! Jetpack::is_plugin_active( 'akismet/akismet.php' ) ) {\n-\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );\n-\t\t\tadd_action( 'admin_notices', array( $this, 'akismet_msg' ) );\n+\t\t\treturn $this->enqueue_jitm( 'akismet' );\n \t\t}\n-\t\telseif (\n+\t\t\n+\t\tif (\n \t\t\t'post' == $screen->base\n \t\t\t&& ( isset( $_GET['message'] ) && 6 == $_GET['message'] )\n \t\t\t&& ! Jetpack::is_plugin_active( 'vaultpress/vaultpress.php' )\n \t\t) {\n-\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );\n-\t\t\tadd_action( 'edit_form_top', array( $this, 'backups_after_publish_msg' ) );\n+\t\t\treturn $this->enqueue_jitm( 'backups_after_publish' );\n \t\t}\n-\t\telseif ( 'update-core' == $screen->base && ! Jetpack::is_plugin_active( 'vaultpress/vaultpress.php' ) ) {\n-\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );\n-\t\t\tadd_action( 'admin_notices', array( $this, 'backups_updates_msg' ) );\n+\t\t\n+\t\tif ( 'update-core' == $screen->base && ! Jetpack::is_plugin_active( 'vaultpress/vaultpress.php' ) ) {\n+\t\t\treturn $this->enqueue_jitm( 'backups_updates' );\n \t\t}\n \t}\n+\t\n+\t/*\n+\t * Checks to see if JITM has been dismissed, and, if not, enqueues it\n+\t *\n+\t */\n+\tfunction enqueue_jitm( $jitm_slug )\n+\t{\n+\t\tif( ! $jitm_slug ) {\n+\t\t\treturn;\n+\t\t}\n+\t\t\n+\t\t$hide_jitm = Jetpack_Options::get_option( 'hide_jitm' );\n+\t\t// Don't show the JITM if it's been seen in the last 6 months or dismissed twice in the past.\n+\t\tif( is_array( $hide_jitm ) &&","path":"class.jetpack-jitm.php","position":49,"original_position":49,"commit_id":"e3f0c436a1d1b91d1c8b2e1902e316d82110fd7c","original_commit_id":"e3f0c436a1d1b91d1c8b2e1902e316d82110fd7c","user":{"login":"dereksmart","id":7129409,"avatar_url":"https://avatars.githubusercontent.com/u/7129409?v=3","gravatar_id":"","url":"https://api.github.com/users/dereksmart","html_url":"https://github.com/dereksmart","followers_url":"https://api.github.com/users/dereksmart/followers","following_url":"https://api.github.com/users/dereksmart/following{/other_user}","gists_url":"https://api.github.com/users/dereksmart/gists{/gist_id}","starred_url":"https://api.github.com/users/dereksmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereksmart/subscriptions","organizations_url":"https://api.github.com/users/dereksmart/orgs","repos_url":"https://api.github.com/users/dereksmart/repos","events_url":"https://api.github.com/users/dereksmart/events{/privacy}","received_events_url":"https://api.github.com/users/dereksmart/received_events","type":"User","site_admin":false},"body":"Space between `if` and opening parenth","created_at":"2017-02-06T19:25:16Z","updated_at":"2017-02-06T19:28:25Z","html_url":"https://github.com/Automattic/jetpack/pull/6132#discussion_r99662947","pull_request_url":"https://api.github.com/repos/Automattic/jetpack/pulls/6132","_links":{"self":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/99662947"},"html":{"href":"https://github.com/Automattic/jetpack/pull/6132#discussion_r99662947"},"pull_request":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/6132"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/6132","id":102292566,"html_url":"https://github.com/Automattic/jetpack/pull/6132","diff_url":"https://github.com/Automattic/jetpack/pull/6132.diff","patch_url":"https://github.com/Automattic/jetpack/pull/6132.patch","issue_url":"https://api.github.com/repos/Automattic/jetpack/issues/6132","number":6132,"state":"open","locked":false,"title":"Update JITM Logic","user":{"login":"samhotchkiss","id":574752,"avatar_url":"https://avatars.githubusercontent.com/u/574752?v=3","gravatar_id":"","url":"https://api.github.com/users/samhotchkiss","html_url":"https://github.com/samhotchkiss","followers_url":"https://api.github.com/users/samhotchkiss/followers","following_url":"https://api.github.com/users/samhotchkiss/following{/other_user}","gists_url":"https://api.github.com/users/samhotchkiss/gists{/gist_id}","starred_url":"https://api.github.com/users/samhotchkiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samhotchkiss/subscriptions","organizations_url":"https://api.github.com/users/samhotchkiss/orgs","repos_url":"https://api.github.com/users/samhotchkiss/repos","events_url":"https://api.github.com/users/samhotchkiss/events{/privacy}","received_events_url":"https://api.github.com/users/samhotchkiss/received_events","type":"User","site_admin":false},"body":"#### Changes proposed in this Pull Request:\r\nChange the logic so that dismissing one JITM only dismisses that one, and not all JITMs\r\n\r\nAllow a JITM to come back after 6 months, but if it's dismissed a second time, then banish is forever.\r\n\r\n#### Testing instructions:\r\n\r\n* Install this branch on your site, deactivate Akismet and VaultPress\r\n* Check to see if a JITM shows on the main comment page.  Dismiss it.\r\n* Publish a post, you should see a JITM for VaultPress.  Dismiss it.\r\n* Go back to the main comment page, that JITM should not display","created_at":"2017-01-19T15:51:34Z","updated_at":"2017-02-06T19:28:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"246c24e9a8374abda9946819274dba711476f37e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/jetpack/pulls/6132/commits","review_comments_url":"https://api.github.com/repos/Automattic/jetpack/pulls/6132/comments","review_comment_url":"https://api.github.com/repos/Automattic/jetpack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/jetpack/issues/6132/comments","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/e3f0c436a1d1b91d1c8b2e1902e316d82110fd7c","head":{"label":"Automattic:enchance/jitm-indiv-dismiss","ref":"enchance/jitm-indiv-dismiss","sha":"e3f0c436a1d1b91d1c8b2e1902e316d82110fd7c","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":15231212,"name":"jetpack","full_name":"Automattic/jetpack","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/jetpack","description":"Increase your traffic, view your stats, speed up your site, and protect yourself from hackers with Jetpack.","fork":false,"url":"https://api.github.com/repos/Automattic/jetpack","forks_url":"https://api.github.com/repos/Automattic/jetpack/forks","keys_url":"https://api.github.com/repos/Automattic/jetpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/jetpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/jetpack/teams","hooks_url":"https://api.github.com/repos/Automattic/jetpack/hooks","issue_events_url":"https://api.github.com/repos/Automattic/jetpack/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/jetpack/events","assignees_url":"https://api.github.com/repos/Automattic/jetpack/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/jetpack/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/jetpack/tags","blobs_url":"https://api.github.com/repos/Automattic/jetpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/jetpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/jetpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/jetpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/jetpack/languages","stargazers_url":"https://api.github.com/repos/Automattic/jetpack/stargazers","contributors_url":"https://api.github.com/repos/Automattic/jetpack/contributors","subscribers_url":"https://api.github.com/repos/Automattic/jetpack/subscribers","subscription_url":"https://api.github.com/repos/Automattic/jetpack/subscription","commits_url":"https://api.github.com/repos/Automattic/jetpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/jetpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/jetpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/jetpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/jetpack/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/jetpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/jetpack/merges","archive_url":"https://api.github.com/repos/Automattic/jetpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/jetpack/downloads","issues_url":"https://api.github.com/repos/Automattic/jetpack/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/jetpack/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/jetpack/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/jetpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/jetpack/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/jetpack/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/jetpack/deployments","created_at":"2013-12-16T16:43:01Z","updated_at":"2017-02-06T18:14:33Z","pushed_at":"2017-02-06T18:39:37Z","git_url":"git://github.com/Automattic/jetpack.git","ssh_url":"git@github.com:Automattic/jetpack.git","clone_url":"https://github.com/Automattic/jetpack.git","svn_url":"https://github.com/Automattic/jetpack","homepage":"https://jetpack.com/","size":188213,"stargazers_count":617,"watchers_count":617,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":373,"mirror_url":null,"open_issues_count":823,"forks":373,"open_issues":823,"watchers":617,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"5ea94a636173f8462c1ae0de459f142419b155f4","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":15231212,"name":"jetpack","full_name":"Automattic/jetpack","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/jetpack","description":"Increase your traffic, view your stats, speed up your site, and protect yourself from hackers with Jetpack.","fork":false,"url":"https://api.github.com/repos/Automattic/jetpack","forks_url":"https://api.github.com/repos/Automattic/jetpack/forks","keys_url":"https://api.github.com/repos/Automattic/jetpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/jetpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/jetpack/teams","hooks_url":"https://api.github.com/repos/Automattic/jetpack/hooks","issue_events_url":"https://api.github.com/repos/Automattic/jetpack/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/jetpack/events","assignees_url":"https://api.github.com/repos/Automattic/jetpack/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/jetpack/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/jetpack/tags","blobs_url":"https://api.github.com/repos/Automattic/jetpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/jetpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/jetpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/jetpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/jetpack/languages","stargazers_url":"https://api.github.com/repos/Automattic/jetpack/stargazers","contributors_url":"https://api.github.com/repos/Automattic/jetpack/contributors","subscribers_url":"https://api.github.com/repos/Automattic/jetpack/subscribers","subscription_url":"https://api.github.com/repos/Automattic/jetpack/subscription","commits_url":"https://api.github.com/repos/Automattic/jetpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/jetpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/jetpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/jetpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/jetpack/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/jetpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/jetpack/merges","archive_url":"https://api.github.com/repos/Automattic/jetpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/jetpack/downloads","issues_url":"https://api.github.com/repos/Automattic/jetpack/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/jetpack/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/jetpack/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/jetpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/jetpack/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/jetpack/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/jetpack/deployments","created_at":"2013-12-16T16:43:01Z","updated_at":"2017-02-06T18:14:33Z","pushed_at":"2017-02-06T18:39:37Z","git_url":"git://github.com/Automattic/jetpack.git","ssh_url":"git@github.com:Automattic/jetpack.git","clone_url":"https://github.com/Automattic/jetpack.git","svn_url":"https://github.com/Automattic/jetpack","homepage":"https://jetpack.com/","size":188213,"stargazers_count":617,"watchers_count":617,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":373,"mirror_url":null,"open_issues_count":823,"forks":373,"open_issues":823,"watchers":617,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/6132"},"html":{"href":"https://github.com/Automattic/jetpack/pull/6132"},"issue":{"href":"https://api.github.com/repos/Automattic/jetpack/issues/6132"},"comments":{"href":"https://api.github.com/repos/Automattic/jetpack/issues/6132/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/6132/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/6132/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/jetpack/statuses/e3f0c436a1d1b91d1c8b2e1902e316d82110fd7c"}}}}
{"actor":{"display_login":"dereksmart"}}