Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. add_filter('manage_users_columns', 'show_user_prof_column');
  2. add_action('manage_users_custom_column',  'show_user_prof_column_content', 10, 3);
  3. function show_user_prof_column( $columns ) {
  4.     $columns['user_prof'] = 'Тип профиля';
  5.     return $columns;
  6. }
  7. function show_user_prof_column_content($value, $column_name, $user_id) {
  8. $typeName = get_user_meta($user_id,'тут указываем свой meta-key',1);
  9.     if ( 'user_prof' == $column_name )
  10.         return $typeName;
  11.     return $value;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement