1

I'm doing this, which according to all of the documentation I've read, should override every column value in my manage users table. For some reason it's not working in WP 4.1. Any insight appreciated.

function retro_custom_users_table_content($value, $column_name, $user_id){
    $value = "hi";
    return $value;
}
add_filter('manage_users_custom_column','retro_custom_users_table_content', 10, 3);
2

The filter is only applied to custom columns that are added by you (or plugins and themes), not the default columns. If you want to modify the output of all default columns, I think you may have to add your own columns and duplicate the functionality of the defaults, then unset the defaults via manage_users_columns, since not all of them have filters to let you modify the values. When in doubt, dig into the source code and do a search for the filter to see it in context.

3
  • Sounds good. How can I change column order to move my newly created column to the beginning of the table? Feb 24 '15 at 3:05
  • see this answer. you basically have to build a new array with the order you want and return that back.
    – Milo
    Feb 24 '15 at 3:32
  • Awesome, thanks very much. I've got it all working now. Feb 24 '15 at 3:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.