GaryJones / Gamajo-Template-Loader

A class to copy into your WordPress plugin, to allow loading template parts with fallback through the child theme > parent theme > plugin.
GNU General Public License v2.0
292 stars 61 forks source link

YOUR_PLUGIN_DIR undefined constant in PHP 7 #19

Closed zackkatz closed 8 years ago

zackkatz commented 8 years ago

PHP Notice: Use of undefined constant YOUR_PLUGIN_DIR - assumed 'YOUR_PLUGIN_DIR'

Apparently in PHP 7, constants need to be defined, even if overridden by an extended class. Can this be updated safely to 'YOUR_PLUGIN_DIR' (a string)?

https://github.com/GaryJones/Gamajo-Template-Loader/blob/develop/class-gamajo-template-loader.php#L52

GaryJones commented 8 years ago

That makes sense. I've even type-hinted it should be a string.

If you can do a PR against the develop branch, I'll happily merge.