Skip to content

Instantly share code, notes, and snippets.

@donaldallen
Created August 2, 2013 14:21
Show Gist options
  • Save donaldallen/6140230 to your computer and use it in GitHub Desktop.
Save donaldallen/6140230 to your computer and use it in GitHub Desktop.
Admin Table library for WP-MVC
<?php
require_once dirname(__FILE__).'/app/libraries/admin_table.php';
$wp_events_registrants_table = new Admin_Table($args = wp_parse_args($args, array(
'plural' => 'wp_list_events',
'singular' => 'wp_list_event',
'ajax' => false,
)));
$wp_events_registrants_table->prepare_items(
$table = 'atb_events',
$perpage = 100,
$columns = array(
'col_checkbox'=>__(''),
'col_title'=>__('Title'),
'col_start_date'=>__('Start Date'),
'col_status'=>__('Status'),
'col_actions'=>__('Actions'),
),
$sortable = array(
'col_start_date'=>array('start_date'),
'col_status'=>array('status'),
)
);
$wp_events_registrants_table->display();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment