Closed jrfnl closed 5 years ago
I think that themes shouldn't set php config values at runtime, sounds like a plugin territory to me.
@carolinan @justintadlock @jocastaneda Thoughts?
The only times I can think of that would "require" a theme to change config values would be during a demo import - which is indeed plugin territory. Other than that I can't imagine a valid scenario for themes changing config values
INI customization is surely not a theme territory. We can add this sniff as ERROR.
Should we just add this in the ruleset, or should we extend it and remove all $whitelisted_options
?
IMO: just add it to the ruleset and possibly make it an error in all cases.
The $whitelisted_options
is a very limited list and I don't think we need to worry about it unless you've seen people use any of those within themes. If you have, then yes, extending the class and overloading the property with an empty array should do the trick. I don't think any other changes should be needed.
For the details:
Closing as PR #219 has been merged.
WPCS 2.1.0 introduces a new sniff
WordPress.PHP.IniSet
.From the changelog:
Ref: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases/tag/2.1.0
I'm wondering if this sniff should be added to TRTCS. Opinions ?