{"action":"created","comment":{"url":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/comments/205556168","pull_request_review_id":140851104,"id":205556168,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTU1NjE2OA==","diff_hunk":"@@ -297,3 +301,208 @@ function responsive_calendar_body_classes( $classes ) {\n }\n \n add_filter( 'body_class', 'responsive_calendar_body_classes' );\n+\n+if ( ! function_exists( 'responsive_calendar_get_calendar_id' ) ) {\n+\t/**\n+\t * Retrieve the calendar ID for the calendar template.\n+\t *\n+\t * @return int $calendar_id Set from URL parameter if exists, else a site option.\n+\t */\n+\tfunction responsive_calendar_get_calendar_id() {\n+\t\treturn array_key_exists( 'cid', $_GET ) ? intval( $_GET['cid'] ) : get_option( 'bu_calendar_id' );\n+\t}\n+}\n+\n+if ( ! function_exists( 'responsive_calendar_get_calendar_url' ) ) {\n+\t/**\n+\t * Retrieve the calendar url for the calendar template.\n+\t *\n+\t * NOTE: This function may not be necessary. Seems like you could just call `get_permalink()`\n+\t *       on its own, without the need for declaring global $post.\n+\t *\n+\t * @global WP_POST $post The global WordPress post object.\n+\t *\n+\t * @return int $calendar_id Set from URL parameter if exists, else a site option.\n+\t */\n+\tfunction responsive_calendar_get_calendar_url() {\n+\t\tglobal $post;\n+\n+\t\treturn get_permalink( $post );\n+\t}\n+}\n+\n+if ( ! function_exists( 'responsive_calendar_get_event_id' ) ) {\n+\t/**\n+\t * Retrieve the event ID for the calendar template.\n+\t *\n+\t * @return int|null $event_id.\n+\t */\n+\tfunction responsive_calendar_get_event_id() {\n+\t\treturn array_key_exists( 'eid', $_GET ) ? intval( $_GET['eid'] ) : null;\n+\t}\n+}\n+\n+if ( ! function_exists( 'responsive_calendar_get_oid' ) ) {\n+\t/**\n+\t * Retrieve the oid for the calendar template.","path":"inc/calendar.php","position":94,"original_position":94,"commit_id":"e6db4940ecfd066caf972a250b7bdd22f41d7cdf","original_commit_id":"e6db4940ecfd066caf972a250b7bdd22f41d7cdf","user":{"login":"Adam42","id":217390,"node_id":"MDQ6VXNlcjIxNzM5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/217390?v=4","gravatar_id":"","url":"https://api.github.com/users/Adam42","html_url":"https://github.com/Adam42","followers_url":"https://api.github.com/users/Adam42/followers","following_url":"https://api.github.com/users/Adam42/following{/other_user}","gists_url":"https://api.github.com/users/Adam42/gists{/gist_id}","starred_url":"https://api.github.com/users/Adam42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adam42/subscriptions","organizations_url":"https://api.github.com/users/Adam42/orgs","repos_url":"https://api.github.com/users/Adam42/repos","events_url":"https://api.github.com/users/Adam42/events{/privacy}","received_events_url":"https://api.github.com/users/Adam42/received_events","type":"User","site_admin":false},"body":"And yes for the ten foot pole, there are many dragons in the land of occurrence/recurrence in calendar.","created_at":"2018-07-26T18:20:58Z","updated_at":"2018-07-26T18:20:58Z","html_url":"https://github.com/bu-ist/responsive-framework/pull/37#discussion_r205556168","pull_request_url":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/37","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/comments/205556168"},"html":{"href":"https://github.com/bu-ist/responsive-framework/pull/37#discussion_r205556168"},"pull_request":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/37"}},"in_reply_to_id":204799018},"pull_request":{"url":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/37","id":203322857,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzMzIyODU3","html_url":"https://github.com/bu-ist/responsive-framework/pull/37","diff_url":"https://github.com/bu-ist/responsive-framework/pull/37.diff","patch_url":"https://github.com/bu-ist/responsive-framework/pull/37.patch","issue_url":"https://api.github.com/repos/bu-ist/responsive-framework/issues/37","number":37,"state":"open","locked":false,"title":"Feature/calendar template refactor","user":{"login":"toddmilliken","id":26465346,"node_id":"MDQ6VXNlcjI2NDY1MzQ2","avatar_url":"https://avatars3.githubusercontent.com/u/26465346?v=4","gravatar_id":"","url":"https://api.github.com/users/toddmilliken","html_url":"https://github.com/toddmilliken","followers_url":"https://api.github.com/users/toddmilliken/followers","following_url":"https://api.github.com/users/toddmilliken/following{/other_user}","gists_url":"https://api.github.com/users/toddmilliken/gists{/gist_id}","starred_url":"https://api.github.com/users/toddmilliken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddmilliken/subscriptions","organizations_url":"https://api.github.com/users/toddmilliken/orgs","repos_url":"https://api.github.com/users/toddmilliken/repos","events_url":"https://api.github.com/users/toddmilliken/events{/privacy}","received_events_url":"https://api.github.com/users/toddmilliken/received_events","type":"User","site_admin":false},"body":"Fixes #33.\r\n\r\n### Changes proposed in this pull request\r\n\r\n- Moves logic from the page template into appropriate template-part/partials (one for single-event view, one for calendar view)\r\n- Moves logic chunks into the `/inc/calendar.php` functions file where widget functionality also lives for this template.\r\n- Takes care of some minor bugfixes like invalid HTML or minor codesniffer issues.\r\n\r\n### Review checklist\r\n\r\n[x] I've reviewed the [contribution guidelines](https://github.com/bu-ist/coding-standards/blob/develop/CONTRIBUTING.md).\r\n[x] I've updated `CHANGELOG.MD` with a brief explanation of the main changes in this pull request.\r\n[x] My code follows [BU Coding Standards](https://github.com/bu-ist/coding-standards).\r\n","created_at":"2018-07-23T19:43:08Z","updated_at":"2018-07-26T18:20:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f40673ce05d6715df9e3f99d4cd3a6350c896d21","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/37/commits","review_comments_url":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/37/comments","review_comment_url":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bu-ist/responsive-framework/issues/37/comments","statuses_url":"https://api.github.com/repos/bu-ist/responsive-framework/statuses/e6db4940ecfd066caf972a250b7bdd22f41d7cdf","head":{"label":"bu-ist:feature/calendar-template-refactor","ref":"feature/calendar-template-refactor","sha":"e6db4940ecfd066caf972a250b7bdd22f41d7cdf","user":{"login":"bu-ist","id":1503590,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDM1OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1503590?v=4","gravatar_id":"","url":"https://api.github.com/users/bu-ist","html_url":"https://github.com/bu-ist","followers_url":"https://api.github.com/users/bu-ist/followers","following_url":"https://api.github.com/users/bu-ist/following{/other_user}","gists_url":"https://api.github.com/users/bu-ist/gists{/gist_id}","starred_url":"https://api.github.com/users/bu-ist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bu-ist/subscriptions","organizations_url":"https://api.github.com/users/bu-ist/orgs","repos_url":"https://api.github.com/users/bu-ist/repos","events_url":"https://api.github.com/users/bu-ist/events{/privacy}","received_events_url":"https://api.github.com/users/bu-ist/received_events","type":"Organization","site_admin":false},"repo":{"id":138750584,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3NTA1ODQ=","name":"responsive-framework","full_name":"bu-ist/responsive-framework","owner":{"login":"bu-ist","id":1503590,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDM1OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1503590?v=4","gravatar_id":"","url":"https://api.github.com/users/bu-ist","html_url":"https://github.com/bu-ist","followers_url":"https://api.github.com/users/bu-ist/followers","following_url":"https://api.github.com/users/bu-ist/following{/other_user}","gists_url":"https://api.github.com/users/bu-ist/gists{/gist_id}","starred_url":"https://api.github.com/users/bu-ist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bu-ist/subscriptions","organizations_url":"https://api.github.com/users/bu-ist/orgs","repos_url":"https://api.github.com/users/bu-ist/repos","events_url":"https://api.github.com/users/bu-ist/events{/privacy}","received_events_url":"https://api.github.com/users/bu-ist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bu-ist/responsive-framework","description":null,"fork":false,"url":"https://api.github.com/repos/bu-ist/responsive-framework","forks_url":"https://api.github.com/repos/bu-ist/responsive-framework/forks","keys_url":"https://api.github.com/repos/bu-ist/responsive-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bu-ist/responsive-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bu-ist/responsive-framework/teams","hooks_url":"https://api.github.com/repos/bu-ist/responsive-framework/hooks","issue_events_url":"https://api.github.com/repos/bu-ist/responsive-framework/issues/events{/number}","events_url":"https://api.github.com/repos/bu-ist/responsive-framework/events","assignees_url":"https://api.github.com/repos/bu-ist/responsive-framework/assignees{/user}","branches_url":"https://api.github.com/repos/bu-ist/responsive-framework/branches{/branch}","tags_url":"https://api.github.com/repos/bu-ist/responsive-framework/tags","blobs_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bu-ist/responsive-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/bu-ist/responsive-framework/languages","stargazers_url":"https://api.github.com/repos/bu-ist/responsive-framework/stargazers","contributors_url":"https://api.github.com/repos/bu-ist/responsive-framework/contributors","subscribers_url":"https://api.github.com/repos/bu-ist/responsive-framework/subscribers","subscription_url":"https://api.github.com/repos/bu-ist/responsive-framework/subscription","commits_url":"https://api.github.com/repos/bu-ist/responsive-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/bu-ist/responsive-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/bu-ist/responsive-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/bu-ist/responsive-framework/contents/{+path}","compare_url":"https://api.github.com/repos/bu-ist/responsive-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bu-ist/responsive-framework/merges","archive_url":"https://api.github.com/repos/bu-ist/responsive-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bu-ist/responsive-framework/downloads","issues_url":"https://api.github.com/repos/bu-ist/responsive-framework/issues{/number}","pulls_url":"https://api.github.com/repos/bu-ist/responsive-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/bu-ist/responsive-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/bu-ist/responsive-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bu-ist/responsive-framework/labels{/name}","releases_url":"https://api.github.com/repos/bu-ist/responsive-framework/releases{/id}","deployments_url":"https://api.github.com/repos/bu-ist/responsive-framework/deployments","created_at":"2018-06-26T14:33:14Z","updated_at":"2018-07-25T16:20:32Z","pushed_at":"2018-07-26T16:58:00Z","git_url":"git://github.com/bu-ist/responsive-framework.git","ssh_url":"git@github.com:bu-ist/responsive-framework.git","clone_url":"https://github.com/bu-ist/responsive-framework.git","svn_url":"https://github.com/bu-ist/responsive-framework","homepage":null,"size":5284,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":36,"license":null,"forks":0,"open_issues":36,"watchers":0,"default_branch":"master"}},"base":{"label":"bu-ist:develop","ref":"develop","sha":"1023ceda59377795f28741a8fb4d99477fd99096","user":{"login":"bu-ist","id":1503590,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDM1OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1503590?v=4","gravatar_id":"","url":"https://api.github.com/users/bu-ist","html_url":"https://github.com/bu-ist","followers_url":"https://api.github.com/users/bu-ist/followers","following_url":"https://api.github.com/users/bu-ist/following{/other_user}","gists_url":"https://api.github.com/users/bu-ist/gists{/gist_id}","starred_url":"https://api.github.com/users/bu-ist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bu-ist/subscriptions","organizations_url":"https://api.github.com/users/bu-ist/orgs","repos_url":"https://api.github.com/users/bu-ist/repos","events_url":"https://api.github.com/users/bu-ist/events{/privacy}","received_events_url":"https://api.github.com/users/bu-ist/received_events","type":"Organization","site_admin":false},"repo":{"id":138750584,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3NTA1ODQ=","name":"responsive-framework","full_name":"bu-ist/responsive-framework","owner":{"login":"bu-ist","id":1503590,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDM1OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1503590?v=4","gravatar_id":"","url":"https://api.github.com/users/bu-ist","html_url":"https://github.com/bu-ist","followers_url":"https://api.github.com/users/bu-ist/followers","following_url":"https://api.github.com/users/bu-ist/following{/other_user}","gists_url":"https://api.github.com/users/bu-ist/gists{/gist_id}","starred_url":"https://api.github.com/users/bu-ist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bu-ist/subscriptions","organizations_url":"https://api.github.com/users/bu-ist/orgs","repos_url":"https://api.github.com/users/bu-ist/repos","events_url":"https://api.github.com/users/bu-ist/events{/privacy}","received_events_url":"https://api.github.com/users/bu-ist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bu-ist/responsive-framework","description":null,"fork":false,"url":"https://api.github.com/repos/bu-ist/responsive-framework","forks_url":"https://api.github.com/repos/bu-ist/responsive-framework/forks","keys_url":"https://api.github.com/repos/bu-ist/responsive-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bu-ist/responsive-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bu-ist/responsive-framework/teams","hooks_url":"https://api.github.com/repos/bu-ist/responsive-framework/hooks","issue_events_url":"https://api.github.com/repos/bu-ist/responsive-framework/issues/events{/number}","events_url":"https://api.github.com/repos/bu-ist/responsive-framework/events","assignees_url":"https://api.github.com/repos/bu-ist/responsive-framework/assignees{/user}","branches_url":"https://api.github.com/repos/bu-ist/responsive-framework/branches{/branch}","tags_url":"https://api.github.com/repos/bu-ist/responsive-framework/tags","blobs_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bu-ist/responsive-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/bu-ist/responsive-framework/languages","stargazers_url":"https://api.github.com/repos/bu-ist/responsive-framework/stargazers","contributors_url":"https://api.github.com/repos/bu-ist/responsive-framework/contributors","subscribers_url":"https://api.github.com/repos/bu-ist/responsive-framework/subscribers","subscription_url":"https://api.github.com/repos/bu-ist/responsive-framework/subscription","commits_url":"https://api.github.com/repos/bu-ist/responsive-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/bu-ist/responsive-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/bu-ist/responsive-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/bu-ist/responsive-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/bu-ist/responsive-framework/contents/{+path}","compare_url":"https://api.github.com/repos/bu-ist/responsive-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bu-ist/responsive-framework/merges","archive_url":"https://api.github.com/repos/bu-ist/responsive-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bu-ist/responsive-framework/downloads","issues_url":"https://api.github.com/repos/bu-ist/responsive-framework/issues{/number}","pulls_url":"https://api.github.com/repos/bu-ist/responsive-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/bu-ist/responsive-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/bu-ist/responsive-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bu-ist/responsive-framework/labels{/name}","releases_url":"https://api.github.com/repos/bu-ist/responsive-framework/releases{/id}","deployments_url":"https://api.github.com/repos/bu-ist/responsive-framework/deployments","created_at":"2018-06-26T14:33:14Z","updated_at":"2018-07-25T16:20:32Z","pushed_at":"2018-07-26T16:58:00Z","git_url":"git://github.com/bu-ist/responsive-framework.git","ssh_url":"git@github.com:bu-ist/responsive-framework.git","clone_url":"https://github.com/bu-ist/responsive-framework.git","svn_url":"https://github.com/bu-ist/responsive-framework","homepage":null,"size":5284,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":36,"license":null,"forks":0,"open_issues":36,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/37"},"html":{"href":"https://github.com/bu-ist/responsive-framework/pull/37"},"issue":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/issues/37"},"comments":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/bu-ist/responsive-framework/statuses/e6db4940ecfd066caf972a250b7bdd22f41d7cdf"}},"author_association":"NONE"}}
{"actor":{"display_login":"Adam42"}}