-
Notifications
You must be signed in to change notification settings - Fork 169
BP Rewrites merge process, step 18 #91
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace `bp_core_get_key_actions_hook()` by `bp_core_get_query_parser()` to make this function more usable. Use this new function to decide whether we should use the `bp_parse_query` hook. Fix some unit tests. Reset the `BP_Core_Nav` inside the `BP_Members_Component::parse_query()` method when the displayed user is set.
Make it depends on the query parser in use
dcavins
pushed a commit
to dcavins/buddypress-wp-svn
that referenced
this pull request
Jul 28, 2023
- Introduces `bp_core_setup_query_parser()` to decide when to postpone some key hooks firing to `bp_parse_query`. - Introduces `bp_core_get_query_parser()` to get the query parser in use. It contains a filter BP Classic will be able to use to force the Legacy URL parser. So far it uses legacy for pretty links and rewrites for plain links. - Edit `bp_redirect_canonical()` & `bp_get_canonical_url()` so that they use the BP Rewrites API. - Introduces `bp_core_set_ajax_uri_globals()` to set the BuddyPress URI globales using the BP Rewrites API inside the Ajax context thanks to the updated `bp_reset_query()` function. - To avoid using `WP()` at each Ajax call, introduces a simple Ajax actions registration process thanks to the new `bp_ajax_register_action()`. - Update Legacy & Nouveau template packs so that they use this logic. As BP Default will require the legacy URL parser and will be moved inside BP Classic, the theme can stay the way it is. - Improve the `bp_rewrites_pre_get_slug` filter logic making it depends on the `bp_core_get_query_parser()` function. - Make sure to reset the Members navigation to a new `BP_Core_Nav` based on the displayed user once the user is available in the component's `parse_query()` method. Props r-a-y, johnjamesjacoby, boonebgorges Closes buddypress/buddypress#91 See #4954 git-svn-id: http://buddypress.svn.wordpress.org/trunk@13461 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
emaralive
pushed a commit
to emaralive/omt-buddypress-sync
that referenced
this pull request
Nov 2, 2025
- Introduces `bp_core_setup_query_parser()` to decide when to postpone some key hooks firing to `bp_parse_query`. - Introduces `bp_core_get_query_parser()` to get the query parser in use. It contains a filter BP Classic will be able to use to force the Legacy URL parser. So far it uses legacy for pretty links and rewrites for plain links. - Edit `bp_redirect_canonical()` & `bp_get_canonical_url()` so that they use the BP Rewrites API. - Introduces `bp_core_set_ajax_uri_globals()` to set the BuddyPress URI globales using the BP Rewrites API inside the Ajax context thanks to the updated `bp_reset_query()` function. - To avoid using `WP()` at each Ajax call, introduces a simple Ajax actions registration process thanks to the new `bp_ajax_register_action()`. - Update Legacy & Nouveau template packs so that they use this logic. As BP Default will require the legacy URL parser and will be moved inside BP Classic, the theme can stay the way it is. - Improve the `bp_rewrites_pre_get_slug` filter logic making it depends on the `bp_core_get_query_parser()` function. - Make sure to reset the Members navigation to a new `BP_Core_Nav` based on the displayed user once the user is available in the component's `parse_query()` method. Props r-a-y, johnjamesjacoby, boonebgorges Closes buddypress/buddypress#91 See #4954 git-svn-id: https://buddypress.svn.wordpress.org/trunk@13461 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
emaralive
pushed a commit
to emaralive/buddypress-sync
that referenced
this pull request
Nov 3, 2025
- Introduces `bp_core_setup_query_parser()` to decide when to postpone some key hooks firing to `bp_parse_query`. - Introduces `bp_core_get_query_parser()` to get the query parser in use. It contains a filter BP Classic will be able to use to force the Legacy URL parser. So far it uses legacy for pretty links and rewrites for plain links. - Edit `bp_redirect_canonical()` & `bp_get_canonical_url()` so that they use the BP Rewrites API. - Introduces `bp_core_set_ajax_uri_globals()` to set the BuddyPress URI globales using the BP Rewrites API inside the Ajax context thanks to the updated `bp_reset_query()` function. - To avoid using `WP()` at each Ajax call, introduces a simple Ajax actions registration process thanks to the new `bp_ajax_register_action()`. - Update Legacy & Nouveau template packs so that they use this logic. As BP Default will require the legacy URL parser and will be moved inside BP Classic, the theme can stay the way it is. - Improve the `bp_rewrites_pre_get_slug` filter logic making it depends on the `bp_core_get_query_parser()` function. - Make sure to reset the Members navigation to a new `BP_Core_Nav` based on the displayed user once the user is available in the component's `parse_query()` method. Props r-a-y, johnjamesjacoby, boonebgorges Closes buddypress/buddypress#91 See #4954 git-svn-id: https://buddypress.svn.wordpress.org/trunk@13461 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bp_core_setup_query_parser()to decide when to postpone some key hooks firing tobp_parse_query.bp_core_get_query_parser()to get the query parser in use. It contains a filter BP Classic will be able to use to force the Legacy URL parser. So far it useslegacyfor pretty links andrewritesfor plain links.bp_redirect_canonical()&bp_get_canonical_url()so that they use the BP Rewrites API.bp_core_set_ajax_uri_globals()to set the BuddyPress URI globales using the BP Rewrites API inside the Ajax context thanks to the updatedbp_reset_query()function.WP()at each Ajax call, introduces a simple Ajax actions registration process thanks to the newbp_ajax_register_action().bp_rewrites_pre_get_slugfilter logic making it depends on thebp_core_get_query_parser()function.parse_query()method.Trac ticket: https://buddypress.trac.wordpress.org/ticket/4954
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.