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

Bring back Logged-in Member WP Nav Menu #148

Closed
wants to merge 1 commit into from

Conversation

imath
Copy link
Member

@imath imath commented Aug 10, 2023

As the 'bp_parse_query' is not fired inside WP Admin context, we need to use the bp_get_component_navigations() function instead of trying to access the Members primary BP_Core_Nav.

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


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.

As the `'bp_parse_query'` is not fired inside WP Admin context, we need to use the `bp_get_component_navigations()` function instead of trying to access the Members primary `BP_Core_Nav`
Copy link
Member Author

@imath imath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to allow slug customization

'slug' => $member_navigation['main_nav']['slug'],
'link' => bp_loggedin_user_url(
array(
'single_item_component' => $member_navigation['main_nav']['slug'],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bp_rewrites_get_slug() should be used to make sure slug customization can happen.

@imath imath deleted the patch/8971 branch August 12, 2023 02:07
dcavins pushed a commit to dcavins/buddypress-wp-svn that referenced this pull request Aug 23, 2023
When BP Rewrites are on, we need to use `bp_get_component_navigations()` to get the registered logged-in member's navigation items.

Props vapvarun

Fixes #8971
Closes buddypress/buddypress#148



git-svn-id: http://buddypress.svn.wordpress.org/trunk@13547 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