-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwordpress-ajax-admin-users-table.php
More file actions
55 lines (47 loc) · 1.39 KB
/
wordpress-ajax-admin-users-table.php
File metadata and controls
55 lines (47 loc) · 1.39 KB
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
<?php
/**
* Plugin Name: WordPress AJAX Admin Users Table
* Description: A simple admin users table powered by React, loading data without page refresh.
* Author: Pierre Saïkali
* Author URI: https://saika.li
* Text Domain: utec
* Domain Path: /languages/
* Version: 1.0.0
* Namespace: UTEC (for User Table Exercise for Codeable)
*/
namespace UTEC;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Define plugin constants
*/
define( 'UTEC_VERSION', '1.0.0' );
define( 'UTEC_MIN_PHP_VERSION', '5.6' );
define( 'UTEC_URL', plugin_dir_url( __FILE__ ) );
define( 'UTEC_DIR', plugin_dir_path( __FILE__ ) );
define( 'UTEC_PLUGIN_DIRNAME', basename( rtrim( dirname( __FILE__ ), '/' ) ) );
define( 'UTEC_BASENAME', plugin_basename( __FILE__ ) );
define( 'UTEC_ASSETS_URL', UTEC_URL . 'assets' );
/**
* Register our autoloader logic.
*/
require_once UTEC_DIR . DIRECTORY_SEPARATOR . 'autoloader.php';
Autoloader::register();
/**
* Include our globally usable functions.
*/
require_once __DIR__ . DIRECTORY_SEPARATOR . 'functions.php';
/**
* Load translation
*/
load_plugin_textdomain( 'utec', false, UTEC_PLUGIN_DIRNAME . '/languages/' );
/**
* Activation and de-activation hooks
*/
register_activation_hook( __FILE__, array( utec(), 'activate' ) );
register_deactivation_hook( __FILE__, array( utec(), 'deactivate' ) );
/**
* Fire the fun stuff!
*/
add_action( 'plugins_loaded', array( utec(), 'fire' ) );