jonny2k9 / WP_List_Table-Class-Plugin-Example

A plugin demonstration on how to use WordPress WP_List_Table Class

Home Page:http://www.sitepoint.com/using-wp_list_table-to-create-wordpress-admin-tables/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WP_List_Table-Class-Plugin-Example

A plugin demonstration on how to use WordPress WP_List_Table Class

Database SQL dump

CREATE TABLE IF NOT EXISTS `wp_customers` (
`ID` int(11) NOT NULL,
  `name` varchar(20) NOT NULL,
  `address` varchar(30) NOT NULL,
  `city` varchar(10) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

INSERT INTO `wp_customers` (`ID`, `name`, `address`, `city`) VALUES
(1, 'Alfreds Futterkiste ', 'Obere Str. 57', 'Berlin'),
(2, 'Ana Trujillo ', 'Avda. de la Constitución 2222', 'México D.F'),
(3, 'Antonio Moreno', 'Mataderos 2312', 'México D.F'),
(4, 'Thomas Hardy ', '120 Hanover Sq.', 'London'),
(5, 'Christina Berglund ', 'Berguvsvägen 8 ', 'Lulea'),
(9, 'Hanna Moos', 'Forsterstr. 57', 'Mannheim'),
(10, 'Frédérique Citeaux', '24, place Kléber', 'Strasbourg'),
(11, 'Martín Sommer', 'C/ Araquil, 67', 'Madrid'),
(12, 'Laurence Lebihans', '12, rue des Bouchers', 'Marseille');

ALTER TABLE `wp_customers` ADD PRIMARY KEY (`ID`);
 
ALTER TABLE `wp_customers` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;

Security

You should whitelist the orderby parameter your plugin / theme accept to avoid any form of sql injection. See #2

About

A plugin demonstration on how to use WordPress WP_List_Table Class

http://www.sitepoint.com/using-wp_list_table-to-create-wordpress-admin-tables/

License:GNU General Public License v3.0


Languages

Language:PHP 100.0%