[buddypress-trac] [BuddyPress Trac] #4954: Migrate BP's custom URI parser to use WP's Rewrite API

buddypress-trac noreply at wordpress.org
Sun Apr 23 06:29:19 UTC 2023


#4954: Migrate BP's custom URI parser to use WP's Rewrite API
--------------------------------------+-----------------------
 Reporter:  boonebgorges              |       Owner:  imath
     Type:  enhancement               |      Status:  assigned
 Priority:  high                      |   Milestone:  12.0.0
Component:  Route Parser              |     Version:
 Severity:  major                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |
--------------------------------------+-----------------------

Comment (by prbot):

 ''This ticket was mentioned in
 [https://github.com/buddypress/buddypress/pull/91 PR #91] on
 [https://github.com/buddypress/buddypress/ buddypress/buddypress] by
 [https://profiles.wordpress.org/imath/ @imath].''
 - 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 components
 `parse_query()` method.

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

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4954#comment:88>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list