-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalter-db-tables.php
60 lines (55 loc) · 2.35 KB
/
alter-db-tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* @package Alter_DB_Tables
* @author Alberto Cocchiara <info@altertech.it>
* @license GPL-2.0+
* @link http://altertech.it
* @copyright 2015 AlterTech
*
* @wordpress-plugin
* Plugin Name: DB Tables Import/Export
* Plugin URI: http://blog.altertech.it/alter-db-tables/
* Description: DB Tables Import / Export by AlterTech two new tools to import and export, you can choose the tables to be imported with the file .csv or export them to json and csv.
* Version: 1.0.1
* Author: Alberto Cocchiara
* Author URI: http://blog.altertech.it/author/alberto-cocchiara/
* Text Domain: alter-db-tables
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( !defined( 'WPINC' ) ) {
die;
}
/*
* Load Language wrapper function for WPML/Ceceppa Multilingua/Polylang
*/
//require_once( plugin_dir_path( __FILE__ ) . 'languages/language.php' );
add_action('plugins_loaded', 'alter_db_tables_lang_ready');
function alter_db_tables_lang_ready() {
load_plugin_textdomain( 'alter-db-tables', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );
}
/*
* Load public class to display login page customization
*
*/
require_once( plugin_dir_path( __FILE__ ) . 'public/alter-db-tables-class.php' );
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*/
register_activation_hook( __FILE__, array( 'Alter_DB_Tables', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Alter_DB_Tables', 'deactivate' ) );
add_action( 'plugins_loaded', array( 'Alter_DB_Tables', 'get_instance' ) );
/* ----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
* ---------------------------------------------------------------------------- */
if( !get_option( 'alter-db-tables-wp_enable_rewrite_rules' ) ) {} else {
// Create new rewrite rule
add_action( 'plugins_loaded', array( 'Alter_DB_Tables_Admin_Advanced', 'get_instance' ), 1 );
}
if ( is_admin() ) {
require_once( plugin_dir_path( __FILE__ ) . 'admin/alter-db-tables-admin-class.php' );
add_action( 'plugins_loaded', array( 'Alter_DB_Tables_Admin', 'get_instance' ) );
}