Opened 12 years ago
Closed 12 years ago
#4550 closed defect (bug) (fixed)
BP_VERSION / BP_DB_VERSION constants are empty
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 1.7 | Priority: | normal |
Severity: | major | Version: | 1.7 |
Component: | Core | 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
@
12 years ago
#3
@
12 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.
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.