{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/118353304","pull_request_review_id":40137936,"id":118353304,"diff_hunk":"@@ -354,9 +376,10 @@ function sync_sidebar_widgets_actions( $old_value, $new_value ) {\n \t\t\t *\n \t\t\t * @since 4.9.0\n \t\t\t *\n-\t\t\t * @param array $sidebar, Sidebar id got changed\n+\t\t\t * @param array $moved_to_inactive, Array of widgets id that moved to inactive id got changed\n+\t\t\t * @param array $moved_to_inactive, Array of widgets names that moved to inactive id got changed Since 5.0.0\n \t\t\t */\n-\t\t\tdo_action( 'jetpack_widget_moved_to_inactive', $moved_to_inactive );\n+\t\t\tdo_action( 'jetpack_widget_moved_to_inactive', $moved_to_inactive, array_map( array( $this, 'get_widget_name' ), $moved_to_inactive ) );","path":"sync/class.jetpack-sync-module-themes.php","position":118,"original_position":118,"commit_id":"92dd78768adf8d3b6d006cbc750b3743ef38c044","original_commit_id":"92dd78768adf8d3b6d006cbc750b3743ef38c044","user":{"login":"gititon","id":3246867,"avatar_url":"https://avatars1.githubusercontent.com/u/3246867?v=3","gravatar_id":"","url":"https://api.github.com/users/gititon","html_url":"https://github.com/gititon","followers_url":"https://api.github.com/users/gititon/followers","following_url":"https://api.github.com/users/gititon/following{/other_user}","gists_url":"https://api.github.com/users/gititon/gists{/gist_id}","starred_url":"https://api.github.com/users/gititon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gititon/subscriptions","organizations_url":"https://api.github.com/users/gititon/orgs","repos_url":"https://api.github.com/users/gititon/repos","events_url":"https://api.github.com/users/gititon/events{/privacy}","received_events_url":"https://api.github.com/users/gititon/received_events","type":"User","site_admin":false},"body":"Consider renaming $moved_to_inactive to $moved_to_inactive_ids\r\nConsider reducing `array_map( array( $this, 'get_widget_name' ), $moved_to_inactive ) )` to a variable called $moved_to_inactive_names and passing it as an argument to do_action","created_at":"2017-05-24T20:14:04Z","updated_at":"2017-05-24T20:14:04Z","html_url":"https://github.com/Automattic/jetpack/pull/7217#discussion_r118353304","pull_request_url":"https://api.github.com/repos/Automattic/jetpack/pulls/7217","_links":{"self":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/comments/118353304"},"html":{"href":"https://github.com/Automattic/jetpack/pull/7217#discussion_r118353304"},"pull_request":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/7217"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/7217","id":121712365,"html_url":"https://github.com/Automattic/jetpack/pull/7217","diff_url":"https://github.com/Automattic/jetpack/pull/7217.diff","patch_url":"https://github.com/Automattic/jetpack/pull/7217.patch","issue_url":"https://api.github.com/repos/Automattic/jetpack/issues/7217","number":7217,"state":"open","locked":false,"title":"Sync: Update widgets so that we pass in the Widget name and Sidebar name when ever possible","user":{"login":"enejb","id":115071,"avatar_url":"https://avatars1.githubusercontent.com/u/115071?v=3","gravatar_id":"","url":"https://api.github.com/users/enejb","html_url":"https://github.com/enejb","followers_url":"https://api.github.com/users/enejb/followers","following_url":"https://api.github.com/users/enejb/following{/other_user}","gists_url":"https://api.github.com/users/enejb/gists{/gist_id}","starred_url":"https://api.github.com/users/enejb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enejb/subscriptions","organizations_url":"https://api.github.com/users/enejb/orgs","repos_url":"https://api.github.com/users/enejb/repos","events_url":"https://api.github.com/users/enejb/events{/privacy}","received_events_url":"https://api.github.com/users/enejb/received_events","type":"User","site_admin":false},"body":"Previously we were no passing in the widget name and the sidebar name. but instead were just passing in the ids. Which are not enough to build a user friendly Activity log. \r\n\r\nWe are adding the names the way we are so that they are backwards compatible if someone else is using the do_actions already. \r\n\r\n#### Changes proposed in this Pull Request:\r\n* In this pr we are adding the names of the sidebar and the widget whenever possible \r\n\r\n#### Testing instructions:\r\n* Do the test pass? Do it pass when testing things manually\r\n\r\n<!-- Add the following only if this is meant to be in changelog -->\r\n#### Proposed changelog entry for your changes:\r\n","created_at":"2017-05-22T07:19:41Z","updated_at":"2017-05-24T20:14:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"993cbbb253a8fcfbcc932ca63913af736fe66a9a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lezama","id":104869,"avatar_url":"https://avatars3.githubusercontent.com/u/104869?v=3","gravatar_id":"","url":"https://api.github.com/users/lezama","html_url":"https://github.com/lezama","followers_url":"https://api.github.com/users/lezama/followers","following_url":"https://api.github.com/users/lezama/following{/other_user}","gists_url":"https://api.github.com/users/lezama/gists{/gist_id}","starred_url":"https://api.github.com/users/lezama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lezama/subscriptions","organizations_url":"https://api.github.com/users/lezama/orgs","repos_url":"https://api.github.com/users/lezama/repos","events_url":"https://api.github.com/users/lezama/events{/privacy}","received_events_url":"https://api.github.com/users/lezama/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/jetpack/pulls/7217/commits","review_comments_url":"https://api.github.com/repos/Automattic/jetpack/pulls/7217/comments","review_comment_url":"https://api.github.com/repos/Automattic/jetpack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/jetpack/issues/7217/comments","statuses_url":"https://api.github.com/repos/Automattic/jetpack/statuses/92dd78768adf8d3b6d006cbc750b3743ef38c044","head":{"label":"Automattic:update/widget-sync-events","ref":"update/widget-sync-events","sha":"92dd78768adf8d3b6d006cbc750b3743ef38c044","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars2.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://avatars2.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-05-23T19:21:01Z","pushed_at":"2017-05-24T19:44:09Z","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":192756,"stargazers_count":653,"watchers_count":653,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":411,"mirror_url":null,"open_issues_count":789,"forks":411,"open_issues":789,"watchers":653,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"641796c0585718f2f0725e020ee461a03be3e1e6","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars2.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://avatars2.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-05-23T19:21:01Z","pushed_at":"2017-05-24T19:44:09Z","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":192756,"stargazers_count":653,"watchers_count":653,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":411,"mirror_url":null,"open_issues_count":789,"forks":411,"open_issues":789,"watchers":653,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/7217"},"html":{"href":"https://github.com/Automattic/jetpack/pull/7217"},"issue":{"href":"https://api.github.com/repos/Automattic/jetpack/issues/7217"},"comments":{"href":"https://api.github.com/repos/Automattic/jetpack/issues/7217/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/7217/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/jetpack/pulls/7217/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/jetpack/statuses/92dd78768adf8d3b6d006cbc750b3743ef38c044"}}}}
{"actor":{"display_login":"gititon"}}