#35922 closed enhancement (fixed)
get_edit_term_link should not require $taxonomy
| Reported by: | nicdford | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | Taxonomy | Version: | 4.4 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
11 years ago
- Milestone Awaiting Review → 4.5
- Owner set to
- Status new → 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
@
11 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().
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Welcome and thanks for the patch!