예제 #1
0
 public function getTable()
 {
     require_once dirname(dirname(__FILE__)) . DS . 'tables' . DS . 'pipes.php';
     $itemsListTable = new Lo_Items_List_Table();
     //Fetch, prepare, sort, and filter our data...
     $itemsListTable->prepare_items();
     return $itemsListTable;
 }
예제 #2
0
파일: pipes.php 프로젝트: kosir/wp-pipes
 public function getTable()
 {
     require_once dirname(dirname(__FILE__)) . DS . 'tables' . DS . 'pipes.php';
     $itemsListTable = new Lo_Items_List_Table();
     $user = get_current_user_id();
     $current_per_page = get_user_meta($user, 'pipes_per_page', true);
     if (isset($current_per_page) && $current_per_page > 0) {
         $value = $current_per_page;
     }
     //Fetch, prepare, sort, and filter our data...
     if (isset($_POST['wp_screen_options']['option']) && $_POST['wp_screen_options']['option'] == 'pipes_per_page') {
         // get the current admin screen
         $option = $_POST['wp_screen_options']['option'];
         $value = $_POST['wp_screen_options']['value'];
         update_user_meta($user, $option, $value);
     }
     if (isset($value)) {
         $itemsListTable->per_page = $value;
     }
     $itemsListTable->prepare_items();
     return $itemsListTable;
 }