Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?

In WordPress is pretty simple create custom roles and also assign specific capabilities to specific user roles (no matter if from core or custom). In my plugins I often create an user role that has all the capabilities required by my plugin, and then I attach some of thos capabilities to existing roles. I’ll give … Read more

Admin: Get all user for Custom Role

I find the solution, that’s a WordPress 4 year’s bug. Here is the Summary from DrewAPicture changed from manually created user roles not showing in author dropdown irregardless of assigned capabilities to Manually created user roles not showing in author dropdown regardless of assigned capabilities Please see ticket 16841 for more details. The only simple … Read more

Custom capability for a single user

I solved it myself 🙂 I just added custom capability to the user- $user = new WP_User(1); //1 is the admin ID $user->add_cap( ‘see_encrypted_pass’ ); Then checked- if(current_user_can(‘see_encrypted_pass’)){ //encrypted password } It works!!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)