payload: {"action":"created","comment":{"url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/comments/359454462","pull_request_review_id":334098348,"id":359454462,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1OTQ1NDQ2Mg==","diff_hunk":"@@ -40,48 +40,44 @@ class PageBanner extends InsiteDatabaseObject\n     public static function initialize()\n     {\n         global $page, $nav;\n+        \n         if (!$nav) {\n             $nav = new Navigation();\n         }\n         $section = $nav->active_section();\n         \n-        $records = static::find_all();\n+        $record = static::find_all_by_layout_table()[0];\n         // First we need to check if there's a record for the current page\n-        $active_record = array_values(array_filter($records, function($a) use ($page) {\n-            return ($a->page() && $a->page()[0]->id() == $page->id());\n-        }))[0];\n         // We couldn't find a page record, so let's look for a parent record\n-        if (!$active_record) {\n+        if (!$record || !$record->title() && !$record->image()) {\n             $parent = $page->parent();\n             if ($parent) {\n                 if ($section) {\n-                    $active_record = array_values(array_filter($records, function($a) use($parent, $section) {\n-                        // If the page parent is the homepage or the top-level section page, return\n-                        if ($parent->id() == 1 || $parent->id() == $section->page->id()) return;\n+                    if ($parent->id() != 1 && $parent->id() == $section->page->id()) {","path":"code_includes/class-page-banner.php","position":34,"original_position":34,"commit_id":"0ade14db42f367e71d2192835774049b5f55f37e","original_commit_id":"0ade14db42f367e71d2192835774049b5f55f37e","user":{"login":"mattequisolve","id":3997444,"node_id":"MDQ6VXNlcjM5OTc0NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3997444?v=4","gravatar_id":"","url":"https://api.github.com/users/mattequisolve","html_url":"https://github.com/mattequisolve","followers_url":"https://api.github.com/users/mattequisolve/followers","following_url":"https://api.github.com/users/mattequisolve/following{/other_user}","gists_url":"https://api.github.com/users/mattequisolve/gists{/gist_id}","starred_url":"https://api.github.com/users/mattequisolve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattequisolve/subscriptions","organizations_url":"https://api.github.com/users/mattequisolve/orgs","repos_url":"https://api.github.com/users/mattequisolve/repos","events_url":"https://api.github.com/users/mattequisolve/events{/privacy}","received_events_url":"https://api.github.com/users/mattequisolve/received_events","type":"User","site_admin":false},"body":"Seems like you need another check for $section here","created_at":"2019-12-18T16:49:18Z","updated_at":"2019-12-18T16:51:06Z","html_url":"https://github.com/equisolve/company-devcompanytemplate/pull/1#discussion_r359454462","pull_request_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/comments/359454462"},"html":{"href":"https://github.com/equisolve/company-devcompanytemplate/pull/1#discussion_r359454462"},"pull_request":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/1","id":354336885,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU0MzM2ODg1","html_url":"https://github.com/equisolve/company-devcompanytemplate/pull/1","diff_url":"https://github.com/equisolve/company-devcompanytemplate/pull/1.diff","patch_url":"https://github.com/equisolve/company-devcompanytemplate/pull/1.patch","issue_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues/1","number":1,"state":"open","locked":false,"title":"New work","user":{"login":"insitebot","id":16671082,"node_id":"MDQ6VXNlcjE2NjcxMDgy","avatar_url":"https://avatars1.githubusercontent.com/u/16671082?v=4","gravatar_id":"","url":"https://api.github.com/users/insitebot","html_url":"https://github.com/insitebot","followers_url":"https://api.github.com/users/insitebot/followers","following_url":"https://api.github.com/users/insitebot/following{/other_user}","gists_url":"https://api.github.com/users/insitebot/gists{/gist_id}","starred_url":"https://api.github.com/users/insitebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insitebot/subscriptions","organizations_url":"https://api.github.com/users/insitebot/orgs","repos_url":"https://api.github.com/users/insitebot/repos","events_url":"https://api.github.com/users/insitebot/events{/privacy}","received_events_url":"https://api.github.com/users/insitebot/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-12-17T22:22:28Z","updated_at":"2019-12-18T16:51:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b0dbb58cb4ad7215d447b3947e2e575ddb7b8ce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/1/commits","review_comments_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/1/comments","review_comment_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues/1/comments","statuses_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/statuses/0ade14db42f367e71d2192835774049b5f55f37e","head":{"label":"equisolve:new_work","ref":"new_work","sha":"0ade14db42f367e71d2192835774049b5f55f37e","user":{"login":"equisolve","id":232838,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjgzOA==","avatar_url":"https://avatars2.githubusercontent.com/u/232838?v=4","gravatar_id":"","url":"https://api.github.com/users/equisolve","html_url":"https://github.com/equisolve","followers_url":"https://api.github.com/users/equisolve/followers","following_url":"https://api.github.com/users/equisolve/following{/other_user}","gists_url":"https://api.github.com/users/equisolve/gists{/gist_id}","starred_url":"https://api.github.com/users/equisolve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equisolve/subscriptions","organizations_url":"https://api.github.com/users/equisolve/orgs","repos_url":"https://api.github.com/users/equisolve/repos","events_url":"https://api.github.com/users/equisolve/events{/privacy}","received_events_url":"https://api.github.com/users/equisolve/received_events","type":"Organization","site_admin":false},"repo":{"id":228711611,"node_id":"MDEwOlJlcG9zaXRvcnkyMjg3MTE2MTE=","name":"company-devcompanytemplate","full_name":"equisolve/company-devcompanytemplate","private":false,"owner":{"login":"equisolve","id":232838,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjgzOA==","avatar_url":"https://avatars2.githubusercontent.com/u/232838?v=4","gravatar_id":"","url":"https://api.github.com/users/equisolve","html_url":"https://github.com/equisolve","followers_url":"https://api.github.com/users/equisolve/followers","following_url":"https://api.github.com/users/equisolve/following{/other_user}","gists_url":"https://api.github.com/users/equisolve/gists{/gist_id}","starred_url":"https://api.github.com/users/equisolve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equisolve/subscriptions","organizations_url":"https://api.github.com/users/equisolve/orgs","repos_url":"https://api.github.com/users/equisolve/repos","events_url":"https://api.github.com/users/equisolve/events{/privacy}","received_events_url":"https://api.github.com/users/equisolve/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/equisolve/company-devcompanytemplate","description":null,"fork":false,"url":"https://api.github.com/repos/equisolve/company-devcompanytemplate","forks_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/forks","keys_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/teams","hooks_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/hooks","issue_events_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues/events{/number}","events_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/events","assignees_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/assignees{/user}","branches_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/branches{/branch}","tags_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/tags","blobs_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/statuses/{sha}","languages_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/languages","stargazers_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/stargazers","contributors_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/contributors","subscribers_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/subscribers","subscription_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/subscription","commits_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/contents/{+path}","compare_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/merges","archive_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/downloads","issues_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues{/number}","pulls_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls{/number}","milestones_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/milestones{/number}","notifications_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/labels{/name}","releases_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/releases{/id}","deployments_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/deployments","created_at":"2019-12-17T22:20:10Z","updated_at":"2019-12-17T22:20:45Z","pushed_at":"2019-12-17T22:22:29Z","git_url":"git://github.com/equisolve/company-devcompanytemplate.git","ssh_url":"git@github.com:equisolve/company-devcompanytemplate.git","clone_url":"https://github.com/equisolve/company-devcompanytemplate.git","svn_url":"https://github.com/equisolve/company-devcompanytemplate","homepage":"","size":276,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"equisolve:master","ref":"master","sha":"e8860c684a0c7b6ed49997d80982ffbc6c0a426b","user":{"login":"equisolve","id":232838,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjgzOA==","avatar_url":"https://avatars2.githubusercontent.com/u/232838?v=4","gravatar_id":"","url":"https://api.github.com/users/equisolve","html_url":"https://github.com/equisolve","followers_url":"https://api.github.com/users/equisolve/followers","following_url":"https://api.github.com/users/equisolve/following{/other_user}","gists_url":"https://api.github.com/users/equisolve/gists{/gist_id}","starred_url":"https://api.github.com/users/equisolve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equisolve/subscriptions","organizations_url":"https://api.github.com/users/equisolve/orgs","repos_url":"https://api.github.com/users/equisolve/repos","events_url":"https://api.github.com/users/equisolve/events{/privacy}","received_events_url":"https://api.github.com/users/equisolve/received_events","type":"Organization","site_admin":false},"repo":{"id":228711611,"node_id":"MDEwOlJlcG9zaXRvcnkyMjg3MTE2MTE=","name":"company-devcompanytemplate","full_name":"equisolve/company-devcompanytemplate","private":false,"owner":{"login":"equisolve","id":232838,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjgzOA==","avatar_url":"https://avatars2.githubusercontent.com/u/232838?v=4","gravatar_id":"","url":"https://api.github.com/users/equisolve","html_url":"https://github.com/equisolve","followers_url":"https://api.github.com/users/equisolve/followers","following_url":"https://api.github.com/users/equisolve/following{/other_user}","gists_url":"https://api.github.com/users/equisolve/gists{/gist_id}","starred_url":"https://api.github.com/users/equisolve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equisolve/subscriptions","organizations_url":"https://api.github.com/users/equisolve/orgs","repos_url":"https://api.github.com/users/equisolve/repos","events_url":"https://api.github.com/users/equisolve/events{/privacy}","received_events_url":"https://api.github.com/users/equisolve/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/equisolve/company-devcompanytemplate","description":null,"fork":false,"url":"https://api.github.com/repos/equisolve/company-devcompanytemplate","forks_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/forks","keys_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/teams","hooks_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/hooks","issue_events_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues/events{/number}","events_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/events","assignees_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/assignees{/user}","branches_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/branches{/branch}","tags_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/tags","blobs_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/statuses/{sha}","languages_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/languages","stargazers_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/stargazers","contributors_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/contributors","subscribers_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/subscribers","subscription_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/subscription","commits_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/contents/{+path}","compare_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/merges","archive_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/downloads","issues_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues{/number}","pulls_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls{/number}","milestones_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/milestones{/number}","notifications_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/labels{/name}","releases_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/releases{/id}","deployments_url":"https://api.github.com/repos/equisolve/company-devcompanytemplate/deployments","created_at":"2019-12-17T22:20:10Z","updated_at":"2019-12-17T22:20:45Z","pushed_at":"2019-12-17T22:22:29Z","git_url":"git://github.com/equisolve/company-devcompanytemplate.git","ssh_url":"git@github.com:equisolve/company-devcompanytemplate.git","clone_url":"https://github.com/equisolve/company-devcompanytemplate.git","svn_url":"https://github.com/equisolve/company-devcompanytemplate","homepage":"","size":276,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/1"},"html":{"href":"https://github.com/equisolve/company-devcompanytemplate/pull/1"},"issue":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues/1"},"comments":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/equisolve/company-devcompanytemplate/statuses/0ade14db42f367e71d2192835774049b5f55f37e"}},"author_association":"COLLABORATOR"}}
other: {"actor":{"display_login":"mattequisolve"}}