[wp-trac] [WordPress Trac] #50085: Use `__DIR__` magic constant instead of `dirname(__FILE__)`

WordPress Trac noreply at wordpress.org
Mon May 4 20:06:47 UTC 2020


#50085: Use `__DIR__` magic constant instead of `dirname(__FILE__)`
-------------------------+-----------------------------
 Reporter:  ayeshrajans  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  trunk
 Severity:  normal       |   Keywords:  has-patch
  Focuses:  performance  |
-------------------------+-----------------------------
 Now with WordPress requiring PHP 5.6 the minimum, we can replace
 `dirname(__FILE__)` calls with the PHP 5.3-introuced `__DIR__` constant.

 This ticket does not intend to change such calls in third party libraries,
 even on the ones that we are the de-facto maintainers due to the package
 age.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50085>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list