PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 2.7.0
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v2.7.0
5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 5.5.42 5.5.43 5.5.45 All 158 releases
wp-data-access / wp-data-access.php

wp-data-access.php in WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards 2.7.0, at wp-data-access.php

79 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: WP Data Access
4 * Plugin URI: https://wpdataaccess.com/
5 * Description: WP Data Access helps you to manage your WordPress data and database from the WordPress dashboard and to publish table data on your website.
6 * Version: 2.7.0
7 * Author: Peter Schulz
8 * Author URI: https://www.linkedin.com/in/peterschulznl/
9 * Text Domain: wp-data-access
10 * License: GPL-2.0+
11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12 * Domain Path: /languages
13 *
14 * @package plugin
15 * @author Peter Schulz
16 * @since 1.0.0
17 */
18
19 if ( ! defined( 'WPINC' ) ) {
20 die;
21 }
22
23 // Load WPDataAccess namespace.
24 require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
25
26 /**
27 * Activate plugin
28 *
29 * @author Peter Schulz
30 * @since 1.0.0
31 */
32 function activate_wp_data_access() {
33 require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-data-access-switch.php';
34 WP_Data_Access_Switch::activate();
35 }
36
37 register_activation_hook( __FILE__, 'activate_wp_data_access' );
38
39 /**
40 * Deactivate plugin
41 *
42 * @author Peter Schulz
43 * @since 1.0.0
44 */
45 function deactivate_wp_data_access() {
46 require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-data-access-switch.php';
47 WP_Data_Access_Switch::deactivate();
48 }
49
50 register_deactivation_hook( __FILE__, 'deactivate_wp_data_access' );
51
52 /**
53 * Check if database needs to be updated
54 *
55 * @author Peter Schulz
56 * @since 1.5.2
57 */
58 function wpda_update_db_check() {
59 if ( WPDataAccess\WPDA::OPTION_WPDA_VERSION[1] !== get_option( WPDataAccess\WPDA::OPTION_WPDA_VERSION[0] ) ) {
60 activate_wp_data_access();
61 }
62 }
63
64 add_action( 'plugins_loaded', 'wpda_update_db_check' );
65
66 require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-data-access.php';
67 /**
68 * Start plugin
69 *
70 * @author Peter Schulz
71 * @since 1.0.0
72 */
73 function run_wp_data_access() {
74 $wpdataaccess = new WP_Data_Access();
75 $wpdataaccess->run();
76 }
77
78 run_wp_data_access();
79