mirror of
https://gh.wpcy.net/https://github.com/wp-cli/handbook.git
synced 2026-04-25 19:20:41 +08:00
23 lines
861 B
Markdown
23 lines
861 B
Markdown
# wp taxonomy
|
|
|
|
Retrieves information about registered taxonomies.
|
|
|
|
See references for [built-in taxonomies](https://developer.wordpress.org/themes/basics/categories-tags-custom-taxonomies/) and [custom taxonomies](https://developer.wordpress.org/plugins/taxonomies/working-with-custom-taxonomies/).
|
|
|
|
### EXAMPLES
|
|
|
|
# List all taxonomies with 'post' object type.
|
|
$ wp taxonomy list --object_type=post --fields=name,public
|
|
+-------------+--------+
|
|
| name | public |
|
|
+-------------+--------+
|
|
| category | 1 |
|
|
| post_tag | 1 |
|
|
| post_format | 1 |
|
|
+-------------+--------+
|
|
|
|
# Get capabilities of 'post_tag' taxonomy.
|
|
$ wp taxonomy get post_tag --field=cap
|
|
{"manage_terms":"manage_categories","edit_terms":"manage_categories","delete_terms":"manage_categories","assign_terms":"edit_posts"}
|
|
|
|
|