Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterIf it’s a paid plugin “Product Add-ons” from WooCommerce, can you share its copy with me via Google drive or DropBox? I use such software for investigation purpose only and at my local development environment.
Vladimir
KeymasterOK. Can you tell me what plugin adds ‘Addons’ tab to the product attributes meta box? I need reproduce it myself to see what id it uses.
Vladimir
KeymasterWooCommerce product editor page does not have ‘Addons’ tab by default.
Try to look at the ‘Addons’ link HTML source. What class does it use? Try to use tab ID from the begin of class name, similar to the links above. I suppose it may be simple ‘addons’.Vladimir
KeymasterThere is no need to edit woocommerce source code. Use a [user_role_editor] shortcode is not a good idea. It works for the post/page content output only.
Try to use this solution a starting point.
Vladimir
KeymasterDid you turn ON 1st the “Privacy related” checkbox at “Use additional capabilities section” at “Settings->User Role Editor->Additional Modules” tab?
Vladimir
KeymasterHi,
Admin menu item “Settings->Privacy” and selected “Privacy” page editing are protected by ‘manage_privacy_options’ user capability.
‘manage_privacy_options’ capability is mapped by default to ‘manage_options’ capability.So after ‘edit_pages’, ‘edit_published_pages’, ‘edit_others_pages’ WordPress checks ‘manage_privacy_options’ (‘manage_options’ by default) capability for privacy page too:
/* * Setting the privacy policy page requires <code>manage_privacy_options</code>, * so editing it should require that too. */ if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) { $caps = array_merge( $caps, map_meta_cap( 'manage_privacy_options', $user_id ) ); }URE Pro has a related option at the “Settings->User Role Editor->Additional Modules” tab – ” Privacy related (manage_privacy_options, export_others_personal_data, erase_others_personal_data)”. It’s located under “Use additional capabilities section” at the bottom of the form.
With this option activated URE maps ‘manage_privacy_options’, ‘export_others_personal_data’, ‘erase_others_personal_data’ capabilities to the ‘manage_privacy_options’, ‘export_others_personal_data’, ‘erase_others_personal_data’ correspondingly instead of default ‘manage_options’.But due to some glitch discovered during recent test user with ‘manage_privacy_options’ capability still does not have access to the ‘Settings->Privacy’ menu item. It needs investigation and fix.
If you does not plan to give access to this menu item for your editor, that’s it. Just select ‘Editor’ role at “Users->User Role Editor” and grant to it
‘manage_privacy_options’ capability. It should be enough in order to allow to editor role to edit your pre-selected privacy page.Vladimir
KeymasterHi,
I did not find any special changes for bbPress permissions/capabilities inside WOffice theme. It seems something is changing during BuddyPress/bbPress integration. Is it possible to get admin access to your site?
If Yes, I would make a copy of files and data to setup a copy at my development environment and look what is going with bbPress permissions using your exact site settings/configuration. If that’s applicable, send URL and login credentials to support [at-sign] role-editor.comVladimir
KeymasterHi,
I tested with WP Bakery Page Builder (former Visual Composer) and shortcode works for me. Do not forget that it works for for the text/content parts only.
Re-check if you input shortcode in the text mode (not visual). Try to place shortcode parts at the new lines, like here:[user_role_editor roles="editor"] Test Post 300 - for editors only [/user_role_editor]Builder may replace parts of shortcode in other cases.
Vladimir
KeymasterHi Sheila,
Hiding admin bar should not prevent access to the wp-admin. I suppose that you have some plugin which has option like ‘prevent access to wp-admin’ in its settings. Try to deactivate all plugins. Will user with such custom role get access to wp-admin? If ‘Yes’, then activate plugins back one by one with new test in order to isolate one which causes a problem.
Vladimir
KeymasterThanks for letting me know that you found an answer.
Vladimir
KeymasterHi Barry,
Thanks for the feedback.
URE does not include UI to turn ON for a role selected screen option (or in other words, show meta box). You can use this code though:
/** * Turn ON 'Slug' screen option for user with 'author' role at the Media Library item (attachment) edit page */ add_filter( 'hidden_meta_boxes', 'show_slug_metabox', 10, 3 ); function show_slug_metabox( $hidden, $screen, $use_defaults ) { if ( $screen->id!=='attachment') { return $hidden; } $user = wp_get_current_user(); if ( empty( $user) || empty( $user->roles ) ) { return $hidden; } if ( !in_array( 'author', $user->roles ) ) { return $hidden; } $slug_key = array_search( 'slugdiv', $hidden ); if ( $slug_key !== false ) { unset( $hidden[ $slug_key ] ); } return $hidden; }Change ‘author’ to your own role ID and setup this code as a Must Use plugin.
Vladimir
Keymaster“User Registration” plugin shows extra fields at back-end user profile only to a user with ‘manage_options’ capability:
public function show_user_extra_fields( $user ) { if ( ! current_user_can( 'manage_options' ) ) { return; } $show_fields = $this->get_user_meta_by_form_fields( $user->ID ); ...Vladimir
KeymasterHi,
WordPress by default uses the same ‘edit_pages’ capability for both “edit” and “add new” buttons. In order to change this go to “Settings->User Role Editor->Additional Modules” tab and turn on the “Activate “Create” capability for posts/pages/custom post types” option. URE will reconfigure WordPress to use ‘create_pages’ for ‘add new’ button as a result.
Take into account that URE automatically grants ‘create_posts’ and ‘create_pages’ capabilities to the ‘administrator’ role only. You may need to re-check your roles (contributor, author, editor and others) to ensure users don’t lose ‘add new’ functionality where they should have it.
Vladimir
KeymasterHi,
May be this code will give a starting point:
if (is_multisite()) { add_action( 'wpmu_activate_user', 'add_secondary_role', 10, 1 ); } else { add_action( 'user_register', 'add_secondary_role', 10, 1 ); } function add_secondary_role( $user_id ) { $user = get_user_by('id', $user_id); $user->add_role('custom_role_id'); }I will be out of office until July 31st.
Vladimir
KeymasterGot it. Thanks.
I will proceed with subject investigation from July 31st, when return from a small journey. -
AuthorPosts