#2559 closed defect (bug) (fixed)
trunk src restructuring broke plugin activation/de-activation/and some upgrade hooks
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | high |
Severity: | major | Version: | trunk |
Component: | API - Installation/Upgrade | Keywords: | has-patch |
Cc: |
Description
For people running trunk, the recent restructuring where the /src/ folder was added, along with the new bbpress/bbpress.php loader file, has caused a bunch of hooks that use bbpress()->basename
to break. Easiest way to see this is put some debug in bbp_activation()
and then activate the plugin -- your debug won't get called.
The issue is that WordPress thinks the plugin's basename is bbpress/bbpress.php
, but bbPress thinks it's bbpress/src/bbpress.php
or bbpress/build/bbpress.php
. This causes actions hooked to bbp_activation()
and bbp_deactivation()
to not work, causing much sadness and rainy weather.
Running a production version (i.e. just a renamed copy of the build
folder) continues to work fine, because bbPress' basename variable is the same as what WordPress thinks it is.
I've attached a patch; due to load order, I had to adjust the basename where we set it, rather than using the filter, which would have been neater.
Oh, forgot to mention: also fixed a long-existing typo in the
bbp_plugin_basenname
action name.