View Categories

wpda_column_default

Filter wpda_column_default was added to influence the layout of list table columns. The filter works for all columns except the fist one. The first column holds the links to other actions.

function my_column_default(
	$value,
	$item,
	$column_name,
	$table_name,
	$schema_name,
	$wpda_list_columns,
	$list_number,
	$self
) {
	if ( '' !== $value ) {
		return $value;
	}

	if ( 'dutch' === $column_name ) {
		return 'NL-' . $item[ $column_name ];
	}
}
add_filter( 'wpda_column_default' , 'my_column_default' , 10 , 8 );
You can use this filter in combination with action hook wpda_after_list_table to add interactive elements to your list tables.

Parameters #

$value

Current column value

$item

Associative array containing the column name of all columns in the list table and their value

$column_name

Column name

$table_name

Database table name

$schema_name

Database (schema) name

$wpda_list_columns

Reference to column list (instance of class WPDA_List_Columns)

$list_number

Row number in the current list

$self

Calling WPDA_List_table object