[buddypress-trac] [BuddyPress Trac] #9235: Compatibility with language subdirectories
buddypress-trac
noreply at wordpress.org
Thu Sep 19 12:51:59 UTC 2024
#9235: Compatibility with language subdirectories
-------------------------+-----------------------------
Reporter: liongrass | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Members | Version: 12.0.0
Severity: normal | Keywords:
-------------------------+-----------------------------
Hi,
since the introduction of the new Rewrite API, i haven't found a good way
to make BP Profiles compatible with language subdirectories (e.g
"mydomain.com/en/john-doe").
With the legacy parser, it was possible to hook in at certain points and
make the whole thing work, but now there doesn't seem to be a way to do
this anymore. From what i understand right now, a filter in
BP_Members_Component->parse_query() would be required, just before
"bp_rewrites_get_member_data()" gets called:
== Before:
{{{#!php
<?php
// Init the current member and member type.
$member = false;
$member_type = false;
$member_data = bp_rewrites_get_member_data();
}}}
== After:
{{{#!php
<?php
$request = apply_filters('bp_members_parse_query_request',
$GLOBALS['wp']->request);
// Init the current member and member type.
$member = false;
$member_type = false;
$member_data = bp_rewrites_get_member_data($request);
}}}
This would allow for the requested URI to be filtered, right before it
get's passed to "bp_rewrites_get_member_data" and manipulate it such that
this function knows where to look for the username in the string.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9235>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list