Tag Info

New answers tagged

0

After a quick search, i got my answer here https://wordpress.org/support/topic/how-to-allow-non-admins-editors-authors-to-use-certain-wordpress-plugins By changing all occurances of 'manage_options' to 'edit_pages' in my Plugins files. Editors are allowed to use plugins with Edit_pages


0

I believe you'd need to modify user roles on each site individually (if I'm understanding your question correctly). There's a great plugin I use frequently called WPFront User Role Editor that allows you to check/uncheck user capabilities like you mentioned. The free version should be fine for what you're trying to do. I personally use the paid version just ...


0

This needs to be implemented at the widget code level for which the code in the question you start with is not a good match. The easiest way might be to decouple the widget content editing and the widget placement. You can set up a specific page in which it is possible to manage the content of the widget, and set the access level to that page to one which ...


2

With this code, you will check during the registration the users email and attach the roles you want to: <?php add_action( 'user_register', 'wp234_set_role_by_email' ); function wp234_set_role_by_email( $user_id ){ $user = get_user_by( 'id', $user_id ); $domain = substr( strrchr( $user->data->user_email, "@" ...


-1

So I finally found the solution. If installed the: "Extended Super Admins" plugin. And then I the user the Super Admin role, and used the plugin to add a custom role based on the super admin and then it is just check the boxed of the rights he DON'T need to have. It was really that simple!


1

In multisite installation there already is a default admin and super-admin role, and if standard capabilities are different than what you want you can modify them: A default set of capabilities is pre-assigned to each role, but other capabilites can be assigned or removed using the add_cap() and remove_cap() functions. New roles can be introduced or ...


0

This is pretty simple. All I did was open phpmyaddmin, I selected a database from my former website I created, searched for wp_usermeta, clicked on user_capabilities, and since admin id is 1, all I did was copy the strings (a:2:{s:13:"administrator";b:1;s:13:"bbp_keymaster";b:1;}) and pasted it in my problematic db. Clicked save, log out the log back in ...


0

I found a hacky solution involving redirecting the user: if ((basename($_SERVER['SCRIPT_NAME']) == 'edit.php')) { // your code here $author = wp_get_current_user(); if(isset($author->roles[0])){ $current_role = $author->roles[0]; }else{ $current_role = 'no_role'; } if($current_role == 'ai1ec_event_assistant' && ...



Top 50 recent answers are included