{"action":"created","comment":{"url":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/comments/28884630","id":28884630,"diff_hunk":"@@ -2,11 +2,73 @@\n /*\n Plugin Name: Image-shortcake\n Version: 0.1-alpha\n-Description: PLUGIN DESCRIPTION HERE\n-Author: YOUR NAME HERE\n-Author URI: YOUR SITE HERE\n-Plugin URI: PLUGIN SITE HERE\n+Description: Provides a shortcode for image elements. Use with the Shortcake plugin for a preview of images\n+Author: goldenapples\n+Author URI: https://github.com/fusioneng\n+Plugin URI: https://github.com/fusioneng/image-shortcake\n Text Domain: image-shortcake\n Domain Path: /languages\n */\n \n+require_once( 'inc/class-img-shortcode.php' );\n+require_once( 'inc/class-img-shortcode-ui.php' );\n+\n+class Image_Shortcake {\n+\n+\tprivate static $instance;\n+\n+\n+\t/**\n+\t * Activate the plugin as a singleton.\n+\t *\n+\t */\n+\tpublic static function get_instance() {\n+\n+\t\tif ( ! isset( self::$instance ) ) {\n+\t\t\tself::$instance = new Image_Shortcake;\n+\t\t\tself::$instance->register_shortcodes();\n+\t\t}\n+\t\treturn self::$instance;\n+\t}\n+\n+\tprivate function register_shortcodes() {\n+\n+\t\tif ( ! function_exists( 'shortcode_ui_register_for_shortcode' ) ) {","path":"image-shortcake.php","position":39,"original_position":39,"commit_id":"fc4b334c3a445dd304b45f6a9077820ed4404f4e","original_commit_id":"fc4b334c3a445dd304b45f6a9077820ed4404f4e","user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"body":"Given the conditional is relatively small, could we change it to:\r\n\r\n```\r\nif ( function_exists ) {\r\n   // register the shortcode\r\n} else {\r\n   // Throw notice\r\n}\r\n```\r\n\r\nAlso, the shortcode can likely be used independently of the shortcode UI.","created_at":"2015-04-22T15:38:39Z","updated_at":"2015-04-22T15:38:39Z","html_url":"https://github.com/fusioneng/image-shortcake/pull/5#discussion_r28884630","pull_request_url":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/comments/28884630"},"html":{"href":"https://github.com/fusioneng/image-shortcake/pull/5#discussion_r28884630"},"pull_request":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/5","id":33807770,"html_url":"https://github.com/fusioneng/image-shortcake/pull/5","diff_url":"https://github.com/fusioneng/image-shortcake/pull/5.diff","patch_url":"https://github.com/fusioneng/image-shortcake/pull/5.patch","issue_url":"https://api.github.com/repos/fusioneng/image-shortcake/issues/5","number":5,"state":"open","locked":false,"title":"Initial plugin structure","user":{"login":"goldenapples","id":665992,"avatar_url":"https://avatars.githubusercontent.com/u/665992?v=3","gravatar_id":"","url":"https://api.github.com/users/goldenapples","html_url":"https://github.com/goldenapples","followers_url":"https://api.github.com/users/goldenapples/followers","following_url":"https://api.github.com/users/goldenapples/following{/other_user}","gists_url":"https://api.github.com/users/goldenapples/gists{/gist_id}","starred_url":"https://api.github.com/users/goldenapples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldenapples/subscriptions","organizations_url":"https://api.github.com/users/goldenapples/orgs","repos_url":"https://api.github.com/users/goldenapples/repos","events_url":"https://api.github.com/users/goldenapples/events{/privacy}","received_events_url":"https://api.github.com/users/goldenapples/received_events","type":"User","site_admin":false},"body":"Adds plugin skeleton: shortcode definition and list of fields to collect in UI.","created_at":"2015-04-21T21:58:10Z","updated_at":"2015-04-22T15:38:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8129aea72df12bc6fc4d65ab95fb6e3b42bc6a7b","assignee":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/5/commits","review_comments_url":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/5/comments","review_comment_url":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fusioneng/image-shortcake/issues/5/comments","statuses_url":"https://api.github.com/repos/fusioneng/image-shortcake/statuses/fc4b334c3a445dd304b45f6a9077820ed4404f4e","head":{"label":"fusioneng:initial-plugin-structure","ref":"initial-plugin-structure","sha":"fc4b334c3a445dd304b45f6a9077820ed4404f4e","user":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"repo":{"id":33891781,"name":"image-shortcake","full_name":"fusioneng/image-shortcake","owner":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusioneng/image-shortcake","description":"Images as shortcodes","fork":false,"url":"https://api.github.com/repos/fusioneng/image-shortcake","forks_url":"https://api.github.com/repos/fusioneng/image-shortcake/forks","keys_url":"https://api.github.com/repos/fusioneng/image-shortcake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusioneng/image-shortcake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusioneng/image-shortcake/teams","hooks_url":"https://api.github.com/repos/fusioneng/image-shortcake/hooks","issue_events_url":"https://api.github.com/repos/fusioneng/image-shortcake/issues/events{/number}","events_url":"https://api.github.com/repos/fusioneng/image-shortcake/events","assignees_url":"https://api.github.com/repos/fusioneng/image-shortcake/assignees{/user}","branches_url":"https://api.github.com/repos/fusioneng/image-shortcake/branches{/branch}","tags_url":"https://api.github.com/repos/fusioneng/image-shortcake/tags","blobs_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusioneng/image-shortcake/statuses/{sha}","languages_url":"https://api.github.com/repos/fusioneng/image-shortcake/languages","stargazers_url":"https://api.github.com/repos/fusioneng/image-shortcake/stargazers","contributors_url":"https://api.github.com/repos/fusioneng/image-shortcake/contributors","subscribers_url":"https://api.github.com/repos/fusioneng/image-shortcake/subscribers","subscription_url":"https://api.github.com/repos/fusioneng/image-shortcake/subscription","commits_url":"https://api.github.com/repos/fusioneng/image-shortcake/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusioneng/image-shortcake/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusioneng/image-shortcake/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusioneng/image-shortcake/contents/{+path}","compare_url":"https://api.github.com/repos/fusioneng/image-shortcake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusioneng/image-shortcake/merges","archive_url":"https://api.github.com/repos/fusioneng/image-shortcake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusioneng/image-shortcake/downloads","issues_url":"https://api.github.com/repos/fusioneng/image-shortcake/issues{/number}","pulls_url":"https://api.github.com/repos/fusioneng/image-shortcake/pulls{/number}","milestones_url":"https://api.github.com/repos/fusioneng/image-shortcake/milestones{/number}","notifications_url":"https://api.github.com/repos/fusioneng/image-shortcake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusioneng/image-shortcake/labels{/name}","releases_url":"https://api.github.com/repos/fusioneng/image-shortcake/releases{/id}","created_at":"2015-04-13T20:20:29Z","updated_at":"2015-04-21T20:59:44Z","pushed_at":"2015-04-22T15:25:50Z","git_url":"git://github.com/fusioneng/image-shortcake.git","ssh_url":"git@github.com:fusioneng/image-shortcake.git","clone_url":"https://github.com/fusioneng/image-shortcake.git","svn_url":"https://github.com/fusioneng/image-shortcake","homepage":null,"size":124,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"fusioneng:master","ref":"master","sha":"26d6c5ea0da11b03460aac46abdd44eb9fb4899d","user":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"repo":{"id":33891781,"name":"image-shortcake","full_name":"fusioneng/image-shortcake","owner":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusioneng/image-shortcake","description":"Images as shortcodes","fork":false,"url":"https://api.github.com/repos/fusioneng/image-shortcake","forks_url":"https://api.github.com/repos/fusioneng/image-shortcake/forks","keys_url":"https://api.github.com/repos/fusioneng/image-shortcake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusioneng/image-shortcake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusioneng/image-shortcake/teams","hooks_url":"https://api.github.com/repos/fusioneng/image-shortcake/hooks","issue_events_url":"https://api.github.com/repos/fusioneng/image-shortcake/issues/events{/number}","events_url":"https://api.github.com/repos/fusioneng/image-shortcake/events","assignees_url":"https://api.github.com/repos/fusioneng/image-shortcake/assignees{/user}","branches_url":"https://api.github.com/repos/fusioneng/image-shortcake/branches{/branch}","tags_url":"https://api.github.com/repos/fusioneng/image-shortcake/tags","blobs_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusioneng/image-shortcake/statuses/{sha}","languages_url":"https://api.github.com/repos/fusioneng/image-shortcake/languages","stargazers_url":"https://api.github.com/repos/fusioneng/image-shortcake/stargazers","contributors_url":"https://api.github.com/repos/fusioneng/image-shortcake/contributors","subscribers_url":"https://api.github.com/repos/fusioneng/image-shortcake/subscribers","subscription_url":"https://api.github.com/repos/fusioneng/image-shortcake/subscription","commits_url":"https://api.github.com/repos/fusioneng/image-shortcake/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusioneng/image-shortcake/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusioneng/image-shortcake/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusioneng/image-shortcake/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusioneng/image-shortcake/contents/{+path}","compare_url":"https://api.github.com/repos/fusioneng/image-shortcake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusioneng/image-shortcake/merges","archive_url":"https://api.github.com/repos/fusioneng/image-shortcake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusioneng/image-shortcake/downloads","issues_url":"https://api.github.com/repos/fusioneng/image-shortcake/issues{/number}","pulls_url":"https://api.github.com/repos/fusioneng/image-shortcake/pulls{/number}","milestones_url":"https://api.github.com/repos/fusioneng/image-shortcake/milestones{/number}","notifications_url":"https://api.github.com/repos/fusioneng/image-shortcake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusioneng/image-shortcake/labels{/name}","releases_url":"https://api.github.com/repos/fusioneng/image-shortcake/releases{/id}","created_at":"2015-04-13T20:20:29Z","updated_at":"2015-04-21T20:59:44Z","pushed_at":"2015-04-22T15:25:50Z","git_url":"git://github.com/fusioneng/image-shortcake.git","ssh_url":"git@github.com:fusioneng/image-shortcake.git","clone_url":"https://github.com/fusioneng/image-shortcake.git","svn_url":"https://github.com/fusioneng/image-shortcake","homepage":null,"size":124,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/5"},"html":{"href":"https://github.com/fusioneng/image-shortcake/pull/5"},"issue":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/issues/5"},"comments":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/fusioneng/image-shortcake/statuses/fc4b334c3a445dd304b45f6a9077820ed4404f4e"}}}}