Open jrfnl opened 7 years ago
This falls under
Avoid hard coding to modify content. Instead, use function parameters, filters and action hooks where appropriate.
This should be an error.
By using a hardcoded a hard coded menu name it would require the menu to have the exactly same name which does not make sense for a publically released theme.
I think you are mistaken. A theme names its menu locations, not the user. They should not have to be in variables. The menu location is not "content" as mentioned in that rule you quoted.
A theme names its menu locations, not the user.
You are right but we are not talking about the location but the menu name.
These are the two parameter which is causing the confusing. We want to restrict the first not the second.
I hope this makes sense.
Rule type:
Error / Warning
Rule:
The rule should be clarified and added to the handbook before any action is taken on this issue.
Ref: https://make.wordpress.org/themes/handbook/review/required/theme-check-plugin/#info
Theme check file covering this rule:
Unknown Loosely related: https://github.com/WordPress/theme-check/issues/142
Decision needed:
To do: