# WP Data Access

* Contributors: [PeterSchulzNL](https://www.linkedin.com/in/peterschulznl/)
* Donate link: https://www.paypal.me/kpsch
* Requires at least: WordPress 4.8.3
* Tested up to: WordPress 4.9.1
* Stable tag: 1.2.0
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html

WP Data Access is a WordPress plugin that gives you access to any database table!

## Description

WP Data Access gives you access to any database table and view with just a few mouse clicks. 
Works on the back-end with WP_List_Table and on the front-end with jQuery DataTables. Tables 
are generated dynamically based on mysql metadata (no coding required). Plugin settings 
allow you to grant or revoke access to specific tables (back-end and front-end use seperate
settings).

### Back-end

Adding a list table to your back-end has never been so easy. The following actions on list 
tables can be enabled or disabled on the settings page: view, insert, update, delete, 
export, import, search and screen options. WP Data Access list tables are build on 
WP_List_Table class to support standard WordPress list table layout and interaction. Menus 
for generated list tables can be added to your WordPress website, plugin or theme with or 
without coding. Check out the screenshots of the examples below to get an impression of what 
WP Data Access can do for you.

**Use the WP Data Access Explorer to navigate through database tables and view:**

[» See screenshot Data Explorer in action](https://wpdataaccess.files.wordpress.com/2017/11/explorer.png)

**Add list tables to autogenerated menu WP Data Tables for quick access:**

[» See screenshot list tables added to default WP Data Tables menu](https://wpdataaccess.files.wordpress.com/2017/11/wp-data-tables.png)

**Add list tables to your own menu to search and manage data:**

[» See screenshot list table added to your own menu](https://wpdataaccess.files.wordpress.com/2017/11/other-plugin.png)

**Example of student table added to external plugin menu:**

[» See screenshot list table own menu in action](https://wpdataaccess.files.wordpress.com/2017/11/manage-students.png)
(notice list table contain autogenerated insert, update, delete, export and import actions)

**Example of student data editing directly from previously shown list table:** 

[» See screenshot autogenerated edit form to manage table data](https://wpdataaccess.files.wordpress.com/2017/11/student-form.png)
(data entry forms are automatically generated)

### Frond-end
 
Tables can be added to your front-end with a shortcode in the text editor or with the wizard 
supported in the visual editor. Tables are dynamically build using jQuery DataTables. 
Different layouts are supported. Allows styling with CSS. Provides search and pagination 
functionality.

### Known limitations

* Only queries on tables and views in the WordPress database schema are allowed.
* Data entry forms are generic and have limited abilities.
* Plugin table not found after changing the WordPress database tables prefix after 
plugin activation.

[» Complete list of known limitations](https://wpdataaccess.com/documentation/known-limitations/)

## Installation

Download [wp-data-access.zip](https://wordpress.org/plugins/wp-data-access/) 

### Using the WordPress dashboard

1. Click on 'Add New' in the plugins dashboard
2. Search for 'wp-data-access.zip'
3. Click 'Install Now'
4. Activate the plugin on the Plugin dashboard
5. Click on 'WP Data Access > Manage Plugin' to customize your settings

### Uploading in the WordPress dashboard

1. Download 'wp-data-access.zip' to your computer
2. Click on 'Add New' plugin dashboard
3. Click on 'Upload PLugin'
4. Select 'wp-data-access.zip' from your computer
5. Upload
6. Activate the plugin on the WordPress plugin dashboard
7. Click on 'WP Data Access > Manage Plugin' to customize your settings

### Using FTP

1. Download and extract 'wp-data-access.zip' to your computer
2. Upload the 'wp-data-access' directory to your 'wp-content/plugins' directory
3. Activate the plugin on the WordPress plugins dashboard
4. Click on 'WP Data Access > Manage Plugin' to customize your settings

## Documentation

[» See WP Data Access documentation](https://wpdataaccess.com/documentation/)

## Known limitations

On activation the plugin creates a repository. If the plugin is networked activated 
on a multisite installation a repository is created for every blog. For blogs added 
later however, the repository cannot be created automatically. In that case the admin 
user of the blog will see a link on the plugin page which guides the user through 
a manual installation of the repository for that blog.

WP Data Access uses a plugin table to store menu items (default table name: 
wp_wpda_menu_items). If you change the WordPress database tables prefix after 
installing WP Data Access you'll need to change the prefix of the WP Data Access 
table equally as WP Data Access uses the WordPress prefix to identify WordPress 
as well as WP Data Access tables.

WP Data Access automatically adds data entry forms to your list tables for data 
adminstration (unless turned of in back-end settings). These forms however are 
generic forms with limiting functionality. You have to decide for yourself whether 
the supported functionality is sufficient for your purpose. Developers who want 
to write their own solutions can add their own forms to list tables or extend the 
form class provided with WP Data Access. Please check out class WPDA_User_Menu_Form 
to see a working example (part of WP Data Access functionality).

Data entry support and table bulk actions are only supported for tables having a 
primary key. Unique indexes are not taken into account.

## License

WP Data Access is licensed under the [GPL v2](LICENSE.txt) or later.

> This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.

> This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

> You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

## ChangeLog

[See full changelog here](https://bitbucket.org/wpdataaccess/wp-data-access/src/master/CHANGES.md)
