| @@ 376-393 (lines=18) @@ | ||
| 373 | * @uses Give_Donor_Reports_Table::get_total_donors() |
|
| 374 | * @return void |
|
| 375 | */ |
|
| 376 | public function prepare_items() { |
|
| 377 | ||
| 378 | $columns = $this->get_columns(); |
|
| 379 | $hidden = array(); // No hidden columns |
|
| 380 | $sortable = $this->get_sortable_columns(); |
|
| 381 | ||
| 382 | $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
| 383 | ||
| 384 | $this->items = $this->reports_data(); |
|
| 385 | ||
| 386 | $this->total = $this->get_donor_count(); |
|
| 387 | ||
| 388 | $this->set_pagination_args( array( |
|
| 389 | 'total_items' => $this->total, |
|
| 390 | 'per_page' => $this->per_page, |
|
| 391 | 'total_pages' => ceil( $this->total / $this->per_page ), |
|
| 392 | ) ); |
|
| 393 | } |
|
| 394 | } |
|
| 395 | ||
| @@ 459-478 (lines=20) @@ | ||
| 456 | * |
|
| 457 | * @return void |
|
| 458 | */ |
|
| 459 | public function prepare_items() { |
|
| 460 | ||
| 461 | $columns = $this->get_columns(); |
|
| 462 | $hidden = array(); // No hidden columns. |
|
| 463 | $sortable = $this->get_sortable_columns(); |
|
| 464 | ||
| 465 | $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
| 466 | ||
| 467 | $this->process_bulk_action(); |
|
| 468 | ||
| 469 | $this->items = $this->donor_data(); |
|
| 470 | ||
| 471 | $this->total = $this->get_donor_count(); |
|
| 472 | ||
| 473 | $this->set_pagination_args( array( |
|
| 474 | 'total_items' => $this->total, |
|
| 475 | 'per_page' => $this->per_page, |
|
| 476 | 'total_pages' => ceil( $this->total / $this->per_page ), |
|
| 477 | ) ); |
|
| 478 | } |
|
| 479 | } |
|
| 480 | ||