Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterIf it’s OK for you, send admin login credentials and URL to support [at-sign] role-editor.com
I will look tomorrow, what may go wrong.Vladimir
KeymasterYou should not enable this capability for shop_manager, until you do not plan to allow change “Admin menu” restrictions to shop_manager role.
Do you write about single site WordPress or multisite? Under multisite you have to use “Network Admin->Settings->User Role Editor” if URE Pro is network activated or local “Settings->User Role Editor” for the single site.
Double check if URE was not activated for single site before you activated it for the whole network. Because it can use other copy of options in such case.Vladimir
KeymasterHi,
Login as an administrator, go to Users->User Role Editor and look if your role has ‘ure_admin_menu_access’ capability granted at the ‘Custom capabilities->User Role Editor’ group.
Vladimir
KeymasterOK. Thanks for sharing.
Vladimir
KeymasterThanks for the feedback about successful testing.
Vladimir
KeymasterJust replace roles in the $roles array with your own roles ID:
add_filter('woocommerce_settings_tabs_array', 'change_wc_settings_tabs', 30); function change_wc_settings_tabs( $pages ) { $roles = array( 'role1', 'role2', 'role3' ); $user = wp_get_current_user(); foreach( $roles as $role ) { if ( in_array( $role, $user->roles ) ) { //unset( $pages['general']); // General //unset( $pages['products']); // Products //unset( $pages['tax']); // Tax unset( $pages['checkout']); // Payments //unset( $pages['account']); // Accounts & Privacy //unset( $pages['email']); // Emails //unset( $pages['advanced']); // Advanced } } return $pages; }Vladimir
KeymasterHi,
WordPress 5.4.1 does not contain such phrase “Type your password”. I suppose it may belong
to the active theme or some plugin. Any way I don’t have a solution which may help you with your goal.Look at the ready to use plugins at https://wordpress.org/plugins
Search for “custom registration form” return at least 2 plugins which offers such functionality.Vladimir
KeymasterThanks you for the additional information.
I see at the screenshot the bbPress roles in the list of the blocked roles. Users may have more then a single role granted at the same time. Take into account that when some roles are blocked for the role A, user with role A sees at the “Users” list only users who have allowed (not blocked) role(s). Thus, if new created user has the secondary bbPress role ‘participant’ assigned, user with role A will not see such user, as one of his roles is blocked for him.
Vladimir
KeymasterHi,
The “Events->Registrations” admin menu item is protected by ‘edit_posts’ user capability. You have to grant it to the role, in order allow user with that role to see this menu item.
Admin menu in URE shows only menu items which are available/visible for a role.
Vladimir
KeymasterFollowing to your description, user with Role A should see all users with role B or C. It’s by design. Show screenshots of role A, and “Other Roles” opened for role A. You need host screenshots somewhere else and insert here the links only or send images to my support email.
Vladimir
KeymasterHi,
Some plugins check user permissions not via user capability as they should by WordPress design, but check directly the role ID, like in this case with “User Login History”. You can see this yourself using “Admin menu” button for the ‘Administrator’ role:

Looking into the ULH plugin source code for the ‘admistrator’ keyword just confirms this:

You can replace ‘administrator’ in the source code with user capability, like ‘manage_options’ or your own. This is the only workaround until plugin developer will not agree to change direct usage of ‘administrator’ to user capability of his selection.
Vladimir
KeymasterTest beta 1 of version 4.56.1. It’s available for from the Download page after login.
Vladimir
KeymasterHi,
Comment lines with tabs to leave, and uncomment lines with tabs you wish to hide/remove.
add_filter('woocommerce_settings_tabs_array', 'change_wc_settings_tabs', 30); function change_wc_settings_tabs( $pages ) { $user = wp_get_current_user(); if ( in_array( 'orders_manager', $user->roles ) ) { //unset( $pages['general']); // General //unset( $pages['products']); // Products //unset( $pages['tax']); // Tax unset( $pages['checkout']); // Payments //unset( $pages['account']); // Accounts & Privacy //unset( $pages['email']); // Emails //unset( $pages['advanced']); // Advanced } return $pages; }Vladimir
KeymasterI found the reason why unfiltered_html works fine from the classic editor, but does not from the Gutenberg. Fortunately, it belongs not to the Gutenberg, but to URE Pro itself. It applied ‘unfiltered_html’ for WordPress admin only using is_admin() function. But Gutenberg saves changes via WP Rest API using AJAX. Admin screen is not defined in this case.
I will include the fix into the next update.
Quick fix: open user-role-editor-pro/pro/includes/classes/user-role-editor-pro.php, go to the line #263 (located inside function allow_unfiltered_html()) and replace this code:if ( !$multisite || !is_admin() ||with
if ( !$multisite ||to get finally
if ( !$multisite || ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) ) { return; }Vladimir
KeymasterI made my own test and confirm – Gutenberg ignores unfiltered_html even with special option activated, while classic editor does not. I will investigate if I it’s possible to fix this via some WordPress hook.
-
AuthorPosts