How to programatically change username (user_login)?

As in the title, how to programatically change user’s login? I wanted to use wp_insert_user function, but it appears that when updating current user, it doesn’t change their username. Should I use $wpdb->update for that? If yes, how would code for changing username look like? What consequences would changing user login have, given that WordPress … Read more

How do I create a custom role capability?

I wish to create a custom capability for accessing the interface of my plugin. Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress manage adding the capability to all administrators of sub blogs and super administrators in multisite installations, or does that function need to be … Read more

Allow member to have access to custom post type only. Permission to only edit their own posts

OK I’m looking for the best way to attack this. I’m very comfortable with PHP and making custom post types with custom meta fields in WordPress. Here is what I’m looking at doing: User registers and is set at subscriber by default. User requests from admin to have permission to custom post type. Admin assigns … Read more