{"action":"created","comment":{"url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/comments/42019791","id":42019791,"diff_hunk":"@@ -0,0 +1,71 @@\n+<?php\n+/**\n+ * Manage taxonomies.\n+ *\n+ * @package wp-cli\n+ */\n+class Taxonomy_Command extends WP_CLI_Command {\n+\n+\tprivate $fields = array(\n+\t\t'name',\n+\t\t'label',\n+\t\t'description',\n+\t\t'public',\n+\t\t'hierarchical'\n+\t);\n+\n+\t/**\n+\t * List taxonomies.\n+\t *\n+\t * ## OPTIONS\n+\t *\n+\t * [--<field>=<value>]\n+\t * : Filter by one or more fields (see get_taxonomies() first parameter for a list of available fields).\n+\t *\n+\t * [--field=<field>]\n+\t * : Prints the value of a single field for each taxonomy.\n+\t *\n+\t * [--fields=<fields>]\n+\t * : Limit the output to specific taxonomy fields.\n+\t *\n+\t * [--format=<format>]\n+\t * : Accepted values: table, csv, json, count. Default: table\n+\t *\n+\t * ## AVAILABLE FIELDS\n+\t *\n+\t * These fields will be displayed by default for each term:\n+\t *\n+\t * * name\n+\t * * label\n+\t * * description\n+\t * * public\n+\t * * hierarchical\n+\t *\n+\t * There are no optionally available fields.\n+\t *\n+\t * ## EXAMPLES\n+\t *\n+\t *     wp taxonomy list --format=csv\n+\t *\n+\t *     wp taxonomy list --object-type=post --fields=name,public\n+\t *\n+\t * @subcommand list\n+\t */\n+\tpublic function list_( $args, $assoc_args ) {\n+\t\t$formatter = $this->get_formatter( $assoc_args );\n+\n+\t\tif ( isset( $assoc_args['object_type'] ) ) {\n+\t\t\t$assoc_args['object_type'] = array( $assoc_args['object_type'] );\n+\t\t}\n+\n+\t\t$taxonomies = get_taxonomies( $assoc_args, 'objects' );\n+\n+\t\t$formatter->display_items( $taxonomies );\n+\t}","path":"php/commands/taxonomy.php","position":64,"original_position":64,"commit_id":"c60adb7f777183eb390f368eeb0b7c81eae458ab","original_commit_id":"c60adb7f777183eb390f368eeb0b7c81eae458ab","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":"Would it make sense to have `wp taxonomy get` too?","created_at":"2015-10-14T16:49:56Z","updated_at":"2015-10-14T16:49:56Z","html_url":"https://github.com/wp-cli/wp-cli/pull/2145#discussion_r42019791","pull_request_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/2145","_links":{"self":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/comments/42019791"},"html":{"href":"https://github.com/wp-cli/wp-cli/pull/2145#discussion_r42019791"},"pull_request":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/2145"}}},"pull_request":{"url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/2145","id":47607126,"html_url":"https://github.com/wp-cli/wp-cli/pull/2145","diff_url":"https://github.com/wp-cli/wp-cli/pull/2145.diff","patch_url":"https://github.com/wp-cli/wp-cli/pull/2145.patch","issue_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/2145","number":2145,"state":"open","locked":false,"title":"Add `wp taxonomy list` command","user":{"login":"rodrigoprimo","id":77215,"avatar_url":"https://avatars.githubusercontent.com/u/77215?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigoprimo","html_url":"https://github.com/rodrigoprimo","followers_url":"https://api.github.com/users/rodrigoprimo/followers","following_url":"https://api.github.com/users/rodrigoprimo/following{/other_user}","gists_url":"https://api.github.com/users/rodrigoprimo/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigoprimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigoprimo/subscriptions","organizations_url":"https://api.github.com/users/rodrigoprimo/orgs","repos_url":"https://api.github.com/users/rodrigoprimo/repos","events_url":"https://api.github.com/users/rodrigoprimo/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigoprimo/received_events","type":"User","site_admin":false},"body":"Refs #1474 ","created_at":"2015-10-14T00:54:22Z","updated_at":"2015-10-14T16:49:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b186f03f0cb4106b940ba177ae080856a9c0e080","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/2145/commits","review_comments_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/2145/comments","review_comment_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/2145/comments","statuses_url":"https://api.github.com/repos/wp-cli/wp-cli/statuses/c60adb7f777183eb390f368eeb0b7c81eae458ab","head":{"label":"rodrigoprimo:taxonomy","ref":"taxonomy","sha":"c60adb7f777183eb390f368eeb0b7c81eae458ab","user":{"login":"rodrigoprimo","id":77215,"avatar_url":"https://avatars.githubusercontent.com/u/77215?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigoprimo","html_url":"https://github.com/rodrigoprimo","followers_url":"https://api.github.com/users/rodrigoprimo/followers","following_url":"https://api.github.com/users/rodrigoprimo/following{/other_user}","gists_url":"https://api.github.com/users/rodrigoprimo/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigoprimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigoprimo/subscriptions","organizations_url":"https://api.github.com/users/rodrigoprimo/orgs","repos_url":"https://api.github.com/users/rodrigoprimo/repos","events_url":"https://api.github.com/users/rodrigoprimo/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigoprimo/received_events","type":"User","site_admin":false},"repo":{"id":13651048,"name":"wp-cli","full_name":"rodrigoprimo/wp-cli","owner":{"login":"rodrigoprimo","id":77215,"avatar_url":"https://avatars.githubusercontent.com/u/77215?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigoprimo","html_url":"https://github.com/rodrigoprimo","followers_url":"https://api.github.com/users/rodrigoprimo/followers","following_url":"https://api.github.com/users/rodrigoprimo/following{/other_user}","gists_url":"https://api.github.com/users/rodrigoprimo/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigoprimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigoprimo/subscriptions","organizations_url":"https://api.github.com/users/rodrigoprimo/orgs","repos_url":"https://api.github.com/users/rodrigoprimo/repos","events_url":"https://api.github.com/users/rodrigoprimo/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigoprimo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rodrigoprimo/wp-cli","description":"A command line interface for WordPress","fork":true,"url":"https://api.github.com/repos/rodrigoprimo/wp-cli","forks_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/forks","keys_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/teams","hooks_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/hooks","issue_events_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/issues/events{/number}","events_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/events","assignees_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/assignees{/user}","branches_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/branches{/branch}","tags_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/tags","blobs_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/languages","stargazers_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/stargazers","contributors_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/contributors","subscribers_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/subscribers","subscription_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/subscription","commits_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/contents/{+path}","compare_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/merges","archive_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/downloads","issues_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/issues{/number}","pulls_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/labels{/name}","releases_url":"https://api.github.com/repos/rodrigoprimo/wp-cli/releases{/id}","created_at":"2013-10-17T14:19:34Z","updated_at":"2015-03-17T14:47:09Z","pushed_at":"2015-10-14T15:08:38Z","git_url":"git://github.com/rodrigoprimo/wp-cli.git","ssh_url":"git@github.com:rodrigoprimo/wp-cli.git","clone_url":"https://github.com/rodrigoprimo/wp-cli.git","svn_url":"https://github.com/rodrigoprimo/wp-cli","homepage":"http://wp-cli.org/","size":6451,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":0,"forks":8,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wp-cli:master","ref":"master","sha":"b57e0527041ef52089f516674bd87bddfcfe642f","user":{"login":"wp-cli","id":1570774,"avatar_url":"https://avatars.githubusercontent.com/u/1570774?v=3","gravatar_id":"","url":"https://api.github.com/users/wp-cli","html_url":"https://github.com/wp-cli","followers_url":"https://api.github.com/users/wp-cli/followers","following_url":"https://api.github.com/users/wp-cli/following{/other_user}","gists_url":"https://api.github.com/users/wp-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-cli/subscriptions","organizations_url":"https://api.github.com/users/wp-cli/orgs","repos_url":"https://api.github.com/users/wp-cli/repos","events_url":"https://api.github.com/users/wp-cli/events{/privacy}","received_events_url":"https://api.github.com/users/wp-cli/received_events","type":"Organization","site_admin":false},"repo":{"id":2360755,"name":"wp-cli","full_name":"wp-cli/wp-cli","owner":{"login":"wp-cli","id":1570774,"avatar_url":"https://avatars.githubusercontent.com/u/1570774?v=3","gravatar_id":"","url":"https://api.github.com/users/wp-cli","html_url":"https://github.com/wp-cli","followers_url":"https://api.github.com/users/wp-cli/followers","following_url":"https://api.github.com/users/wp-cli/following{/other_user}","gists_url":"https://api.github.com/users/wp-cli/gists{/gist_id}","starred_url":"https://api.github.com/users/wp-cli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wp-cli/subscriptions","organizations_url":"https://api.github.com/users/wp-cli/orgs","repos_url":"https://api.github.com/users/wp-cli/repos","events_url":"https://api.github.com/users/wp-cli/events{/privacy}","received_events_url":"https://api.github.com/users/wp-cli/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wp-cli/wp-cli","description":"A command line interface for WordPress","fork":false,"url":"https://api.github.com/repos/wp-cli/wp-cli","forks_url":"https://api.github.com/repos/wp-cli/wp-cli/forks","keys_url":"https://api.github.com/repos/wp-cli/wp-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wp-cli/wp-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wp-cli/wp-cli/teams","hooks_url":"https://api.github.com/repos/wp-cli/wp-cli/hooks","issue_events_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/events{/number}","events_url":"https://api.github.com/repos/wp-cli/wp-cli/events","assignees_url":"https://api.github.com/repos/wp-cli/wp-cli/assignees{/user}","branches_url":"https://api.github.com/repos/wp-cli/wp-cli/branches{/branch}","tags_url":"https://api.github.com/repos/wp-cli/wp-cli/tags","blobs_url":"https://api.github.com/repos/wp-cli/wp-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wp-cli/wp-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wp-cli/wp-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/wp-cli/wp-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wp-cli/wp-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/wp-cli/wp-cli/languages","stargazers_url":"https://api.github.com/repos/wp-cli/wp-cli/stargazers","contributors_url":"https://api.github.com/repos/wp-cli/wp-cli/contributors","subscribers_url":"https://api.github.com/repos/wp-cli/wp-cli/subscribers","subscription_url":"https://api.github.com/repos/wp-cli/wp-cli/subscription","commits_url":"https://api.github.com/repos/wp-cli/wp-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/wp-cli/wp-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/wp-cli/wp-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/wp-cli/wp-cli/contents/{+path}","compare_url":"https://api.github.com/repos/wp-cli/wp-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wp-cli/wp-cli/merges","archive_url":"https://api.github.com/repos/wp-cli/wp-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wp-cli/wp-cli/downloads","issues_url":"https://api.github.com/repos/wp-cli/wp-cli/issues{/number}","pulls_url":"https://api.github.com/repos/wp-cli/wp-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/wp-cli/wp-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/wp-cli/wp-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wp-cli/wp-cli/labels{/name}","releases_url":"https://api.github.com/repos/wp-cli/wp-cli/releases{/id}","created_at":"2011-09-10T12:51:59Z","updated_at":"2015-10-14T06:53:35Z","pushed_at":"2015-10-14T16:30:14Z","git_url":"git://github.com/wp-cli/wp-cli.git","ssh_url":"git@github.com:wp-cli/wp-cli.git","clone_url":"https://github.com/wp-cli/wp-cli.git","svn_url":"https://github.com/wp-cli/wp-cli","homepage":"http://wp-cli.org/","size":17204,"stargazers_count":2347,"watchers_count":2347,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":484,"mirror_url":null,"open_issues_count":137,"forks":484,"open_issues":137,"watchers":2347,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/2145"},"html":{"href":"https://github.com/wp-cli/wp-cli/pull/2145"},"issue":{"href":"https://api.github.com/repos/wp-cli/wp-cli/issues/2145"},"comments":{"href":"https://api.github.com/repos/wp-cli/wp-cli/issues/2145/comments"},"review_comments":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/2145/comments"},"review_comment":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wp-cli/wp-cli/pulls/2145/commits"},"statuses":{"href":"https://api.github.com/repos/wp-cli/wp-cli/statuses/c60adb7f777183eb390f368eeb0b7c81eae458ab"}}}}