Closed khacoder closed 8 years ago
I have made the requested changes.
@grappler Nearly there.
$file_blacklist
is now still a variable within the function while it does not need to be redefined every time the function is called, it doesn't change between function calls after all, so it should be a class property which is defined only once (if we could use PHP 5.6 we could even make it a class constant, unfortunately arrays can not be used with class constants until then).
Secondly, it is not a blacklist, but a whitelist. If the file name is in the whitelist of files which are logical places/in which a require/include
is allowed to exist, no warning will be thrown.
I hope it is all good now 😄
Nearly there, just dotting the i's now...
Getting closer minute by minute.
Issue #66 Check if include(_once) or require(_once) is used, and issue a warning to see if get_template_part() or locate_template() is more appropriate.