Juliette
Juliette
The sniff covers both actions as well as filters. Generally speaking, themes should _hook into_ core filters and actions and shouldn't ever need to invoke the core hooks. There are...
> The theme template files are supposed to be loaded with core functions. That's the crux of it: "supposed to". However, there is no guarantee that that's the only way...
Just to be clear: the variables we are talking about here **are** declared as _global_ variables based on the file alone. It's only by the happenstance that the file is...
> We can nitpick over whether the feature is happenstance or intentional, but that doesn't really matter That's not nitpicking, that's basic understanding of the principles of how PHP works....
@dingo-d The fix which was merged addresses the `PrefixAllGlobals` part of the issue only. Should this issue stay open to further discuss whether or not to address the `GlobalVariablesOverride` part...
> I think that prefix all globals sniff covers the use-case of multiple text domains. Nope, different sniff, not the same thing.
> So this should work out of the box if I'm not mistaken > Unless this needs to be re-set in the custom ruleset It should work out of the...
Looks like the subdirectory in TwentyTwenty is called `parts`, i.e. not one of the whitelisted subdirectories. Adding something along the lines of the below to the custom ruleset should solve...
@dingo-d Sounds like a good idea, but beware of what I said in https://github.com/WPTRT/WPThemeReview/issues/233#issuecomment-529919790
Just my two pennies on a few points mentioned above: > A sniff that outputs all hardcoded URLs found in a theme has no advantage over using grep. It does...