- This topic has 1 reply, 2 voices, and was last updated 4 years, 3 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Hi. Its been 4 years, but I’m continuing this thread: https://wpfront.com/support/topic/remove-or-hide-secondary-roles-from-the-edit-user-page/
You said it would be included in an update. I assume that’s this one: https://wpfront.com/user-role-editor-pro/actions-and-filters/
When I apply that code:
<?php
add_filter( 'wpfront_ure_add_user_profile_secondary_roles', function ( $roles ) {
return [];
});
add_filter( 'wpfront_ure_edit_user_profile_secondary_roles', function ( $roles ) {
return [];
});
What happens is this:
My request was to completely hide this talk of a secondary role, because the site doesn’t use them. Is there another way we can achieve this?
I tried to undo add_action('user_new_form', array($this, 'user_new_form'), 10, 1);
but I think because the plugin doesn’t instantiate to a variable I can’t modify the object later.
Adding a class to the HTML (<table class="form-table wpfront-something-unique">
) would be fine. Or if there’s no roles just not showing the output.
Thanks. Looking forward to your reply.
Hi Randolph,
Sorry that it didn’t make into 2.x version. What you are asking is available in version 3.0. Even though it says ‘beta’, its production ready, I’m waiting to add a few more features and documentation before releasing it to everyone.
Would you be open to using that version?
Thanks
Syam