Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #32274, comment 8


Ignore:
Timestamp:
05/28/2016 12:11:46 PM (8 years ago)
Author:
jdgrimes
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32274, comment 8

    initial v1  
    1616This will only work for files in that one directory. `__DIR__` won't be magic, and so it is really not any use for us. We can already use `ABSPATH` or other constants. In fact, that's what we already do. The only place that we really use `dirname( __FILE__ )` in core is in files that are entry-points of the application. We use that to include the bootstrap, and then use `ABSPATH` and other constants after that.
    1717
    18 For plugins, the solution is for them to define their own constants if the don't want to use `dirname( __FILE__ )` in every place.
     18For plugins, the solution is for them to define their own constants if they don't want to use `dirname( __FILE__ )` in every place.