aksh is it possible to replace wp-admin with my custom directory
There is no option in the UI for that, but you can modify the URL using this code added to your extend.php
at the root of Flarum (it must be added inside the existing array).
<?php
use Flarum\Extend;
return [
// Register extenders here to customize your forum!
(new Extend\ApiSerializer(\Flarum\Api\Serializer\ForumSerializer::class))
->attribute('kilowhatWordpressProfileLink', function () {
return resolve('flarum.settings')->get('kilowhat-wordpress.wordpress_url') . '/wp-admin/profile2.php';
}),
];
The part resolve('flarum.settings')->get('kilowhat-wordpress.wordpress_url')
can also be directly hard-coded to your Wordpress domain.
The reason I'm not making this a setting is because it wouldn't solve everything, since some systems will need to dynamically change the URL depending on the user, and those will require a special bit of code anyway.
aksh it redirects to /my-profile/
This is likely something Wordpress or a wordpress plugin is doing. This URL isn't present in the source code of the Wordpress extension.
That's another reason I have not made the profile URL customizable, it's because a lot of Wordpress plugins already automatically redirect the default user settings page.
Renamed wp-admin
folders should be compatible but that's not something I have been testing in production so please let me know if you find any issue, I'll be happy to get it fixed!
There's one other place where wp-admin
is hard-coded, it's the link in the Flarum user edit modal that allows a moderator/admin to directly go to the Wordpress user edit page. Let me know if you need the custom code to edit that one.
I could add a setting to provide a custom wp-admin
path. The potential problem is that it would get exposed to any user who logged with Wordpress since it would be part of their profile edit URL.