{"action":"created","comment":{"url":"https://api.github.com/repos/fusioneng/Shortcake/pulls/comments/31476756","id":31476756,"diff_hunk":"@@ -96,7 +96,11 @@ public function enqueue() {\n \n \t\tusort( $shortcodes, array( $this, 'compare_shortcodes_by_label' ) );\n \n-\t\twp_enqueue_script( 'shortcode-ui', $this->plugin_url . 'js/build/shortcode-ui.js', array( 'jquery', 'backbone', 'mce-view' ), $this->plugin_version );\n+\t\t// Load minified version of wp-js-hooks if not debugging.\n+\t\t$wp_js_hooks_file = 'wp-js-hooks' . ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.min' : '' ) . '.js';\n+\n+\t\twp_enqueue_script( 'wp-js-hooks', $this->plugin_url . 'lib/wp-js-hooks/' . $wp_js_hooks_file, array(), '1433195267' );","path":"inc/class-shortcode-ui.php","position":8,"original_position":8,"commit_id":"c23311dc1311563773a265b90e2aea468e15f21a","original_commit_id":"c23311dc1311563773a265b90e2aea468e15f21a","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":"Can we enqueue as `shortcode-ui-js-hooks` to avoid collisions?","created_at":"2015-06-01T22:19:32Z","updated_at":"2015-06-01T22:19:32Z","html_url":"https://github.com/fusioneng/Shortcake/pull/336#discussion_r31476756","pull_request_url":"https://api.github.com/repos/fusioneng/Shortcake/pulls/336","_links":{"self":{"href":"https://api.github.com/repos/fusioneng/Shortcake/pulls/comments/31476756"},"html":{"href":"https://github.com/fusioneng/Shortcake/pull/336#discussion_r31476756"},"pull_request":{"href":"https://api.github.com/repos/fusioneng/Shortcake/pulls/336"}}},"pull_request":{"url":"https://api.github.com/repos/fusioneng/Shortcake/pulls/336","id":36326777,"html_url":"https://github.com/fusioneng/Shortcake/pull/336","diff_url":"https://github.com/fusioneng/Shortcake/pull/336.diff","patch_url":"https://github.com/fusioneng/Shortcake/pull/336.patch","issue_url":"https://api.github.com/repos/fusioneng/Shortcake/issues/336","number":336,"state":"open","locked":false,"title":"Add basic API for registering callbacks on attributes","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":"This adds a basic method for registering a callback function on an\r\nattribute field when registering UI for a shortcode. If the attribute\r\n`callback` is defined on a field and maps to the name of a valid\r\njavascript function, that function will be called on rendering the\r\nshortcode UI and on any changes to that attribute field.\r\n\r\nThe value of *this* in the callback function will be the array of view\r\nmodels representing all of the attribute input field views, and the\r\nfunction receives two arguments: the changed value, and the collection\r\nof model attributes.\r\n\r\nSee #316 and #333.\r\n\r\nAn example of a callback function that uses this API is in https://github.com/fusioneng/image-shortcake/pull/36","created_at":"2015-05-27T17:13:54Z","updated_at":"2015-06-01T22:19:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2a9af72f4dbe020b6ff9c81071e52dd7ad4062f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fusioneng/Shortcake/pulls/336/commits","review_comments_url":"https://api.github.com/repos/fusioneng/Shortcake/pulls/336/comments","review_comment_url":"https://api.github.com/repos/fusioneng/Shortcake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fusioneng/Shortcake/issues/336/comments","statuses_url":"https://api.github.com/repos/fusioneng/Shortcake/statuses/c23311dc1311563773a265b90e2aea468e15f21a","head":{"label":"fusioneng:316-attribute-update-events","ref":"316-attribute-update-events","sha":"c23311dc1311563773a265b90e2aea468e15f21a","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":25159454,"name":"Shortcake","full_name":"fusioneng/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/Shortcake","description":"Shortcake makes using WordPress shortcodes a piece of cake.","fork":false,"url":"https://api.github.com/repos/fusioneng/Shortcake","forks_url":"https://api.github.com/repos/fusioneng/Shortcake/forks","keys_url":"https://api.github.com/repos/fusioneng/Shortcake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusioneng/Shortcake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusioneng/Shortcake/teams","hooks_url":"https://api.github.com/repos/fusioneng/Shortcake/hooks","issue_events_url":"https://api.github.com/repos/fusioneng/Shortcake/issues/events{/number}","events_url":"https://api.github.com/repos/fusioneng/Shortcake/events","assignees_url":"https://api.github.com/repos/fusioneng/Shortcake/assignees{/user}","branches_url":"https://api.github.com/repos/fusioneng/Shortcake/branches{/branch}","tags_url":"https://api.github.com/repos/fusioneng/Shortcake/tags","blobs_url":"https://api.github.com/repos/fusioneng/Shortcake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusioneng/Shortcake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusioneng/Shortcake/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusioneng/Shortcake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusioneng/Shortcake/statuses/{sha}","languages_url":"https://api.github.com/repos/fusioneng/Shortcake/languages","stargazers_url":"https://api.github.com/repos/fusioneng/Shortcake/stargazers","contributors_url":"https://api.github.com/repos/fusioneng/Shortcake/contributors","subscribers_url":"https://api.github.com/repos/fusioneng/Shortcake/subscribers","subscription_url":"https://api.github.com/repos/fusioneng/Shortcake/subscription","commits_url":"https://api.github.com/repos/fusioneng/Shortcake/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusioneng/Shortcake/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusioneng/Shortcake/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusioneng/Shortcake/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusioneng/Shortcake/contents/{+path}","compare_url":"https://api.github.com/repos/fusioneng/Shortcake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusioneng/Shortcake/merges","archive_url":"https://api.github.com/repos/fusioneng/Shortcake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusioneng/Shortcake/downloads","issues_url":"https://api.github.com/repos/fusioneng/Shortcake/issues{/number}","pulls_url":"https://api.github.com/repos/fusioneng/Shortcake/pulls{/number}","milestones_url":"https://api.github.com/repos/fusioneng/Shortcake/milestones{/number}","notifications_url":"https://api.github.com/repos/fusioneng/Shortcake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusioneng/Shortcake/labels{/name}","releases_url":"https://api.github.com/repos/fusioneng/Shortcake/releases{/id}","created_at":"2014-10-13T13:21:15Z","updated_at":"2015-05-31T09:28:59Z","pushed_at":"2015-06-01T22:15:52Z","git_url":"git://github.com/fusioneng/Shortcake.git","ssh_url":"git@github.com:fusioneng/Shortcake.git","clone_url":"https://github.com/fusioneng/Shortcake.git","svn_url":"https://github.com/fusioneng/Shortcake","homepage":"http://fusion.net/topic/shortcake-wordpress-plugin/","size":5403,"stargazers_count":427,"watchers_count":427,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":71,"forks":45,"open_issues":71,"watchers":427,"default_branch":"master"}},"base":{"label":"fusioneng:master","ref":"master","sha":"f9a53ddef8f80308c8424adbc3d1b910ad97c832","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":25159454,"name":"Shortcake","full_name":"fusioneng/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/Shortcake","description":"Shortcake makes using WordPress shortcodes a piece of cake.","fork":false,"url":"https://api.github.com/repos/fusioneng/Shortcake","forks_url":"https://api.github.com/repos/fusioneng/Shortcake/forks","keys_url":"https://api.github.com/repos/fusioneng/Shortcake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusioneng/Shortcake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusioneng/Shortcake/teams","hooks_url":"https://api.github.com/repos/fusioneng/Shortcake/hooks","issue_events_url":"https://api.github.com/repos/fusioneng/Shortcake/issues/events{/number}","events_url":"https://api.github.com/repos/fusioneng/Shortcake/events","assignees_url":"https://api.github.com/repos/fusioneng/Shortcake/assignees{/user}","branches_url":"https://api.github.com/repos/fusioneng/Shortcake/branches{/branch}","tags_url":"https://api.github.com/repos/fusioneng/Shortcake/tags","blobs_url":"https://api.github.com/repos/fusioneng/Shortcake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusioneng/Shortcake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusioneng/Shortcake/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusioneng/Shortcake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusioneng/Shortcake/statuses/{sha}","languages_url":"https://api.github.com/repos/fusioneng/Shortcake/languages","stargazers_url":"https://api.github.com/repos/fusioneng/Shortcake/stargazers","contributors_url":"https://api.github.com/repos/fusioneng/Shortcake/contributors","subscribers_url":"https://api.github.com/repos/fusioneng/Shortcake/subscribers","subscription_url":"https://api.github.com/repos/fusioneng/Shortcake/subscription","commits_url":"https://api.github.com/repos/fusioneng/Shortcake/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusioneng/Shortcake/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusioneng/Shortcake/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusioneng/Shortcake/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusioneng/Shortcake/contents/{+path}","compare_url":"https://api.github.com/repos/fusioneng/Shortcake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusioneng/Shortcake/merges","archive_url":"https://api.github.com/repos/fusioneng/Shortcake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusioneng/Shortcake/downloads","issues_url":"https://api.github.com/repos/fusioneng/Shortcake/issues{/number}","pulls_url":"https://api.github.com/repos/fusioneng/Shortcake/pulls{/number}","milestones_url":"https://api.github.com/repos/fusioneng/Shortcake/milestones{/number}","notifications_url":"https://api.github.com/repos/fusioneng/Shortcake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusioneng/Shortcake/labels{/name}","releases_url":"https://api.github.com/repos/fusioneng/Shortcake/releases{/id}","created_at":"2014-10-13T13:21:15Z","updated_at":"2015-05-31T09:28:59Z","pushed_at":"2015-06-01T22:15:52Z","git_url":"git://github.com/fusioneng/Shortcake.git","ssh_url":"git@github.com:fusioneng/Shortcake.git","clone_url":"https://github.com/fusioneng/Shortcake.git","svn_url":"https://github.com/fusioneng/Shortcake","homepage":"http://fusion.net/topic/shortcake-wordpress-plugin/","size":5403,"stargazers_count":427,"watchers_count":427,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":71,"forks":45,"open_issues":71,"watchers":427,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fusioneng/Shortcake/pulls/336"},"html":{"href":"https://github.com/fusioneng/Shortcake/pull/336"},"issue":{"href":"https://api.github.com/repos/fusioneng/Shortcake/issues/336"},"comments":{"href":"https://api.github.com/repos/fusioneng/Shortcake/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/fusioneng/Shortcake/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/fusioneng/Shortcake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fusioneng/Shortcake/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/fusioneng/Shortcake/statuses/c23311dc1311563773a265b90e2aea468e15f21a"}}}}