How can i change the name order in the admin?

You can’t alter the default Name column, but what you can do is hide it and create your own custom column. First, we add the action and filter on admin_init that will add and manage our new column: function wpa66544_user_custom_column_init(){ add_filter( ‘manage_users_columns’, ‘wpa66544_user_add_column’ ); add_action( ‘manage_users_custom_column’, ‘wpa66544_user_manage_column’, 100, 3 ); } add_action( ‘admin_init’, ‘wpa66544_user_custom_column_init’ ); … Read more

How do I display user name, role and site name using HTML tags inside a dashboard notification?

You can use the bloginfo( ‘name’ ) function to display the site name. Information about the current logged in user can be retrieved using the get_currentuserinfo() function. Here is the fixed code: function my_network_notice(){ global $pagenow, $currentuser; get_currentuserinfo(); if ( $pagenow == ‘index.php’) : ?> <div id=”secondaryBox”> <div id=”author”> <img src=”https://wordpress.stackexchange.com/questions/77448/<?php echo get_stylesheet_directory_uri(); ?>/img/btn-articles-admin.png” width=”40px” … Read more

Is it possible to incorporate username in a login redirect?

$user->data should have what you want. // snip elseif ( in_array( ‘map_user’, $user->roles ) ) return home_url( “/mapping/{$user->data->user_login}/” ); // end snip Add if (!is_wp_error($user)) wp_die(var_dump($user)); to the top of your function to see what you have to work with. Caution: This will break things. (It throws a notice as well) It is for debugging … Read more

Use mulitple usernames?

WordPress does not allow this “configuration”. And I seriously doubt you would have any luck writing a plugin that would take care of this in a complete way. The WPDB class is heavily utilized throughout the site, and sifting through read-only vs write-enabled uses would be daunting.

Display first name of logged in user?

The issue here is that both the functions have the same name – colaborator_avatar(). Make sure that $new_user contains the current user. Else use get_current_user_id() like this: get_user_meta( get_current_user_id(), ‘first_name’, true ); Show avatar and first name: // show user avatar if logged in function colaborator_avatar($atts) { if (is_user_logged_in() && !is_feed()) { return get_avatar(get_the_author_meta( ‘user_email’ … Read more

How to allow wordpress to create username with symbols like +

We need to add a filter to ‘sanitize_user’. Here is the sample code that will work for you. add_filter( ‘sanitize_user’, ‘tubs_sanitize_user’, 10, 3); function tubs_sanitize_user($username, $raw_username, $strict) { $new_username = strip_tags($raw_username); // Kill octets $new_username = preg_replace(‘|%([a-fA-F0-9][a-fA-F0-9])|’, ”, $new_username); $new_username = preg_replace(‘/&.?;/’, ”, $new_username); // Kill entities // If strict, reduce to ASCII for max … Read more

use of nickname and nicename?

nickname field is one of the options made available for choice in “Display name publicly as” option in user profile. It has no other use in core code, as far as I know.

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