#35922 closed enhancement (fixed)
get_edit_term_link should not require $taxonomy
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.5 | Priority: | normal |
| Severity: | normal | Version: | 4.4 |
| Component: | Taxonomy | Keywords: | |
| Focuses: | Cc: |
Description
Both get_term() and get_term_link() no longer require $taxonomy to work anymore and get_edit_term_link() should follow suit. It would be best to utilize the $term->taxonomy if one isn’t set.
Special thanks to @sc0ttkclark for helping me with my first ticket! :)
Attachments (1)
Change History (11)
#3
@
10 years ago
- Milestone changed from Awaiting Review to 4.5
- Owner set to boonebgorges
- Status changed from new to assigned
Thanks! Let's sneak this in.
Side note: when generating your patches, please set your editor config to use tabs rather than spaces :)
#7
@
10 years ago
@boonebgorges While working on #36224 I noticed that test_cap_check_should_use_correct_taxonomy_when_taxonomy_is_not_specified is not 100% correct / incomplete.
First, manage_terms is not a direct taxonomy property, but can only be passed as part of the capabilities array.
Second, get_edit_term_link() checks against edit_terms capability, not manage_terms.
Third, the wptests_tax_subscriber taxonomy isn't even used in the test.
I'd add a new test to check that the custom capabilities get respected when using get_edit_term_link().
Welcome and thanks for the patch!