-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard-directory-size.php
37 lines (31 loc) · 1.71 KB
/
dashboard-directory-size.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
<?php
/*
Plugin Name: Dashboard Directory Size
Description: Dashboard widget to display directory sizes
Author: Pete Nelson <a href="https://twitter.com/GunGeekATX">(@GunGeekATX)</a>
Version: 1.6.0
Text Domain: dashboard-directory-size
Domain Path: /languages
*/
if ( ! defined( 'ABSPATH' ) ) die( 'restricted access' );
if ( ! defined( 'DASHBOARD_DIRECOTRY_SIZE_ROOT' ) ) {
define( 'DASHBOARD_DIRECOTRY_SIZE_ROOT', trailingslashit( dirname( __FILE__ ) ) );
}
require_once DASHBOARD_DIRECOTRY_SIZE_ROOT . 'includes/class-dashboard-directory-size-common.php';
require_once DASHBOARD_DIRECOTRY_SIZE_ROOT . 'includes/class-dashboard-directory-size-i18n.php';
require_once DASHBOARD_DIRECOTRY_SIZE_ROOT . 'includes/class-dashboard-directory-size-settings.php';
require_once DASHBOARD_DIRECOTRY_SIZE_ROOT . 'includes/class-dashboard-directory-size-dashboard-widget.php';
require_once DASHBOARD_DIRECOTRY_SIZE_ROOT . 'includes/class-dashboard-directory-size-rest-api.php';
add_action( 'plugins_loaded', 'Dashboard_Directory_Size_i18n::plugins_loaded' );
add_action( 'plugins_loaded', 'Dashboard_Directory_Size_Common::plugins_loaded' );
add_action( 'plugins_loaded', 'Dashboard_Directory_Size_Dashboard_Widget::plugins_loaded' );
add_action( 'plugins_loaded', 'Dashboard_Directory_Size_Settings::plugins_loaded' );
add_action( 'plugins_loaded', 'Dashboard_Directory_Size_REST_API::plugins_loaded' );
// handler for activation
if ( class_exists( 'Dashboard_Directory_Size_Settings' ) ) {
$dds_settings = new Dashboard_Directory_Size_Settings();
register_activation_hook( __FILE__, array( $dds_settings, 'activation_hook' ) );
}
if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once DASHBOARD_DIRECOTRY_SIZE_ROOT . 'includes/wp-cli/setup.php';
}