Opened 14 years ago
Closed 14 years ago
#4550 closed defect (bug) (fixed)
BP_VERSION / BP_DB_VERSION constants are empty
| Reported by: | r-a-y | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.7 |
| Component: | Core | Version: | 1.7 |
| Severity: | major | Keywords: | has-patch |
| Cc: |
Description
Because the BuddyPress::constants() method is called before BuddyPress::setup_globals() (where the version variables are defined), it's impossible to set the BP_VERSION and BP_DB_VERSION constants.
In the attached patch, I have moved $version and $db_version out of setup_globals() and into main class properties so the constants will still work and will not break any existing plugins relying on them.
Attachments (2)
Change History (7)
#1
@
14 years ago
#3
@
14 years ago
Here's an alternate patch in line with JJJ's suggestion. I didn't touch the search slug, and
all other constants besides BP_VERSION and BP_DB_VERSION are used in setup_globals(), so the legacy constants method ended up pretty bare.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Probably seems counter-intuitive, but I'd rather we reverse the process for non-bootstrap constants and have a legacy constants method or function that separates non-essential constants that aren't used anywhere by BuddyPress core anymore away from the overloading constants like the _SLUG ones are.