Skip to:
Content

BuddyPress.org

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: imath's profile imath Owned by: imath's profile imath
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.

https://i.imgur.com/wKaahrT.png

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.

Change History (2)

This ticket was mentioned in PR #334 on buddypress/buddypress by @imath.


9 months ago
#1

  • Keywords has-patch added

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

#2 @imath
8 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13974:

Administration: add a function to check a BP Admin Screen is displayed

bp_is_admin() accepts an optional parameter: a string containing the BP Admin Screen ID. If provided: it checks this screen is loaded, if not it only checks a BP Admin Screen is displayed. This function will help us put together a specific community dashboard in the future.

For now it's helping us making sure the WP Plugin dependency warning is not displayed into the WP Admin > Add new plugin > BP Add-ons tab as this tab is generated by BuddyPress: so it is available & activated!

Props emaralive.

Fixes #9212
Closes https://github.com/buddypress/buddypress/pull/334

Note: See TracTickets for help on using tickets.