apply_filters( 'manage_users_custom_column', string $output, string $column_name, int $user_id )

Filters the display output of custom columns in the Users list table.


Parameters

$output string
Custom column output. Default empty.
$column_name string
Column name.
$user_id int
ID of the currently-listed user.

Top ↑

Source

File: wp-admin/includes/class-wp-users-list-table.php. View all references

$r .= apply_filters( 'manage_users_custom_column', '', $column_name, $user_object->ID );


Top ↑

Changelog

Changelog
Version Description
2.8.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    //Adds Custom Column To Users List Table
    function custom_add_user_id_column($columns) {
        $columns['user_id'] = 'User ID';
        return $columns;
    }
    add_filter('manage_users_columns', 'custom_add_user_id_column');
    //Adds Content To The Custom Added Column
    function custom_show_user_id_column_content($value, $column_name, $user_id) {
        $user = get_userdata( $user_id );
    	if ( 'user_id' == $column_name )
    		return $user_id;
        return $value;
    }
    add_filter('manage_users_custom_column',  'custom_show_user_id_column_content', 10, 3);

You must log in before being able to contribute a note or feedback.