I’m trying to add a column to plugin table screen using “manage_plugins_custom_column”, but without success.
This extra column will show a custom value that was placed inside the plugin file.
I hope someone could help!
Thanks!
Daniel
—————- edit —————-
This is the working code that creates the column “Version”:
function add_plugins_column( $columns ) {
$columns = array(
"name" => __( 'Plugin', '' ),
"version" => __( 'Version', '' ),
"description" => __( 'Description', '' ),
);
return $columns;
} add_filter( 'manage_plugins_columns', 'add_plugins_column' );
function render_plugins_column( $column, $plugin_file, $plugin_data ) {
switch ($column) {
case "version": echo $plugin_data['Version']; break;
}
} add_action( 'manage_plugins_custom_column' , 'render_plugins_column', 10, 3 );
First, you have to add the custom column to the plugin column names:
Then output your column data for your plugin: