golden hour
/home/godaofbq/hyperbaric-revolution.com/wp-content/plugins/quicker/core/admin/settings
⬆️ Go Up
Upload
File/Folder
Size
Actions
.htaccess
237 B
Del
OK
form.php
1.44 KB
Del
OK
settings.php
3 KB
Del
OK
tab-content
-
Del
OK
table.php
1.54 KB
Del
OK
Edit: table.php
<?php namespace Quicker\Core\Admin\Settings; defined('ABSPATH') || exit; if ( ! class_exists( 'WP_List_Table' )){ require_once ABSPATH . 'wp-admin/inclueds/class-wp-list-table.php'; } class Table extends \WP_List_Table{ public $singular_name; public $plural_name; public $id = ''; public $columns = []; /** * Show list */ function __construct($all_data_of_table){ $this->singular_name = $all_data_of_table['singular_name']; $this->plural_name = $all_data_of_table['plural_name']; $this->columns = $all_data_of_table['columns']; parent::__construct( [ 'singular' => $this->singular_name , 'plural' => $this->plural_name , 'ajax' => true ]); } /** * Get column header function */ public function get_columns(){ return $this->columns; } /** * Sortable column function */ public function get_sortable_columns() { unset($this->columns['enable_rules']); unset($this->columns['action']); return $this->columns; } /** * Display all row function */ protected function column_default( $item , $column_name ){ switch( $column_name ) { case $column_name: return $item[$column_name]; default: isset( $item[$column_name] ) ? $item[$column_name] : ''; break; } } /** * Main query and show function */ public function preparing_items(){ } }
Save