Opened 15 years ago
Closed 15 years ago
#11840 closed enhancement (wontfix)
Define WP_PLUGIN_DIR before loading db.php
Reported by: | sirzooro | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9.1 |
Component: | General | Keywords: | has-patch 2nd-opinion |
Focuses: | Cc: |
Description
In my plugin (DB Cache Reloaded) I provide custom db.php file, and in in I need to know the plugin directory. Unfortunately WP_PLUGIN_DIR
is defined after this file is loaded, so now I have to define it in my plugin.
Attached patch moves this define before db.php is loaded.
Attachments (1)
Change History (3)
#2
@
15 years ago
- Milestone 3.0 deleted
- Resolution set to wontfix
- Status changed from new to closed
Many default constants are defined at specific places so they can be overridden (like here). The plugin directory constants for example may be defined in sunrise.php. You can wait until after WP_PLUGIN_DIR is defined to do what you need, or simply define it.
Note: See
TracTickets for help on using
tickets.
Is this not to allow plugins to override it or something? If not, would it make sense to move a couple more defines?