Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the Group Extension Rewrites support #136

Closed
wants to merge 1 commit into from

Conversation

imath
Copy link
Member

@imath imath commented Jul 23, 2023

Improve how the group tab display is performed to take in account Plugins using a function to set its visibility.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8943


This Pull Request is for code review only. Please keep all other discussion in the BuddyPress Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the WordPress Core Handbook for more details.

@imath imath self-assigned this Jul 23, 2023
@imath imath deleted the patch/8943 branch July 24, 2023 10:33
dcavins pushed a commit to dcavins/buddypress-wp-svn that referenced this pull request Jul 28, 2023
The `BP_Group_Extension::init()` $args parameter (array) now accepts a new argument: `$show_tab_callback`. You can use this argument to inform about the callback function to use to check whether the Extension group's tab should be displayed or not. This callback function is called inside  the `BP_Group_Extension::setup_access_settings()` to make sure to set the `$show_tab` argument once the current group has been defined by BuddyPress.

Third party plugin authors are strongly encouraged to use this new argument if they used to define the `$show_tab` argument according to the result of a function. Doing so in BuddyPress 12.0.0 won't make your extension behave as expected.

Fixes #8943
Closes buddypress/buddypress#136



git-svn-id: http://buddypress.svn.wordpress.org/trunk@13524 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant