DevinVinson / WordPress-Plugin-Boilerplate

[WordPress] A foundation for WordPress Plugin Development that aims to provide a clear and consistent guide for building your plugins.
http://wppb.io
7.67k stars 2.25k forks source link

Code should not use __DIR__ constant, as it requires PHP 5.3.0 #141

Closed TobiasBg closed 10 years ago

TobiasBg commented 10 years ago

The __DIR__ constant has only been added in PHP 5.3.0 and should therefore not be used e.g. in https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/blob/master/plugin-name/admin/class-plugin-name-admin.php#L80 as WordPress still supports PHP 5.2.4, and plugins should too.

The fix is as easy as replacing that with dirname( __FILE__ ).

grappler commented 10 years ago

It has been discussed here https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/issues/137

tommcfarlin commented 10 years ago

Closing this ticket as it's discussed in #137 (ht @grappler).