Opened 9 months ago
Closed 8 months ago
#9212 closed defect (bug) (fixed)
Introduce a function to check a BuddyPress Admin screen is displayed
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 15.0.0 | Priority: | normal |
Severity: | normal | Version: | 10.0.0 |
Component: | Administration | Keywords: | has-patch |
Cc: |
Description
@emaralive shared his concern into our Slack's channel about the fact, the BP Add-ons tab into the WP Admin Plugins/Add screen is displaying a Plugin Dependency warning about the fact these add-ons require BuddyPress.
As BuddyPress is generating this screen, I understand his concern and I believe like him the warning shouldn't be displayed.
To remove this warning I chose to edit the WP.org Plugin API result to remove the buddypress
dependency & do it only when the the BP Add-ons tab into the WP Admin Plugins/Add screen is displayed.
I suggest to introduce a new function bp_is_admin( $screen_id )
to ease checking whether a BP Admin Screen is displayed. I believe this function could also be used to create a dedicated Community Dashboard in the future.
This PR removes the Dependency warning for the BP Add-ons Admin screen and adds the function
bp_is_admin()
to check whether a BP Admin screen is displayed or not.Trac ticket: https://buddypress.trac.wordpress.org/ticket/9212