How to create Custom filter options in wp_list_table?

Code class Kv_subscribers_list extends WP_List_Table { function __construct(){ global $status, $page; parent::__construct( array( ‘singular’ => ‘notification’, ‘plural’ => ‘notifications’, ‘ajax’ => false ) ); } protected function get_views() { $status_links = array( “all” => __(“<a href=”#”>All</a>”,’my-plugin-slug’), “published” => __(“<a href=”#”>Published</a>”,’my-plugin-slug’), “trashed” => __(“<a href=”#”>Trashed</a>”,’my-plugin-slug’) ); return $status_links; } function column_default($item, $column_name){ switch($column_name){ case ’email’: case … Read more

Change order of custom columns for edit panels

You are basically asking a PHP question, but I’ll answer it because it’s in the context of WordPress. You need to rebuild the columns array, inserting your column before the column you want it to be left of: add_filter(‘manage_posts_columns’, ‘thumbnail_column’); function thumbnail_column($columns) { $new = array(); foreach($columns as $key => $title) { if ($key==’author’) // … Read more