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

buddypress-trac noreply at wordpress.org
Wed Feb 15 10:23:12 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 imath):

 In [changeset:"13422" 13422]:
 {{{
 #!CommitTicketReference repository="" revision="13422"
 Improve `BP_Component` methods relative to setting BP Rewrites

 So far `BP_Component::add_rewrite_tags()`,
 `BP_Component::add_rewrite_rules()` & `BP_Component::add_permastructs()`
 were just firing hooks. Thanks to the BP Rewrites plugin we were able to
 test how we can use them to actually enjoy the WP Rewrite API in
 BuddyPress. Compared to what was tested in this feature as plugin, some
 improvements has been brought so that it's easier to benefit from the BP
 Rewrites API for custom components (analyzing the included PHPUnit tests
 can give BP plugin authors a preview about how to process).

 Introduce the `BP_Component::pre_query()` method to avoid superfluous Post
 queries when a BuddyPress page is displayed.

 The `src/bp-core/bp-rewrites.php` file has also been inited, this is the
 place where all Core component rewrites function will be placed.

 Props r-a-y, johnjamesjacoby, boonebgorges

 See #4954
 }}}

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


More information about the buddypress-trac mailing list