WordPress / WordPress/WordPress-Coding-Standards
get_categories `type => link` argument is deprecated
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.8k
- Forks
- 521
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 1
Description
Not 100% sure should this go in the DeprecatedParametersSniff or DeprecatedParameterValuesSniff. Basically the get_categories() function has a deprecated argument
array( 'type' => 'link')
Which, if used, will throw a notice to use
array( 'taxonomy' => 'link_category')
instead.
I think this should be added in one of those two but I'm not sure which one tbh 😬
I'm happy to make a PR 🙂 Since I'm making a core patch to change the docblock of that function as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading DeprecatedParametersSniff and DeprecatedParameterValuesSniff and compare how each handles deprecated arguments and values. Determine which sniff fits get_categories()'s type => link case, then verify that the deprecated form is reported with the suggested taxonomy => link_category replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100