[buddypress-trac] [BuddyPress Trac] #4787: Defining BP_XPROFILE_SLUG throws page not found
buddypress-trac
noreply at wordpress.org
Wed Jan 8 00:54:57 UTC 2020
#4787: Defining BP_XPROFILE_SLUG throws page not found
--------------------------+----------------------
Reporter: rogercoathup | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Core | Version: 1.7
Severity: normal | Resolution: wontfix
Keywords: |
--------------------------+----------------------
Comment (by raruto):
I think I have found a solution (BP 5.1.2).
**bp-custom.php**
{{{#!php
<?php
define( 'BP_DEFAULT_COMPONENT', 'custom-name' );
define( 'BP_XPROFILE_SLUG', 'custom-name' );
}}}
**[https://buddypress.trac.wordpress.org/browser/branches/5.0/src/bp-
members/classes/class-bp-members-component.php#L243 /src/bp-
members/classes/class-bp-members-component.php#L243]**
{{{#!php
<?php
...
if ( 'profile' === $default_component ) {
$default_component = 'xprofile';
}
// Check if BP_DEFAULT_COMPONENT == BP_XPROFILE_SLUG
else if( defined( 'BP_XPROFILE_SLUG' ) && BP_XPROFILE_SLUG ===
$default_component ) {
$default_component = 'xprofile';
}
...
}}}
I got inspired by this patch:
https://buddypress.trac.wordpress.org/attachment/ticket/6962/6962.01.patch
Sorry if I haven't created a patch, but I haven't had time to go into svn
yet...
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4787#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list