{"action":"created","comment":{"url":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/comments/68034738","id":68034738,"diff_hunk":"@@ -414,6 +424,20 @@\n \t\t\tvar control = this;\n \t\t\tcontrol.actuallyEmbed();\n \t\t\tapi.Control.prototype.focus.call( control, args );\n+\t\t},\n+\n+\t\t/**\n+\t\t * Add featured image if select2 data is returning.\n+\t\t *\n+\t\t * @param {object} data post data.\n+\t\t * @returns {string}\n+\t\t */\n+\t\tselect2Template: function(data){\n+\t\t\tif ( data.hasOwnProperty( 'featured_image' ) && data.featured_image.hasOwnProperty( 'sizes' ) && data.featured_image.sizes.hasOwnProperty( 'thumbnail' ) && data.featured_image.sizes.thumbnail.hasOwnProperty( 'url' ) && ! _.isEmpty( data.featured_image.sizes.thumbnail.url ) ) {","path":"js/customize-object-selector-control.js","position":37,"original_position":37,"commit_id":"7dfe87e0c8c2d1f9f9efde42dcca08c5a2e1dda7","original_commit_id":"7dfe87e0c8c2d1f9f9efde42dcca08c5a2e1dda7","user":{"login":"PatelUtkarsh","id":5015489,"avatar_url":"https://avatars.githubusercontent.com/u/5015489?v=3","gravatar_id":"","url":"https://api.github.com/users/PatelUtkarsh","html_url":"https://github.com/PatelUtkarsh","followers_url":"https://api.github.com/users/PatelUtkarsh/followers","following_url":"https://api.github.com/users/PatelUtkarsh/following{/other_user}","gists_url":"https://api.github.com/users/PatelUtkarsh/gists{/gist_id}","starred_url":"https://api.github.com/users/PatelUtkarsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PatelUtkarsh/subscriptions","organizations_url":"https://api.github.com/users/PatelUtkarsh/orgs","repos_url":"https://api.github.com/users/PatelUtkarsh/repos","events_url":"https://api.github.com/users/PatelUtkarsh/events{/privacy}","received_events_url":"https://api.github.com/users/PatelUtkarsh/received_events","type":"User","site_admin":false},"body":"Is there any better way to do this? ","created_at":"2016-06-22T11:10:33Z","updated_at":"2016-06-22T11:10:33Z","html_url":"https://github.com/xwp/wp-customize-object-selector/pull/4#discussion_r68034738","pull_request_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/comments/68034738"},"html":{"href":"https://github.com/xwp/wp-customize-object-selector/pull/4#discussion_r68034738"},"pull_request":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/4","id":74765060,"html_url":"https://github.com/xwp/wp-customize-object-selector/pull/4","diff_url":"https://github.com/xwp/wp-customize-object-selector/pull/4.diff","patch_url":"https://github.com/xwp/wp-customize-object-selector/pull/4.patch","issue_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues/4","number":4,"state":"open","locked":false,"title":"Show thumbnail in select2","user":{"login":"PatelUtkarsh","id":5015489,"avatar_url":"https://avatars.githubusercontent.com/u/5015489?v=3","gravatar_id":"","url":"https://api.github.com/users/PatelUtkarsh","html_url":"https://github.com/PatelUtkarsh","followers_url":"https://api.github.com/users/PatelUtkarsh/followers","following_url":"https://api.github.com/users/PatelUtkarsh/following{/other_user}","gists_url":"https://api.github.com/users/PatelUtkarsh/gists{/gist_id}","starred_url":"https://api.github.com/users/PatelUtkarsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PatelUtkarsh/subscriptions","organizations_url":"https://api.github.com/users/PatelUtkarsh/orgs","repos_url":"https://api.github.com/users/PatelUtkarsh/repos","events_url":"https://api.github.com/users/PatelUtkarsh/events{/privacy}","received_events_url":"https://api.github.com/users/PatelUtkarsh/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-22T11:10:02Z","updated_at":"2016-06-22T11:10:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5bb728e3bfe8980c527cfced93d434eb77156a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/4/commits","review_comments_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/4/comments","review_comment_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues/4/comments","statuses_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/statuses/7dfe87e0c8c2d1f9f9efde42dcca08c5a2e1dda7","head":{"label":"xwp:feature/thumbnail","ref":"feature/thumbnail","sha":"7dfe87e0c8c2d1f9f9efde42dcca08c5a2e1dda7","user":{"login":"xwp","id":9003139,"avatar_url":"https://avatars.githubusercontent.com/u/9003139?v=3","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"repo":{"id":59079306,"name":"wp-customize-object-selector","full_name":"xwp/wp-customize-object-selector","owner":{"login":"xwp","id":9003139,"avatar_url":"https://avatars.githubusercontent.com/u/9003139?v=3","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwp/wp-customize-object-selector","description":"Select posts, terms, or users via AJAX in the Customizer.","fork":true,"url":"https://api.github.com/repos/xwp/wp-customize-object-selector","forks_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/forks","keys_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/teams","hooks_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/hooks","issue_events_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues/events{/number}","events_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/events","assignees_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/assignees{/user}","branches_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/branches{/branch}","tags_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/tags","blobs_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/statuses/{sha}","languages_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/languages","stargazers_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/stargazers","contributors_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/contributors","subscribers_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/subscribers","subscription_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/subscription","commits_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/contents/{+path}","compare_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/merges","archive_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/downloads","issues_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues{/number}","pulls_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls{/number}","milestones_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/milestones{/number}","notifications_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/labels{/name}","releases_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/releases{/id}","deployments_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/deployments","created_at":"2016-05-18T03:37:03Z","updated_at":"2016-06-22T07:47:09Z","pushed_at":"2016-06-22T11:10:03Z","git_url":"git://github.com/xwp/wp-customize-object-selector.git","ssh_url":"git@github.com:xwp/wp-customize-object-selector.git","clone_url":"https://github.com/xwp/wp-customize-object-selector.git","svn_url":"https://github.com/xwp/wp-customize-object-selector","homepage":null,"size":191,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":false,"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":3,"default_branch":"develop"}},"base":{"label":"xwp:develop","ref":"develop","sha":"c9e5647e5cae6f77518300666317276250264aaf","user":{"login":"xwp","id":9003139,"avatar_url":"https://avatars.githubusercontent.com/u/9003139?v=3","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"repo":{"id":59079306,"name":"wp-customize-object-selector","full_name":"xwp/wp-customize-object-selector","owner":{"login":"xwp","id":9003139,"avatar_url":"https://avatars.githubusercontent.com/u/9003139?v=3","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwp/wp-customize-object-selector","description":"Select posts, terms, or users via AJAX in the Customizer.","fork":true,"url":"https://api.github.com/repos/xwp/wp-customize-object-selector","forks_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/forks","keys_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/teams","hooks_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/hooks","issue_events_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues/events{/number}","events_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/events","assignees_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/assignees{/user}","branches_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/branches{/branch}","tags_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/tags","blobs_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/statuses/{sha}","languages_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/languages","stargazers_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/stargazers","contributors_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/contributors","subscribers_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/subscribers","subscription_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/subscription","commits_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/contents/{+path}","compare_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/merges","archive_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/downloads","issues_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues{/number}","pulls_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls{/number}","milestones_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/milestones{/number}","notifications_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/labels{/name}","releases_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/releases{/id}","deployments_url":"https://api.github.com/repos/xwp/wp-customize-object-selector/deployments","created_at":"2016-05-18T03:37:03Z","updated_at":"2016-06-22T07:47:09Z","pushed_at":"2016-06-22T11:10:03Z","git_url":"git://github.com/xwp/wp-customize-object-selector.git","ssh_url":"git@github.com:xwp/wp-customize-object-selector.git","clone_url":"https://github.com/xwp/wp-customize-object-selector.git","svn_url":"https://github.com/xwp/wp-customize-object-selector","homepage":null,"size":191,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":false,"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":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/4"},"html":{"href":"https://github.com/xwp/wp-customize-object-selector/pull/4"},"issue":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues/4"},"comments":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/xwp/wp-customize-object-selector/statuses/7dfe87e0c8c2d1f9f9efde42dcca08c5a2e1dda7"}}}}
{"actor":{"display_login":"PatelUtkarsh"}}