Class WP_Data_Access_Public

Defines public specific functionality for plugin WP Data Access.

author Peter Schulz
since 1.0.0
package plugin\public

 Methods

Add scripts to back-end

enqueue_scripts() 

The following script files are registered :

  • jQuery DataTables (version is set in class WPDA)
  • jQuery DataTables responsive (version is set in class WPDA)
  • WP Data Access DataTables server implementation (ajax)

Scripts are used to build front-end tables and support searching and pagination. Whether the scripts for jQuery DataTables and/or jQuery DataTables responsice should be loaded or not can be set in the front-end settings (menu: Manage Plugin). Sites that already have some of these script files loaded, can turn off loading in the front-end settings to prevent double loading.

since 1.0.0
see \WPDataAccess\WPDA

Add stylesheets to front-end

enqueue_styles() 

The following stylesheets are registered:

  • jQuery DataTables stylesheet (version is set in class WPDA)
  • jQuery DataTables responsive stylesheet (version is set in class WPDA)

Stylesheets are used to style the front-end tables. Whether stylesheets should be loaded or not can be set in the front-end settings (menu: Manage Plugin). Sites that already have some of these stylesheets loaded, can turn off loading in the front-end settings to prevent double loading.

since 1.0.0
see \WPDataAccess\WPDA

Register shortcode 'wpdataaccess'

register_shortcodes() 
since 1.0.0

Show data administration page on web page

wpdadiehard($atts) : false | string

Allows to show Data Projects pages on web p0ages as well.

Parameters

$atts

Returns

falsestring

Implementation of shortcode 'wpdataaccess'

wpdataaccess(array $atts) : string

Checks the values entered on validity (as far as possible) and builds the table based on the given table name, column names and other arguments. Tables is build with class \WPDataAccess\Data_Tables\WPDA_Data_Tables.

see \WPDataAccess\Data_Tables\WPDA_Data_Tables
since 1.0.0

Parameters

$atts

array

Arguments applied with the shortcode.

Returns

stringresponse

is_page()

is_page() 

is_post()

is_post()