WordPress-Coding-Standards icon indicating copy to clipboard operation
WordPress-Coding-Standards copied to clipboard

Prefer __DIR__ to dirname( __FILE__ )

Open kkmuffme opened this issue 4 years ago • 0 comments

A lot of WP code that was created a long time ago, relies on dirname( __FILE__ ) or dirname( plugin_basename( __FILE__ ) ) (e.g. very common for loading the plugin textdomain), due to the PHP version restrictions WP had.

Since WP now has bumped the PHP min version, maybe it would be possible to prefer the use of __DIR__

kkmuffme avatar Oct 13 '20 07:10 kkmuffme