Create a clickable name in WP_List_Table for Plugin Admin

The WP_List_Table class ultimately uses the single_row_columns method to output each table cell. If we look at that method, we’ll see this part:

...
elseif ( method_exists( $this, 'column_' . $column_name ) ) {
    echo "<td $attributes>";
    echo call_user_func( array( &$this, 'column_' . $column_name ), $item );
    echo "</td>";
}
...

Add a method to your class for the column you want to add additional functionality / formatting to and name it 'column_' . $column_name, then output any additional markup you need wrapping the item content.

Leave a Comment