Repository navigation
Commit a53d52a
committed
Abilities API: Add the
Adds four abilities for the terms of the taxonomies that set the new `show_in_abilities` argument of `register_taxonomy()`, which is on for `category` and `post_tag`.
`core/terms-query` returns a page of the terms of a taxonomy with the totals, filtered by IDs, slugs, parent, post or `hide_empty`. `core/term-create`, `core/term-update` and `core/term-delete` create, change and permanently delete a term. The create and update abilities return the term in the same form as the query.
The abilities require a logged-in user, and each call checks the capabilities of the user for the taxonomy and the term. A default term cannot be deleted.
See #66743.core/terms-query, core/term-create, core/term-update and core/term-delete abilities.1 parent a5c41fa commit a53d52a
11 files changed
Lines changed: 7379 additions & 0 deletions
File tree
- src/wp-includes
- abilities
- tests/phpunit/tests
- abilities-api
- rest-api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
379 | 381 | | |
380 | 382 | | |
381 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
382 | 387 | | |
0 commit comments