Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New sniff] Incorrect function parameter usage #96

Open
3 tasks
jrfnl opened this issue Dec 18, 2016 · 1 comment
Open
3 tasks

[New sniff] Incorrect function parameter usage #96

jrfnl opened this issue Dec 18, 2016 · 1 comment

Comments

@jrfnl
Copy link

jrfnl commented Dec 18, 2016

Rule type:

Error / Warning

Rule:

Check for incorrect usage of certain parameters in WP functions (hard-coded) and provide valid alternatives based on the parameter passed.

hardcoded text in title tag
Ref: https://make.wordpress.org/themes/handbook/review/required/theme-check-plugin/#additional-checks

hardcoded dates
Ref: https://make.wordpress.org/themes/handbook/review/required/theme-check-plugin/#info

To create this sniff, a list of function should be compiled where theme authors are typically doing this wrong, i.e. passing hardcoded information instead of variables/function calls.

Theme check file covering this rule:

https://github.com/WordPress/theme-check/blob/master/checks/time_date.php

Decision needed:

Which function and parameters should be covered by this sniff ? Input requested.

To do:

  • Clarify the existing rules in the Theme Review handbook
  • Create unit tests
  • Create new sniff
@grappler
Copy link
Member

Related to this would be #93

Once #80 get merged in this will be a very easy sniff to merge it as most of the work will have been done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants