{"action":"created","comment":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments/40295501","id":40295501,"diff_hunk":"@@ -0,0 +1,317 @@\n+<?php\n+/**\n+ * @package WPSEO\\Admin\n+ */\n+\n+/**\n+ * Class WPSEO_Taxonomy_Presenter\n+ */\n+class WPSEO_Taxonomy_Presenter {\n+\n+\t/**\n+\t * @var array\n+\t */\n+\tprivate $options = array();\n+\n+\t/**\n+\t * @var bool|mixed\n+\t */\n+\tprivate $tax_meta;\n+\n+\t/**\n+\t * @var stdClass\n+\t */\n+\tprivate $term;\n+\n+\t/**\n+\t * @var array   Options array for the no-index options, including translated labels\n+\t */\n+\tprivate $no_index_options = array();\n+\n+\t/**\n+\t * @var array   Options array for the sitemap_include options, including translated labels\n+\t */\n+\tprivate $sitemap_include_options = array();\n+\n+\t/**\n+\t * @param stdClass $term\n+\t */\n+\tpublic function __construct( $term ) {\n+\t\t$this->term     = $term;\n+\t\t$this->tax_meta = WPSEO_Taxonomy_Meta::get_term_meta( (int) $term->term_id, $term->taxonomy );\n+\t\t$this->options  = WPSEO_Options::get_all();\n+\n+\t\t$this->translate_meta_options();\n+\t}\n+\n+\t/**\n+\t * Displaying the form fields\n+\t *\n+\t * @param array $fields\n+\t */\n+\tpublic function display_fields( array $fields ) {\n+\t\tforeach ( $fields as $field_name => $field_options ) {\n+\t\t\tif ( empty( $field_options['hide'] ) ) {\n+\t\t\t\t$this->form_row( 'wpseo_' . $field_name, $field_options['label'], $field_options['description'], $field_options['type'], $field_options['options'] );\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * Getting the fields for the general tab\n+\t *\n+\t * @return array\n+\t */\n+\tpublic function general_fields() {\n+\n+\t\t$current = 'index';\n+\t\tif ( isset( $options[ 'noindex-tax-' . $this->term->taxonomy ] ) && $this->options[ 'noindex-tax-' . $this->term->taxonomy ] === true ) {\n+\t\t\t$current = 'noindex';\n+\t\t}\n+\n+\t\t$noindex_options['options']            = $this->no_index_options;\n+\t\t$noindex_options['options']['default'] = sprintf( $noindex_options['options']['default'], $this->term->taxonomy, $current );\n+\n+\t\tif ( '0' === get_option( 'blog_public' ) ) {","path":"admin/class-taxonomy-presenter.php","position":75,"original_position":75,"commit_id":"2bc6f5628807fb4dc614f32cab6a07991920eb0e","original_commit_id":"2bc6f5628807fb4dc614f32cab6a07991920eb0e","user":{"login":"CarolineGeven","id":8614579,"avatar_url":"https://avatars.githubusercontent.com/u/8614579?v=3","gravatar_id":"","url":"https://api.github.com/users/CarolineGeven","html_url":"https://github.com/CarolineGeven","followers_url":"https://api.github.com/users/CarolineGeven/followers","following_url":"https://api.github.com/users/CarolineGeven/following{/other_user}","gists_url":"https://api.github.com/users/CarolineGeven/gists{/gist_id}","starred_url":"https://api.github.com/users/CarolineGeven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarolineGeven/subscriptions","organizations_url":"https://api.github.com/users/CarolineGeven/orgs","repos_url":"https://api.github.com/users/CarolineGeven/repos","events_url":"https://api.github.com/users/CarolineGeven/events{/privacy}","received_events_url":"https://api.github.com/users/CarolineGeven/received_events","type":"User","site_admin":false},"body":"We don't use yoda style.","created_at":"2015-09-24T08:26:05Z","updated_at":"2015-09-24T08:26:05Z","html_url":"https://github.com/Yoast/wordpress-seo/pull/2801#discussion_r40295501","pull_request_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2801","_links":{"self":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments/40295501"},"html":{"href":"https://github.com/Yoast/wordpress-seo/pull/2801#discussion_r40295501"},"pull_request":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2801"}}},"pull_request":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2801","id":41661058,"html_url":"https://github.com/Yoast/wordpress-seo/pull/2801","diff_url":"https://github.com/Yoast/wordpress-seo/pull/2801.diff","patch_url":"https://github.com/Yoast/wordpress-seo/pull/2801.patch","issue_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/2801","number":2801,"state":"open","locked":false,"title":"Social media settings","user":{"login":"andizer","id":325040,"avatar_url":"https://avatars.githubusercontent.com/u/325040?v=3","gravatar_id":"","url":"https://api.github.com/users/andizer","html_url":"https://github.com/andizer","followers_url":"https://api.github.com/users/andizer/followers","following_url":"https://api.github.com/users/andizer/following{/other_user}","gists_url":"https://api.github.com/users/andizer/gists{/gist_id}","starred_url":"https://api.github.com/users/andizer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andizer/subscriptions","organizations_url":"https://api.github.com/users/andizer/orgs","repos_url":"https://api.github.com/users/andizer/repos","events_url":"https://api.github.com/users/andizer/events{/privacy}","received_events_url":"https://api.github.com/users/andizer/received_events","type":"User","site_admin":false},"body":"Fixes #2349 \r\n\r\nAdding metabox for terms. This box has mostly the same styling as the box for posts.","created_at":"2015-08-05T09:48:45Z","updated_at":"2015-09-24T08:26:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"CarolineGeven","id":8614579,"avatar_url":"https://avatars.githubusercontent.com/u/8614579?v=3","gravatar_id":"","url":"https://api.github.com/users/CarolineGeven","html_url":"https://github.com/CarolineGeven","followers_url":"https://api.github.com/users/CarolineGeven/followers","following_url":"https://api.github.com/users/CarolineGeven/following{/other_user}","gists_url":"https://api.github.com/users/CarolineGeven/gists{/gist_id}","starred_url":"https://api.github.com/users/CarolineGeven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CarolineGeven/subscriptions","organizations_url":"https://api.github.com/users/CarolineGeven/orgs","repos_url":"https://api.github.com/users/CarolineGeven/repos","events_url":"https://api.github.com/users/CarolineGeven/events{/privacy}","received_events_url":"https://api.github.com/users/CarolineGeven/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones/14","html_url":"https://github.com/Yoast/wordpress-seo/milestones/2.4","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones/14/labels","id":1204895,"number":14,"title":"2.4","description":"","creator":{"login":"jdevalk","id":487629,"avatar_url":"https://avatars.githubusercontent.com/u/487629?v=3","gravatar_id":"","url":"https://api.github.com/users/jdevalk","html_url":"https://github.com/jdevalk","followers_url":"https://api.github.com/users/jdevalk/followers","following_url":"https://api.github.com/users/jdevalk/following{/other_user}","gists_url":"https://api.github.com/users/jdevalk/gists{/gist_id}","starred_url":"https://api.github.com/users/jdevalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdevalk/subscriptions","organizations_url":"https://api.github.com/users/jdevalk/orgs","repos_url":"https://api.github.com/users/jdevalk/repos","events_url":"https://api.github.com/users/jdevalk/events{/privacy}","received_events_url":"https://api.github.com/users/jdevalk/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":14,"state":"open","created_at":"2015-07-13T11:06:27Z","updated_at":"2015-09-23T13:26:01Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2801/commits","review_comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2801/comments","review_comment_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/2801/comments","statuses_url":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/2bc6f5628807fb4dc614f32cab6a07991920eb0e","head":{"label":"Yoast:AM/2349-social-media-settings","ref":"AM/2349-social-media-settings","sha":"2bc6f5628807fb4dc614f32cab6a07991920eb0e","user":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"repo":{"id":6723399,"name":"wordpress-seo","full_name":"Yoast/wordpress-seo","owner":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yoast/wordpress-seo","description":"Yoast SEO for WordPress","fork":false,"url":"https://api.github.com/repos/Yoast/wordpress-seo","forks_url":"https://api.github.com/repos/Yoast/wordpress-seo/forks","keys_url":"https://api.github.com/repos/Yoast/wordpress-seo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoast/wordpress-seo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoast/wordpress-seo/teams","hooks_url":"https://api.github.com/repos/Yoast/wordpress-seo/hooks","issue_events_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/events{/number}","events_url":"https://api.github.com/repos/Yoast/wordpress-seo/events","assignees_url":"https://api.github.com/repos/Yoast/wordpress-seo/assignees{/user}","branches_url":"https://api.github.com/repos/Yoast/wordpress-seo/branches{/branch}","tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/tags","blobs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoast/wordpress-seo/languages","stargazers_url":"https://api.github.com/repos/Yoast/wordpress-seo/stargazers","contributors_url":"https://api.github.com/repos/Yoast/wordpress-seo/contributors","subscribers_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscribers","subscription_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscription","commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoast/wordpress-seo/contents/{+path}","compare_url":"https://api.github.com/repos/Yoast/wordpress-seo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoast/wordpress-seo/merges","archive_url":"https://api.github.com/repos/Yoast/wordpress-seo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoast/wordpress-seo/downloads","issues_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues{/number}","pulls_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoast/wordpress-seo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/labels{/name}","releases_url":"https://api.github.com/repos/Yoast/wordpress-seo/releases{/id}","created_at":"2012-11-16T15:16:29Z","updated_at":"2015-09-23T00:40:01Z","pushed_at":"2015-09-23T13:27:46Z","git_url":"git://github.com/Yoast/wordpress-seo.git","ssh_url":"git@github.com:Yoast/wordpress-seo.git","clone_url":"https://github.com/Yoast/wordpress-seo.git","svn_url":"https://github.com/Yoast/wordpress-seo","homepage":"http://yoast.com/wordpress/seo/","size":27996,"stargazers_count":531,"watchers_count":531,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":316,"mirror_url":null,"open_issues_count":246,"forks":316,"open_issues":246,"watchers":531,"default_branch":"trunk"}},"base":{"label":"Yoast:trunk","ref":"trunk","sha":"db8e163f865822fa911af84ab9a118bcef62f55d","user":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"repo":{"id":6723399,"name":"wordpress-seo","full_name":"Yoast/wordpress-seo","owner":{"login":"Yoast","id":4690436,"avatar_url":"https://avatars.githubusercontent.com/u/4690436?v=3","gravatar_id":"","url":"https://api.github.com/users/Yoast","html_url":"https://github.com/Yoast","followers_url":"https://api.github.com/users/Yoast/followers","following_url":"https://api.github.com/users/Yoast/following{/other_user}","gists_url":"https://api.github.com/users/Yoast/gists{/gist_id}","starred_url":"https://api.github.com/users/Yoast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yoast/subscriptions","organizations_url":"https://api.github.com/users/Yoast/orgs","repos_url":"https://api.github.com/users/Yoast/repos","events_url":"https://api.github.com/users/Yoast/events{/privacy}","received_events_url":"https://api.github.com/users/Yoast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yoast/wordpress-seo","description":"Yoast SEO for WordPress","fork":false,"url":"https://api.github.com/repos/Yoast/wordpress-seo","forks_url":"https://api.github.com/repos/Yoast/wordpress-seo/forks","keys_url":"https://api.github.com/repos/Yoast/wordpress-seo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yoast/wordpress-seo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yoast/wordpress-seo/teams","hooks_url":"https://api.github.com/repos/Yoast/wordpress-seo/hooks","issue_events_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/events{/number}","events_url":"https://api.github.com/repos/Yoast/wordpress-seo/events","assignees_url":"https://api.github.com/repos/Yoast/wordpress-seo/assignees{/user}","branches_url":"https://api.github.com/repos/Yoast/wordpress-seo/branches{/branch}","tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/tags","blobs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/{sha}","languages_url":"https://api.github.com/repos/Yoast/wordpress-seo/languages","stargazers_url":"https://api.github.com/repos/Yoast/wordpress-seo/stargazers","contributors_url":"https://api.github.com/repos/Yoast/wordpress-seo/contributors","subscribers_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscribers","subscription_url":"https://api.github.com/repos/Yoast/wordpress-seo/subscription","commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yoast/wordpress-seo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yoast/wordpress-seo/contents/{+path}","compare_url":"https://api.github.com/repos/Yoast/wordpress-seo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yoast/wordpress-seo/merges","archive_url":"https://api.github.com/repos/Yoast/wordpress-seo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yoast/wordpress-seo/downloads","issues_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues{/number}","pulls_url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls{/number}","milestones_url":"https://api.github.com/repos/Yoast/wordpress-seo/milestones{/number}","notifications_url":"https://api.github.com/repos/Yoast/wordpress-seo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/labels{/name}","releases_url":"https://api.github.com/repos/Yoast/wordpress-seo/releases{/id}","created_at":"2012-11-16T15:16:29Z","updated_at":"2015-09-23T00:40:01Z","pushed_at":"2015-09-23T13:27:46Z","git_url":"git://github.com/Yoast/wordpress-seo.git","ssh_url":"git@github.com:Yoast/wordpress-seo.git","clone_url":"https://github.com/Yoast/wordpress-seo.git","svn_url":"https://github.com/Yoast/wordpress-seo","homepage":"http://yoast.com/wordpress/seo/","size":27996,"stargazers_count":531,"watchers_count":531,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":316,"mirror_url":null,"open_issues_count":246,"forks":316,"open_issues":246,"watchers":531,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2801"},"html":{"href":"https://github.com/Yoast/wordpress-seo/pull/2801"},"issue":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/issues/2801"},"comments":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/issues/2801/comments"},"review_comments":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2801/comments"},"review_comment":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/2801/commits"},"statuses":{"href":"https://api.github.com/repos/Yoast/wordpress-seo/statuses/2bc6f5628807fb4dc614f32cab6a07991920eb0e"}}}}