{"action":"created","comment":{"url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/comments/111430522","pull_request_review_id":32677429,"id":111430522,"diff_hunk":"@@ -204,4 +204,42 @@ function tribe_is_truthy( $var ) {\n \t\t// For other types (ints, floats etc) cast to bool\n \t\treturn (bool) $var;\n \t}\n+}\n+\n+if ( ! function_exists( 'tribe_normalize_terms_list' ) ) {\n+\t/**\n+\t * Normalizes a list of terms to a list of fields.\n+\t *\n+\t * @param $terms A term or array of terms to normalize.\n+\t * @param string $taxonomy The terms taxonomy.\n+\t * @param string $field Teh fields the terms should be normalized to.\n+\t *\n+\t * @since 4.5\n+\t *\n+\t * @return array An array of the valid normalized terms.\n+\t */\n+\tfunction tribe_normalize_terms_list( $terms, $taxonomy, $field = 'term_id' ) {\n+\t\t$terms = is_array( $terms ) ? $terms : array( $terms );","path":"src/functions/utils.php","position":19,"original_position":19,"commit_id":"5702e0270e848a1ff5638cb759aba21d38847751","original_commit_id":"5702e0270e848a1ff5638cb759aba21d38847751","user":{"login":"bordoni","id":236579,"avatar_url":"https://avatars1.githubusercontent.com/u/236579?v=3","gravatar_id":"","url":"https://api.github.com/users/bordoni","html_url":"https://github.com/bordoni","followers_url":"https://api.github.com/users/bordoni/followers","following_url":"https://api.github.com/users/bordoni/following{/other_user}","gists_url":"https://api.github.com/users/bordoni/gists{/gist_id}","starred_url":"https://api.github.com/users/bordoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bordoni/subscriptions","organizations_url":"https://api.github.com/users/bordoni/orgs","repos_url":"https://api.github.com/users/bordoni/repos","events_url":"https://api.github.com/users/bordoni/events{/privacy}","received_events_url":"https://api.github.com/users/bordoni/received_events","type":"User","site_admin":false},"body":"Instead of a ternary, could we do:\r\n```php\r\nif ( ! is_array( $terms ) {\r\n    $terms = array( $terms ); \r\n}\r\n```","created_at":"2017-04-13T16:26:04Z","updated_at":"2017-04-13T16:27:31Z","html_url":"https://github.com/moderntribe/tribe-common/pull/358#discussion_r111430522","pull_request_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/358","_links":{"self":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/comments/111430522"},"html":{"href":"https://github.com/moderntribe/tribe-common/pull/358#discussion_r111430522"},"pull_request":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/358"}}},"pull_request":{"url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/358","id":115756427,"html_url":"https://github.com/moderntribe/tribe-common/pull/358","diff_url":"https://github.com/moderntribe/tribe-common/pull/358.diff","patch_url":"https://github.com/moderntribe/tribe-common/pull/358.patch","issue_url":"https://api.github.com/repos/moderntribe/tribe-common/issues/358","number":358,"state":"open","locked":false,"title":"Fix some minor Tracker issues","user":{"login":"lucatume","id":2749650,"avatar_url":"https://avatars2.githubusercontent.com/u/2749650?v=3","gravatar_id":"","url":"https://api.github.com/users/lucatume","html_url":"https://github.com/lucatume","followers_url":"https://api.github.com/users/lucatume/followers","following_url":"https://api.github.com/users/lucatume/following{/other_user}","gists_url":"https://api.github.com/users/lucatume/gists{/gist_id}","starred_url":"https://api.github.com/users/lucatume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucatume/subscriptions","organizations_url":"https://api.github.com/users/lucatume/orgs","repos_url":"https://api.github.com/users/lucatume/repos","events_url":"https://api.github.com/users/lucatume/events{/privacy}","received_events_url":"https://api.github.com/users/lucatume/received_events","type":"User","site_admin":false},"body":"Ticket: https://central.tri.be/issues/76534\n\nMinor fixes to our modified fields tracking syste.","created_at":"2017-04-13T13:27:21Z","updated_at":"2017-04-13T16:27:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d85983f6f11f44251d1642dbdce0bcb276b7f44","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/358/commits","review_comments_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/358/comments","review_comment_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moderntribe/tribe-common/issues/358/comments","statuses_url":"https://api.github.com/repos/moderntribe/tribe-common/statuses/5702e0270e848a1ff5638cb759aba21d38847751","head":{"label":"moderntribe:fix/76534-change-authority-fixes","ref":"fix/76534-change-authority-fixes","sha":"5702e0270e848a1ff5638cb759aba21d38847751","user":{"login":"moderntribe","id":2279551,"avatar_url":"https://avatars2.githubusercontent.com/u/2279551?v=3","gravatar_id":"","url":"https://api.github.com/users/moderntribe","html_url":"https://github.com/moderntribe","followers_url":"https://api.github.com/users/moderntribe/followers","following_url":"https://api.github.com/users/moderntribe/following{/other_user}","gists_url":"https://api.github.com/users/moderntribe/gists{/gist_id}","starred_url":"https://api.github.com/users/moderntribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moderntribe/subscriptions","organizations_url":"https://api.github.com/users/moderntribe/orgs","repos_url":"https://api.github.com/users/moderntribe/repos","events_url":"https://api.github.com/users/moderntribe/events{/privacy}","received_events_url":"https://api.github.com/users/moderntribe/received_events","type":"Organization","site_admin":false},"repo":{"id":41689794,"name":"tribe-common","full_name":"moderntribe/tribe-common","owner":{"login":"moderntribe","id":2279551,"avatar_url":"https://avatars2.githubusercontent.com/u/2279551?v=3","gravatar_id":"","url":"https://api.github.com/users/moderntribe","html_url":"https://github.com/moderntribe","followers_url":"https://api.github.com/users/moderntribe/followers","following_url":"https://api.github.com/users/moderntribe/following{/other_user}","gists_url":"https://api.github.com/users/moderntribe/gists{/gist_id}","starred_url":"https://api.github.com/users/moderntribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moderntribe/subscriptions","organizations_url":"https://api.github.com/users/moderntribe/orgs","repos_url":"https://api.github.com/users/moderntribe/repos","events_url":"https://api.github.com/users/moderntribe/events{/privacy}","received_events_url":"https://api.github.com/users/moderntribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moderntribe/tribe-common","description":"Common classes and functions used in our plugins","fork":false,"url":"https://api.github.com/repos/moderntribe/tribe-common","forks_url":"https://api.github.com/repos/moderntribe/tribe-common/forks","keys_url":"https://api.github.com/repos/moderntribe/tribe-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moderntribe/tribe-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moderntribe/tribe-common/teams","hooks_url":"https://api.github.com/repos/moderntribe/tribe-common/hooks","issue_events_url":"https://api.github.com/repos/moderntribe/tribe-common/issues/events{/number}","events_url":"https://api.github.com/repos/moderntribe/tribe-common/events","assignees_url":"https://api.github.com/repos/moderntribe/tribe-common/assignees{/user}","branches_url":"https://api.github.com/repos/moderntribe/tribe-common/branches{/branch}","tags_url":"https://api.github.com/repos/moderntribe/tribe-common/tags","blobs_url":"https://api.github.com/repos/moderntribe/tribe-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moderntribe/tribe-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moderntribe/tribe-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/moderntribe/tribe-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moderntribe/tribe-common/statuses/{sha}","languages_url":"https://api.github.com/repos/moderntribe/tribe-common/languages","stargazers_url":"https://api.github.com/repos/moderntribe/tribe-common/stargazers","contributors_url":"https://api.github.com/repos/moderntribe/tribe-common/contributors","subscribers_url":"https://api.github.com/repos/moderntribe/tribe-common/subscribers","subscription_url":"https://api.github.com/repos/moderntribe/tribe-common/subscription","commits_url":"https://api.github.com/repos/moderntribe/tribe-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/moderntribe/tribe-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/moderntribe/tribe-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/moderntribe/tribe-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/moderntribe/tribe-common/contents/{+path}","compare_url":"https://api.github.com/repos/moderntribe/tribe-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moderntribe/tribe-common/merges","archive_url":"https://api.github.com/repos/moderntribe/tribe-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moderntribe/tribe-common/downloads","issues_url":"https://api.github.com/repos/moderntribe/tribe-common/issues{/number}","pulls_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls{/number}","milestones_url":"https://api.github.com/repos/moderntribe/tribe-common/milestones{/number}","notifications_url":"https://api.github.com/repos/moderntribe/tribe-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moderntribe/tribe-common/labels{/name}","releases_url":"https://api.github.com/repos/moderntribe/tribe-common/releases{/id}","deployments_url":"https://api.github.com/repos/moderntribe/tribe-common/deployments","created_at":"2015-08-31T17:22:40Z","updated_at":"2017-03-10T14:40:33Z","pushed_at":"2017-04-13T15:59:11Z","git_url":"git://github.com/moderntribe/tribe-common.git","ssh_url":"git@github.com:moderntribe/tribe-common.git","clone_url":"https://github.com/moderntribe/tribe-common.git","svn_url":"https://github.com/moderntribe/tribe-common","homepage":null,"size":21255,"stargazers_count":6,"watchers_count":6,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":6,"default_branch":"develop"}},"base":{"label":"moderntribe:develop","ref":"develop","sha":"2ff2f323d58a052287e79b3e6a19fd955ba10a5c","user":{"login":"moderntribe","id":2279551,"avatar_url":"https://avatars2.githubusercontent.com/u/2279551?v=3","gravatar_id":"","url":"https://api.github.com/users/moderntribe","html_url":"https://github.com/moderntribe","followers_url":"https://api.github.com/users/moderntribe/followers","following_url":"https://api.github.com/users/moderntribe/following{/other_user}","gists_url":"https://api.github.com/users/moderntribe/gists{/gist_id}","starred_url":"https://api.github.com/users/moderntribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moderntribe/subscriptions","organizations_url":"https://api.github.com/users/moderntribe/orgs","repos_url":"https://api.github.com/users/moderntribe/repos","events_url":"https://api.github.com/users/moderntribe/events{/privacy}","received_events_url":"https://api.github.com/users/moderntribe/received_events","type":"Organization","site_admin":false},"repo":{"id":41689794,"name":"tribe-common","full_name":"moderntribe/tribe-common","owner":{"login":"moderntribe","id":2279551,"avatar_url":"https://avatars2.githubusercontent.com/u/2279551?v=3","gravatar_id":"","url":"https://api.github.com/users/moderntribe","html_url":"https://github.com/moderntribe","followers_url":"https://api.github.com/users/moderntribe/followers","following_url":"https://api.github.com/users/moderntribe/following{/other_user}","gists_url":"https://api.github.com/users/moderntribe/gists{/gist_id}","starred_url":"https://api.github.com/users/moderntribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moderntribe/subscriptions","organizations_url":"https://api.github.com/users/moderntribe/orgs","repos_url":"https://api.github.com/users/moderntribe/repos","events_url":"https://api.github.com/users/moderntribe/events{/privacy}","received_events_url":"https://api.github.com/users/moderntribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moderntribe/tribe-common","description":"Common classes and functions used in our plugins","fork":false,"url":"https://api.github.com/repos/moderntribe/tribe-common","forks_url":"https://api.github.com/repos/moderntribe/tribe-common/forks","keys_url":"https://api.github.com/repos/moderntribe/tribe-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moderntribe/tribe-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moderntribe/tribe-common/teams","hooks_url":"https://api.github.com/repos/moderntribe/tribe-common/hooks","issue_events_url":"https://api.github.com/repos/moderntribe/tribe-common/issues/events{/number}","events_url":"https://api.github.com/repos/moderntribe/tribe-common/events","assignees_url":"https://api.github.com/repos/moderntribe/tribe-common/assignees{/user}","branches_url":"https://api.github.com/repos/moderntribe/tribe-common/branches{/branch}","tags_url":"https://api.github.com/repos/moderntribe/tribe-common/tags","blobs_url":"https://api.github.com/repos/moderntribe/tribe-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moderntribe/tribe-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moderntribe/tribe-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/moderntribe/tribe-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moderntribe/tribe-common/statuses/{sha}","languages_url":"https://api.github.com/repos/moderntribe/tribe-common/languages","stargazers_url":"https://api.github.com/repos/moderntribe/tribe-common/stargazers","contributors_url":"https://api.github.com/repos/moderntribe/tribe-common/contributors","subscribers_url":"https://api.github.com/repos/moderntribe/tribe-common/subscribers","subscription_url":"https://api.github.com/repos/moderntribe/tribe-common/subscription","commits_url":"https://api.github.com/repos/moderntribe/tribe-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/moderntribe/tribe-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/moderntribe/tribe-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/moderntribe/tribe-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/moderntribe/tribe-common/contents/{+path}","compare_url":"https://api.github.com/repos/moderntribe/tribe-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moderntribe/tribe-common/merges","archive_url":"https://api.github.com/repos/moderntribe/tribe-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moderntribe/tribe-common/downloads","issues_url":"https://api.github.com/repos/moderntribe/tribe-common/issues{/number}","pulls_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls{/number}","milestones_url":"https://api.github.com/repos/moderntribe/tribe-common/milestones{/number}","notifications_url":"https://api.github.com/repos/moderntribe/tribe-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moderntribe/tribe-common/labels{/name}","releases_url":"https://api.github.com/repos/moderntribe/tribe-common/releases{/id}","deployments_url":"https://api.github.com/repos/moderntribe/tribe-common/deployments","created_at":"2015-08-31T17:22:40Z","updated_at":"2017-03-10T14:40:33Z","pushed_at":"2017-04-13T15:59:11Z","git_url":"git://github.com/moderntribe/tribe-common.git","ssh_url":"git@github.com:moderntribe/tribe-common.git","clone_url":"https://github.com/moderntribe/tribe-common.git","svn_url":"https://github.com/moderntribe/tribe-common","homepage":null,"size":21255,"stargazers_count":6,"watchers_count":6,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/358"},"html":{"href":"https://github.com/moderntribe/tribe-common/pull/358"},"issue":{"href":"https://api.github.com/repos/moderntribe/tribe-common/issues/358"},"comments":{"href":"https://api.github.com/repos/moderntribe/tribe-common/issues/358/comments"},"review_comments":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/358/comments"},"review_comment":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/358/commits"},"statuses":{"href":"https://api.github.com/repos/moderntribe/tribe-common/statuses/5702e0270e848a1ff5638cb759aba21d38847751"}}}}
{"actor":{"display_login":"bordoni"}}