-
-
Save wp-user-manager/52125541ee96507d979f5fd1643fb208 to your computer and use it in GitHub Desktop.
<?php | |
function my_wpum_rearrange_account_tabs( $tabs ) { | |
// Find the correct slug used in the URL, alter the priority | |
$tabs['email-subscriptions'] ['priority'] = 5; | |
return $tabs; | |
} | |
add_filter( 'wpum_get_account_page_tabs', 'my_wpum_rearrange_account_tabs', 100 ); |
Hi there! I have made a start on this but I am wondering what the correct slug is for:
- View Profile Tab
- Logout Tab
Both of these are handled as redirects and so I am not entirely sure what is needed to make those work nicely.
Here is what I have so far:
' <?php
function my_wpum_rearrange_account_tabs( $tabs ) {
// Find the correct slug used in the URL, alter the priority
$tabs['settings'] ['priority'] = 1;
$tabs['profile'] ['priority'] = 2;
$tabs['orders'] ['priority'] = 3;
$tabs['downloads'] ['priority'] = 4;
$tabs['billing-address'] ['priority'] = 5;
$tabs['shipping-address'] ['priority'] = 6;
$tabs['password'] ['priority'] = 7;
$tabs['two_factor'] ['priority'] = 8;
$tabs['email-subscriptions'] ['priority'] = 9;
$tabs['personal-data'] ['priority'] = 10;
$tabs['delete-account'] ['priority'] = 11;
$tabs['logout'] ['priority'] = 12;
return $tabs;
}
add_filter( 'wpum_get_account_page_tabs', 'my_wpum_rearrange_account_tabs', 100 ); '
I feel that this is maybe close, but I am feeling that it may need a couple of tweaks before I upload it. Please could you let me know what adjustments are needed here? Thank you!
Kind regards,
Adam
View Profile = 'view'
Logout = 'logout'
Here's the code in the plugin incase you need it https://github.com/WPUserManager/wp-user-manager/blob/27a34934ad45c547a4d0f582be657522b2abf008/includes/functions.php#L687
Thank you for confirming those slugs and for linking the plugin code. I made the adjustments and uploaded the php file and it has worked perfectly. Thank you for your help with this! 👍
Save this file to your /wp-content/mu-plugins/ directory (you might need to create the mu-plugins directory).