Displaying which Role the current user is assigned to

As you suggested, here’s how you can display the roles next to the username in the admin bar: function wpse_203917_admin_bar_menu( $wp_admin_bar ) { if ( ! $node = $wp_admin_bar->get_node( ‘my-account’ ) ) return; $roles = wp_get_current_user()->roles; $node->title .= sprintf( ‘ (%s)’, implode( ‘, ‘, $roles ) ); $wp_admin_bar->add_node( $node ); } add_action( ‘admin_bar_menu’, ‘wpse_203917_admin_bar_menu’ );

How to get the password and username of the add new user form (admin back end) in wordpress

You’ll need three hooks: 1: user_register This is for when the user is created via the admin back-end. The username will be available via $_POST[‘user_login’] and the password will be available via $_POST[‘pass1’]. 2: edit_user_profile_update This is for when the password is updated on the profile page by the user or admin. The username will … Read more

Load Balanced WP with single server admin access

I work on a Load balanced instance of WordPress where all uploaded content is stored on a separate server and each WordPress server’s upload or blogs.dir folder is linked to that content server (a shared disk). Out of the box I do not believe there is way to force WordPress to use a single server. … Read more

How can I set up multi language admin ui?

There are a couple of methods that this can be done without the overhead of plugins. Method 1 The first method involves hooking to the load_textdomain_mofile filter. (This must go into a separate plugin) function wpse31785_change_mofile( $mofile, $domain ) { if ( $domain == ‘default’ and get_current_user() == ‘riccardo’ ) return substr($mofile, 0, -8).’it_IT.mo’; return … Read more

Removing admin bar from wordpress dashboard

if (!function_exists(‘disableAdminBar’)) { function disableAdminBar(){ remove_action( ‘admin_footer’, ‘wp_admin_bar_render’, 1000 ); function remove_admin_bar_style_backend() { echo ‘<style>body.admin-bar #wpcontent, body.admin-bar #adminmenu { padding-top: 0px !important; }</style>’; } add_filter(‘admin_head’,’remove_admin_bar_style_backend’); } } add_filter(‘admin_head’,’remove_admin_bar_style_backend’); Source: http://wp.tutsplus.com/tutorials/how-to-disable-the-admin-bar-in-wordpress-3-3/ OR, for both front and back end… if (!function_exists(‘disableAdminBar’)) { function disableAdminBar(){ remove_action( ‘admin_footer’, ‘wp_admin_bar_render’, 1000 ); // for the admin page remove_action( ‘wp_footer’, ‘wp_admin_bar_render’, … Read more