#52142 closed defect (bug) (fixed)
Declare `sort` and `args` properties of WP_Taxonomy
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | Taxonomy | Keywords: | good-first-bug has-patch has-dev-note |
Focuses: | Cc: |
Description
WP_Taxonomy
supports two properties which are not declared on the class, sort
and args
. These are used in wp_set_object_terms()
and wp_get_object_terms()
to control the sort order of terms in the taxonomy.
These properties should be declared on the class with an initial value of null
, added to the documentation for wp_register_taxonomy()
, and added to the default args array in WP_Taxonomy::set_props()
.
Change History (15)
This ticket was mentioned in PR #959 on WordPress/wordpress-develop by gunnard.
2 years ago
#1
- Keywords has-patch added; needs-patch removed
#2
@
2 years ago
Hello!
This sounds pretty straight forward. This is my first contribution and I will fix/adjust whatever I need to in order to follow the correct procedure.
#3
@
2 years ago
Thanks for the patch @gunnard ! All looks good. Would you mind adding entries to the documentation for the $args
parameter of the wp_register_taxonomy()
function too?
#5
in reply to:
↑ description
;
follow-up:
↓ 6
@
2 years ago
Replying to johnbillion:
Since sort
and args
were technically introduced in WordPress 2.5 and 2.6 respectively, per the linked changes, I wonder if the @since
tags should reflect that, rather than showing them as introduced in WordPress 5.7.
Looks good to me otherwise :)
#6
in reply to:
↑ 5
@
2 years ago
Replying to SergeyBiryukov:
Replying to johnbillion:
Since
sort
andargs
were technically introduced in WordPress 2.5 and 2.6 respectively, per the linked changes, I wonder if the@since
tags should reflect that, rather than showing them as introduced in WordPress 5.7.
Looks good to me otherwise :)
Very good point @SergeyBiryukov. I will defer to @johnbillion and adjust accordingly.
#7
@
2 years ago
- Milestone changed from Future Release to 5.7
- Owner set to johnbillion
- Status changed from new to reviewing
#9
in reply to:
↑ 8
@
2 years ago
Replying to johnbillion:
Agreed, let's change those
@since
tags to 2.5.0 and 2.6.0.
Fantastic. Updated and pushed.
#11
follow-up:
↓ 13
@
2 years ago
Cheers @gunnard! I ended up padding out the detail in the descriptions a bit, as these properties are used in a specific case that's not clear unless you go digging into the code.
johnbillion commented on PR #959:
2 years ago
#12
#13
in reply to:
↑ 11
@
2 years ago
Replying to johnbillion:
Cheers @gunnard! I ended up padding out the detail in the descriptions a bit, as these properties are used in a specific case that's not clear unless you go digging into the code
Thank you very much @johnbillion @SergeyBiryukov for the help!
#15
@
2 years ago
- Keywords has-dev-note added
This was mentioned in the miscellaneous developer changes developer note: https://make.wordpress.org/core/2021/02/23/miscellaneous-developer-focused-changes-in-wordpress-5-7/.
…le values
declared 'sort' and 'args' as null for WP_Taxonomy
Trac ticket: https://core.trac.wordpress.org/ticket/52142