vip-scanner icon indicating copy to clipboard operation
vip-scanner copied to clipboard

Added class to check for forbidden functions only in template files

Open ylefebvre opened this issue 10 years ago • 6 comments

Addresses issue #23

ylefebvre avatar Nov 05 '14 01:11 ylefebvre

Updated error slugs to based on conversation in PR #187.

ylefebvre avatar Nov 05 '14 13:11 ylefebvre

Any particular reason why this check was added to the WP.com Theme Review Type?

fklein-lu avatar Dec 02 '14 15:12 fklein-lu

I made it part of this type since the issue #23 specified that redirects should not be placed in template files, so this would affect all theme reviews, not just VIP theme reviews.

ylefebvre avatar Dec 09 '14 20:12 ylefebvre

@fklein-lu do you have any specific objections?

joshbetz avatar Dec 09 '14 20:12 joshbetz

I don’t have any objections against including this in the WP.com Theme Review Type, although I consider this to be an edge case.

But as far as I can see, the new check never gets added to the VIP Theme Review Type. So that would have to be done, since that’s where the check makes the most sense.

I like the template detection code, and I see other checks that would only be applicable for template files. So I wonder if we can move the code that indentifies the template files outside of this check into a method. That way it could be usable in other checks without any code duplication.

fklein-lu avatar Dec 09 '14 20:12 fklein-lu

What else than line 37 in config-vip-scanner.php in this PR do you see as required to add this new check to the VIP Theme Review? I tested this code and it executed the new checks.

ylefebvre avatar Dec 10 '14 00:12 ylefebvre