{"action":"created","comment":{"url":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/comments/92512261","pull_request_review_id":13028856,"id":92512261,"diff_hunk":"@@ -0,0 +1,280 @@\n+<?php\n+\n+namespace WPCW;\n+\n+if ( ! defined( 'ABSPATH' ) ) {\n+\n+\texit;\n+\n+}\n+\n+final class Hours extends Base_Widget {\n+\n+\t/**\n+\t * Widget constructor\n+\t */\n+\tpublic function __construct() {\n+\n+\t\t$widget_options = [\n+\t\t\t'classname'                   => 'wpcw-widgets wpcw-widget-hours',\n+\t\t\t'description'                 => __( 'Display your hours of operation.', 'contact-widgets' ),\n+\t\t\t'customize_selective_refresh' => true,\n+\t\t];\n+\n+\t\tparent::__construct(\n+\t\t\t'wpcw_hours',\n+\t\t\t__( 'Hours of Operation', 'contact-widgets' ),\n+\t\t\t$widget_options\n+\t\t);\n+\n+\t}\n+\n+\t/**\n+\t * Widget form fields\n+\t *\n+\t * @param array $instance The widget options\n+\t *\n+\t * @return string|void\n+\t */\n+\tpublic function form( $instance ) {\n+\n+\t\tparent::form( $instance );\n+\n+\t\t$fields = $this->get_fields( $instance );\n+\n+\t\techo '<div class=\"wpcw-widget wpcw-widget-hours\">';\n+\n+\t\techo '<div class=\"title\">';\n+\n+\t\t// Title field\n+\t\t$this->render_form_input( array_shift( $fields ) );\n+\n+\t\techo '</div>';\n+\n+\t\techo '<div class=\"form\">';\n+\n+\t\tforeach ( $fields as $key => $field ) {\n+\n+\t\t\tif ( 'days' === $key ) {\n+\n+\t\t\t\tparent::print_label( $field );\n+\n+\t\t\t\tforeach ( $field['days'] as $day => $hours ) {\n+\n+\t\t\t\t\t$this->render_day_input( $fields['days'], $day, $hours );\n+\n+\t\t\t\t}\n+\n+\t\t\t\tcontinue;\n+\n+\t\t\t}\n+\n+\t\t\t$method = $field['form_callback'];\n+\n+\t\t\tif ( is_callable( [ $this, $method ] ) ) {\n+\n+\t\t\t\t$this->$method( $field );\n+\n+\t\t\t}\n+\n+\t\t}\n+\n+\t\t// Workaround customizer refresh @props @westonruter\n+\t\techo '<input class=\"customizer_update\" type=\"hidden\" value=\"\">';\n+\n+\t\techo '</div>'; // End form\n+\n+\t\techo '</div>'; // End wpcw-widget-hours\n+\n+\t}\n+\n+\t/**\n+\t * Front-end display\n+\t *\n+\t * @param array $args\n+\t * @param array $instance\n+\t */\n+\tpublic function widget( $args, $instance ) {\n+\n+\t\t$fields = $this->get_fields( $instance );\n+\n+\t\tif ( $this->is_widget_empty( $fields ) ) {\n+\n+\t\t\treturn;\n+\n+\t\t}\n+\n+\t\t$this->before_widget( $args, $fields );\n+\n+\t\tforeach ( $fields as $field ) {\n+\n+\t\t\tif ( isset( $field['days'] ) ) {\n+\n+\t\t\t\tforeach ( $field['days'] as $day_of_week => $store_hours ) {\n+\n+\t\t\t\t\t$hours = $store_hours['not_open'] ? __( 'Closed', 'contact-widgets' ) : $store_hours['open'] . apply_filters( 'wpcw_hours_seperator', ' - ' ) . $store_hours['closed'];\n+\t\t\t\t\t$class = $store_hours['not_open'] ? 'closed' : 'open';\n+\n+\t\t\t\t\tif ( $store_hours['custom_text_checkbox'] ) {","path":"includes/class-hours.php","position":118,"original_position":118,"commit_id":"ae5944c6089d5e08a2b6af62bcbd4529219046af","original_commit_id":"ae5944c6089d5e08a2b6af62bcbd4529219046af","user":{"login":"EvanHerman","id":5321364,"avatar_url":"https://avatars.githubusercontent.com/u/5321364?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHerman","html_url":"https://github.com/EvanHerman","followers_url":"https://api.github.com/users/EvanHerman/followers","following_url":"https://api.github.com/users/EvanHerman/following{/other_user}","gists_url":"https://api.github.com/users/EvanHerman/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHerman/subscriptions","organizations_url":"https://api.github.com/users/EvanHerman/orgs","repos_url":"https://api.github.com/users/EvanHerman/repos","events_url":"https://api.github.com/users/EvanHerman/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHerman/received_events","type":"User","site_admin":false},"body":"It's worth noting here that when a user has a 'custom text' specified the micro formats are not added to the hours of operation item.","created_at":"2016-12-14T23:13:34Z","updated_at":"2016-12-14T23:14:32Z","html_url":"https://github.com/godaddy/wp-contact-widgets/pull/22#discussion_r92512261","pull_request_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/comments/92512261"},"html":{"href":"https://github.com/godaddy/wp-contact-widgets/pull/22#discussion_r92512261"},"pull_request":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/22","id":97811694,"html_url":"https://github.com/godaddy/wp-contact-widgets/pull/22","diff_url":"https://github.com/godaddy/wp-contact-widgets/pull/22.diff","patch_url":"https://github.com/godaddy/wp-contact-widgets/pull/22.patch","issue_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues/22","number":22,"state":"open","locked":false,"title":"Hours of Operation Widget","user":{"login":"EvanHerman","id":5321364,"avatar_url":"https://avatars.githubusercontent.com/u/5321364?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHerman","html_url":"https://github.com/EvanHerman","followers_url":"https://api.github.com/users/EvanHerman/followers","following_url":"https://api.github.com/users/EvanHerman/following{/other_user}","gists_url":"https://api.github.com/users/EvanHerman/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHerman/subscriptions","organizations_url":"https://api.github.com/users/EvanHerman/orgs","repos_url":"https://api.github.com/users/EvanHerman/repos","events_url":"https://api.github.com/users/EvanHerman/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHerman/received_events","type":"User","site_admin":false},"body":"Creating an hours of operation widget.","created_at":"2016-12-13T18:49:47Z","updated_at":"2016-12-14T23:14:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5811b74b59d31b9d302637d6976c342f353f1fb1","assignee":{"login":"EvanHerman","id":5321364,"avatar_url":"https://avatars.githubusercontent.com/u/5321364?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHerman","html_url":"https://github.com/EvanHerman","followers_url":"https://api.github.com/users/EvanHerman/followers","following_url":"https://api.github.com/users/EvanHerman/following{/other_user}","gists_url":"https://api.github.com/users/EvanHerman/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHerman/subscriptions","organizations_url":"https://api.github.com/users/EvanHerman/orgs","repos_url":"https://api.github.com/users/EvanHerman/repos","events_url":"https://api.github.com/users/EvanHerman/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHerman/received_events","type":"User","site_admin":false},"assignees":[{"login":"EvanHerman","id":5321364,"avatar_url":"https://avatars.githubusercontent.com/u/5321364?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHerman","html_url":"https://github.com/EvanHerman","followers_url":"https://api.github.com/users/EvanHerman/followers","following_url":"https://api.github.com/users/EvanHerman/following{/other_user}","gists_url":"https://api.github.com/users/EvanHerman/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHerman/subscriptions","organizations_url":"https://api.github.com/users/EvanHerman/orgs","repos_url":"https://api.github.com/users/EvanHerman/repos","events_url":"https://api.github.com/users/EvanHerman/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHerman/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/22/commits","review_comments_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/22/comments","review_comment_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues/22/comments","statuses_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/statuses/ae5944c6089d5e08a2b6af62bcbd4529219046af","head":{"label":"godaddy:hours-of-operation","ref":"hours-of-operation","sha":"ae5944c6089d5e08a2b6af62bcbd4529219046af","user":{"login":"godaddy","id":1406546,"avatar_url":"https://avatars.githubusercontent.com/u/1406546?v=3","gravatar_id":"","url":"https://api.github.com/users/godaddy","html_url":"https://github.com/godaddy","followers_url":"https://api.github.com/users/godaddy/followers","following_url":"https://api.github.com/users/godaddy/following{/other_user}","gists_url":"https://api.github.com/users/godaddy/gists{/gist_id}","starred_url":"https://api.github.com/users/godaddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godaddy/subscriptions","organizations_url":"https://api.github.com/users/godaddy/orgs","repos_url":"https://api.github.com/users/godaddy/repos","events_url":"https://api.github.com/users/godaddy/events{/privacy}","received_events_url":"https://api.github.com/users/godaddy/received_events","type":"Organization","site_admin":false},"repo":{"id":53422711,"name":"wp-contact-widgets","full_name":"godaddy/wp-contact-widgets","owner":{"login":"godaddy","id":1406546,"avatar_url":"https://avatars.githubusercontent.com/u/1406546?v=3","gravatar_id":"","url":"https://api.github.com/users/godaddy","html_url":"https://github.com/godaddy","followers_url":"https://api.github.com/users/godaddy/followers","following_url":"https://api.github.com/users/godaddy/following{/other_user}","gists_url":"https://api.github.com/users/godaddy/gists{/gist_id}","starred_url":"https://api.github.com/users/godaddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godaddy/subscriptions","organizations_url":"https://api.github.com/users/godaddy/orgs","repos_url":"https://api.github.com/users/godaddy/repos","events_url":"https://api.github.com/users/godaddy/events{/privacy}","received_events_url":"https://api.github.com/users/godaddy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/godaddy/wp-contact-widgets","description":"Beautifully display social media and contact info on your website with these simple widgets.","fork":false,"url":"https://api.github.com/repos/godaddy/wp-contact-widgets","forks_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/forks","keys_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/teams","hooks_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/hooks","issue_events_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues/events{/number}","events_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/events","assignees_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/assignees{/user}","branches_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/branches{/branch}","tags_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/tags","blobs_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/refs{/sha}","trees_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/statuses/{sha}","languages_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/languages","stargazers_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/stargazers","contributors_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/contributors","subscribers_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/subscribers","subscription_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/subscription","commits_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/commits{/sha}","git_commits_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/commits{/sha}","comments_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/comments{/number}","issue_comment_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues/comments{/number}","contents_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/contents/{+path}","compare_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/merges","archive_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/downloads","issues_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues{/number}","pulls_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls{/number}","milestones_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/milestones{/number}","notifications_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/labels{/name}","releases_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/releases{/id}","deployments_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/deployments","created_at":"2016-03-08T15:24:25Z","updated_at":"2016-12-07T17:49:11Z","pushed_at":"2016-12-14T23:02:35Z","git_url":"git://github.com/godaddy/wp-contact-widgets.git","ssh_url":"git@github.com:godaddy/wp-contact-widgets.git","clone_url":"https://github.com/godaddy/wp-contact-widgets.git","svn_url":"https://github.com/godaddy/wp-contact-widgets","homepage":"https://wordpress.org/plugins/contact-widgets/","size":638,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":5,"default_branch":"develop"}},"base":{"label":"godaddy:develop","ref":"develop","sha":"5d1e593f10de11f3843c72016e198b9264e5aa66","user":{"login":"godaddy","id":1406546,"avatar_url":"https://avatars.githubusercontent.com/u/1406546?v=3","gravatar_id":"","url":"https://api.github.com/users/godaddy","html_url":"https://github.com/godaddy","followers_url":"https://api.github.com/users/godaddy/followers","following_url":"https://api.github.com/users/godaddy/following{/other_user}","gists_url":"https://api.github.com/users/godaddy/gists{/gist_id}","starred_url":"https://api.github.com/users/godaddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godaddy/subscriptions","organizations_url":"https://api.github.com/users/godaddy/orgs","repos_url":"https://api.github.com/users/godaddy/repos","events_url":"https://api.github.com/users/godaddy/events{/privacy}","received_events_url":"https://api.github.com/users/godaddy/received_events","type":"Organization","site_admin":false},"repo":{"id":53422711,"name":"wp-contact-widgets","full_name":"godaddy/wp-contact-widgets","owner":{"login":"godaddy","id":1406546,"avatar_url":"https://avatars.githubusercontent.com/u/1406546?v=3","gravatar_id":"","url":"https://api.github.com/users/godaddy","html_url":"https://github.com/godaddy","followers_url":"https://api.github.com/users/godaddy/followers","following_url":"https://api.github.com/users/godaddy/following{/other_user}","gists_url":"https://api.github.com/users/godaddy/gists{/gist_id}","starred_url":"https://api.github.com/users/godaddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godaddy/subscriptions","organizations_url":"https://api.github.com/users/godaddy/orgs","repos_url":"https://api.github.com/users/godaddy/repos","events_url":"https://api.github.com/users/godaddy/events{/privacy}","received_events_url":"https://api.github.com/users/godaddy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/godaddy/wp-contact-widgets","description":"Beautifully display social media and contact info on your website with these simple widgets.","fork":false,"url":"https://api.github.com/repos/godaddy/wp-contact-widgets","forks_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/forks","keys_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/teams","hooks_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/hooks","issue_events_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues/events{/number}","events_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/events","assignees_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/assignees{/user}","branches_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/branches{/branch}","tags_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/tags","blobs_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/refs{/sha}","trees_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/statuses/{sha}","languages_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/languages","stargazers_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/stargazers","contributors_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/contributors","subscribers_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/subscribers","subscription_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/subscription","commits_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/commits{/sha}","git_commits_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/git/commits{/sha}","comments_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/comments{/number}","issue_comment_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues/comments{/number}","contents_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/contents/{+path}","compare_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/merges","archive_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/downloads","issues_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues{/number}","pulls_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls{/number}","milestones_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/milestones{/number}","notifications_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/labels{/name}","releases_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/releases{/id}","deployments_url":"https://api.github.com/repos/godaddy/wp-contact-widgets/deployments","created_at":"2016-03-08T15:24:25Z","updated_at":"2016-12-07T17:49:11Z","pushed_at":"2016-12-14T23:02:35Z","git_url":"git://github.com/godaddy/wp-contact-widgets.git","ssh_url":"git@github.com:godaddy/wp-contact-widgets.git","clone_url":"https://github.com/godaddy/wp-contact-widgets.git","svn_url":"https://github.com/godaddy/wp-contact-widgets","homepage":"https://wordpress.org/plugins/contact-widgets/","size":638,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/22"},"html":{"href":"https://github.com/godaddy/wp-contact-widgets/pull/22"},"issue":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues/22"},"comments":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/godaddy/wp-contact-widgets/statuses/ae5944c6089d5e08a2b6af62bcbd4529219046af"}}}}
{"actor":{"display_login":"EvanHerman"}}