{"action":"created","comment":{"url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/comments/78380051","id":78380051,"diff_hunk":"@@ -0,0 +1,72 @@\n+<?php defined( 'WPINC' ) or die;\n+\n+if ( ! class_exists( 'Tribe__Plugin_Download_Notice' ) ) {\n+\n+\t/**\n+\t * Shows an admin notice telling users which requisite plugins they need to download\n+\t */\n+\tclass Tribe__Plugin_Download_Notice {\n+\n+\t\tprivate $plugin_path;\n+\n+\t\tprivate $plugins_required = array();\n+\n+\t\t/**\n+\t\t * @param string $plugin_path Path to the plugin file we're showing a notice for\n+\t\t */\n+\t\tpublic function __construct( $plugin_path ) {\n+\t\t\t$this->plugin_path = $plugin_path;\n+\t\t\tadd_action( 'admin_notices', array( $this, 'show_inactive_plugins_alert' ) );\n+\t\t}\n+\n+\t\t/**\n+\t\t * Add a required plugin to the notice\n+\t\t *\n+\t\t * @param string $name         Name of the required plugin\n+\t\t * @param null   $thickbox_url Download or purchase URL for plugin from within /wp-admin/ thickbox\n+\t\t */\n+\t\tpublic function add_required_plugin( $name, $thickbox_url = null ){\n+\t\t\t$this->plugins_required[ $name ] = array(\n+\t\t\t\t'name'         => $name,\n+\t\t\t\t'thickbox_url' => $thickbox_url,\n+\t\t\t);\n+\t\t}\n+\n+\t\t/**\n+\t\t * Echoes the admin notice, attach to admin_notices\n+\t\t */\n+\t\tpublic function show_inactive_plugins_alert() {\n+\t\t\tif ( ! current_user_can( 'activate_plugins' ) )\treturn;","path":"src/Tribe/Plugin_Download_Notice.php","position":39,"original_position":39,"commit_id":"fa59ef0f5b3c46bd721187c01caea9267db0927a","original_commit_id":"fa59ef0f5b3c46bd721187c01caea9267db0927a","user":{"login":"barryhughes","id":3594411,"avatar_url":"https://avatars.githubusercontent.com/u/3594411?v=3","gravatar_id":"","url":"https://api.github.com/users/barryhughes","html_url":"https://github.com/barryhughes","followers_url":"https://api.github.com/users/barryhughes/followers","following_url":"https://api.github.com/users/barryhughes/following{/other_user}","gists_url":"https://api.github.com/users/barryhughes/gists{/gist_id}","starred_url":"https://api.github.com/users/barryhughes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barryhughes/subscriptions","organizations_url":"https://api.github.com/users/barryhughes/orgs","repos_url":"https://api.github.com/users/barryhughes/repos","events_url":"https://api.github.com/users/barryhughes/events{/privacy}","received_events_url":"https://api.github.com/users/barryhughes/received_events","type":"User","site_admin":false},"body":"No one liners :wink:","created_at":"2016-09-12T14:14:08Z","updated_at":"2016-09-12T14:14:08Z","html_url":"https://github.com/moderntribe/tribe-common/pull/193#discussion_r78380051","pull_request_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/193","_links":{"self":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/comments/78380051"},"html":{"href":"https://github.com/moderntribe/tribe-common/pull/193#discussion_r78380051"},"pull_request":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/193"}}},"pull_request":{"url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/193","id":84826741,"html_url":"https://github.com/moderntribe/tribe-common/pull/193","diff_url":"https://github.com/moderntribe/tribe-common/pull/193.diff","patch_url":"https://github.com/moderntribe/tribe-common/pull/193.patch","issue_url":"https://api.github.com/repos/moderntribe/tribe-common/issues/193","number":193,"state":"open","locked":false,"title":"Feature/65890 authorize extensions","user":{"login":"elimn","id":2893625,"avatar_url":"https://avatars.githubusercontent.com/u/2893625?v=3","gravatar_id":"","url":"https://api.github.com/users/elimn","html_url":"https://github.com/elimn","followers_url":"https://api.github.com/users/elimn/followers","following_url":"https://api.github.com/users/elimn/following{/other_user}","gists_url":"https://api.github.com/users/elimn/gists{/gist_id}","starred_url":"https://api.github.com/users/elimn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elimn/subscriptions","organizations_url":"https://api.github.com/users/elimn/orgs","repos_url":"https://api.github.com/users/elimn/repos","events_url":"https://api.github.com/users/elimn/events{/privacy}","received_events_url":"https://api.github.com/users/elimn/received_events","type":"User","site_admin":false},"body":"Ticket: https://central.tri.be/issues/65890\r\n\r\nThis is highly related to our new extension (pluginized snippet) template: https://github.com/moderntribe/snippets/blob/snippet-framework-common-merge/README.md\r\n\r\nThese libs are the basis for our new extension system. The goal is to create a function that each extension can check to see if it is authorized to run. For now the only reason a extension won't be authorized to run is if the plugins it requires are not activated. In the future there might be other times, such as when a new version of the extension is available, or the need for the extension has been removed.","created_at":"2016-09-12T07:36:58Z","updated_at":"2016-09-12T14:14:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"415f9aa51d34a18dbc562c9afb02144df482a408","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/moderntribe/tribe-common/milestones/1","html_url":"https://github.com/moderntribe/tribe-common/milestones/Maintenance%20Release","labels_url":"https://api.github.com/repos/moderntribe/tribe-common/milestones/1/labels","id":1607033,"number":1,"title":"Maintenance Release","description":"[Learn more about the Branches for this Milestone](http://inside.tri.be/maintenance-releases/)","creator":{"login":"bordoni","id":236579,"avatar_url":"https://avatars.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},"open_issues":1,"closed_issues":35,"state":"open","created_at":"2016-02-26T01:04:02Z","updated_at":"2016-09-12T07:37:24Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/193/commits","review_comments_url":"https://api.github.com/repos/moderntribe/tribe-common/pulls/193/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/193/comments","statuses_url":"https://api.github.com/repos/moderntribe/tribe-common/statuses/fa59ef0f5b3c46bd721187c01caea9267db0927a","head":{"label":"moderntribe:feature/65890-authorize-extensions","ref":"feature/65890-authorize-extensions","sha":"fa59ef0f5b3c46bd721187c01caea9267db0927a","user":{"login":"moderntribe","id":2279551,"avatar_url":"https://avatars.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://avatars.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":"2016-03-24T17:19:26Z","pushed_at":"2016-09-12T07:36:58Z","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":17947,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":3,"default_branch":"develop"}},"base":{"label":"moderntribe:develop","ref":"develop","sha":"b57887d5bed982843881626f6701fce340c88eb1","user":{"login":"moderntribe","id":2279551,"avatar_url":"https://avatars.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://avatars.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":"2016-03-24T17:19:26Z","pushed_at":"2016-09-12T07:36:58Z","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":17947,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/193"},"html":{"href":"https://github.com/moderntribe/tribe-common/pull/193"},"issue":{"href":"https://api.github.com/repos/moderntribe/tribe-common/issues/193"},"comments":{"href":"https://api.github.com/repos/moderntribe/tribe-common/issues/193/comments"},"review_comments":{"href":"https://api.github.com/repos/moderntribe/tribe-common/pulls/193/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/193/commits"},"statuses":{"href":"https://api.github.com/repos/moderntribe/tribe-common/statuses/fa59ef0f5b3c46bd721187c01caea9267db0927a"}}}}
{"actor":{"display_login":"barryhughes"}}