Adding columns to the plugins list table
-
Hi David,
I manage several plugins on my website, and I find it useful to have more information in the plugins table.
Right now I added:
– Version of last uploaded ZIP
– Tested up to version of last uploaded ZIP.I added some filters to the relevant methods in
UpdraftManager_List_Table, it would be great if they can be added to the plugin.--- a/classes/updraftmanager-list-table.php
+++ b/classes/updraftmanager-list-table.php
@@ -18,7 +18,7 @@ class UpdraftManager_List_Table extends WP_List_Table {
'downloads' => __('Downloads', 'simba-plugin-updates-manager'),
'description' => __('Description', 'simba-plugin-updates-manager')
);
- return $columns;
+ return apply_filters('updraftmanager_list_columns', $columns);
}
public function prepare_items() {
@@ -50,7 +50,7 @@ class UpdraftManager_List_Table extends WP_List_Table {
'downloads' => array('downloads', false),
'description' => array('description',false),
);
- return $sortable_columns;
+ return apply_filters('updraftmanager_list_sortable_olumns', $sortable_columns);
}
public function column_default( $item, $column_name ) {
@@ -75,7 +75,7 @@ class UpdraftManager_List_Table extends WP_List_Table {
}
return $total;
default:
- return print_r( $item, true ) ; //Show the whole array for troubleshooting purposes
+ return apply_filters('updraftmanager_list_column_default', print_r( $item, true ), $column_name, $item); //Show the whole array for troubleshooting purposes
}
}
Marc
PS: I don’t think you have a Github repo for this plugin?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Adding columns to the plugins list table’ is closed to new replies.