PluginProbe
Disk Usage Insights / 1.2
Disk Usage Insights v1.2
trunk 1.0 1.10 1.11 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
disk-usage-insights / disk-usage-insights.php

disk-usage-insights.php in Disk Usage Insights 1.2, at disk-usage-insights.php

34 lines 877 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Disk Usage Insights
4 * Plugin URI: https://github.com/mgleis/disk-usage-insights
5 * Description: Find large files and folders in your WordPress installation in no time!
6 * Author: Marcel Gleis
7 * License: GPLv3
8 * Version: 1.2
9 */
10 const DISK_USAGE_INSIGHTS_VERSION = '1.2';
11
12 // Ensure running within WordPress
13 if (!defined('ABSPATH')) {
14 exit;
15 }
16
17 // Ensure the admin interface is in use
18 if (!is_admin()) {
19 return;
20 }
21
22 // If site is a multisite: Ensure the logged in user has SuperAdmin privileges
23 if (is_multisite() && !current_user_can('manage_sites')) {
24 return;
25 }
26
27 add_action('plugins_loaded', 'mgleis_diskusageinsights_init_plugin');
28
29 function mgleis_diskusageinsights_init_plugin() {
30 require_once __DIR__.'/vendor/autoload.php';
31 $plugin = new Mgleis\DiskUsageInsights\Plugin(DISK_USAGE_INSIGHTS_VERSION);
32 $plugin->init();
33 }
34