Opened 2 years ago
Closed 23 months ago
#9181 closed defect (bug) (fixed)
Improve check for BP Classic Plugin
| Reported by: | samedwards | Owned by: | imath |
|---|---|---|---|
| Priority: | normal | Milestone: | 15.0.0 |
| Component: | Core | Version: | 12.5.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Right now, checks for the BP classic plugin are done with a function_exists( 'bp_classic' ) conditional, which is checking for the existence of this function as defined in the BP Classic plugin. This relies on the alphabetical ordering of the active_plugins array (and of course the sorting of bp-classic before buddypress).
I ran across a situation where I was enabling the BP Classic plugin via a plugin manifest, which did not cause the active_plugins array to be sorted, and thus I got redefined function errors when BP Classic loaded after Buddypress.
A check to is_plugin_active() has the downside of requiring the BP Classic plugin to be installed in the correctly named folder, which is also not always a given, but I would suggest that the gating conditional being changed to function_exists() || is_plugin_active() should cover more possible circumstances.
Change History (10)
This ticket was mentioned in PR #371 on buddypress/buddypress by @narenin.
2 years ago
#6
- Keywords has-patch added; needs-patch removed
Trac ticket: https://buddypress.trac.wordpress.org/ticket/9181
This ticket was mentioned in Slack in #buddypress by espellcaste. View the logs.
23 months ago
#9
@
23 months ago
- Priority low → normal
- Resolution fixed
- Status closed → reopened
- Type enhancement → defect (bug)
Unit tests are failing since this commit, we need to review the fix. See:
https://github.com/buddypress/buddypress/commit/f351427acb60fc7e62452f1448586af18bd72d20
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@imath could you look into this?