#30843 closed defect (bug) (fixed)
get_ancestors filter: Parameter is missing
| Reported by: | tmatsuur | Owned by: | jorbin |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1.1 |
| Component: | Posts, Post Types | Version: | 4.1 |
| Severity: | normal | Keywords: | has-patch commit fixed-major |
| Cc: | Focuses: |
Description
Since English is not good, we will write the main points only.
wp-includes/taxonomy.php: 4335-4345
/** * Filter a given object's ancestors. * * @since 3.1.0 * * @param array $ancestors An array of object ancestors. * @param int $object_id Object ID. * @param string $object_type Type of object. * @param string $resource_type Type of resource $object_type is. */ return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type );
New param $resource_type has not been added.
Attachments (1)
Change History (12)
#3
@
12 years ago
- Keywords has-patch added
- Milestone Awaiting Review → 4.1.1
30843.diff adds the $resource_type parameter to the get_ancestors filter missed in [30141]. See #15029.
#5
in reply to: ↑ 4
@
12 years ago
Replying to DrewAPicture:
Thank you for quick work.
#6
follow-up:
↓ 8
@
12 years ago
- Keywords fixed-major added
[30993] missed the ticket. It fixes the issue for trunk.
While DrewAPicture is correct that this was an error in [30141], I'm unsure whether this should count as a regression that needs to go in 4.1.1, since technically the only thing currently "broken" is a bit of incorrect inline documentation. I'll mark the ticket fixed-major and let the leads decide.
This ticket was mentioned in Slack in #core by drew. View the logs.
12 years ago
#8
in reply to: ↑ 6
@
12 years ago
Replying to boonebgorges:
[30993] missed the ticket. It fixes the issue for trunk.
While DrewAPicture is correct that this was an error in [30141], I'm unsure whether this should count as a regression that needs to go in 4.1.1, since technically the only thing currently "broken" is a bit of incorrect inline documentation. I'll mark the ticket fixed-major and let the leads decide.
Actually, it's not just a bit of documentation. The parameter doc was added in the original [30141] commit. The only reason I marked this 4.1.1 was because the variable was never added, which would, imo, constitute a bug worth fixing in a point release :)
#9
@
12 years ago
Actually, it's not just a bit of documentation.
Yes, the documentation was added in [30141]. But there is no regression in the code, because the filter here appears exactly as it did in 4.0. That being said, it was definitely a mistake not to have fixed the filter, so a point release fix is fine with me.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@tmatsuur: Would you like to create a patch to add the missing parameter?