PluginProbe
Disk Usage Insights / 1.8
Disk Usage Insights v1.8
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.8, at disk-usage-insights.php

35 lines 898 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.8
9 * Requires PHP: 7.4
10 */
11 const DISK_USAGE_INSIGHTS_VERSION = '1.8';
12
13 // Ensure running within WordPress
14 if (!defined('ABSPATH')) {
15 exit;
16 }
17
18 // Ensure the admin interface is in use
19 if (!is_admin()) {
20 return;
21 }
22
23 // If site is a multisite: Ensure the logged in user has SuperAdmin privileges
24 if (is_multisite() && !current_user_can('manage_sites')) {
25 return;
26 }
27
28 add_action('plugins_loaded', 'mgleis_diskusageinsights_init_plugin');
29
30 function mgleis_diskusageinsights_init_plugin() {
31 require_once __DIR__.'/vendor/autoload.php';
32 $plugin = new Mgleis\DiskUsageInsights\Plugin(DISK_USAGE_INSIGHTS_VERSION);
33 $plugin->init();
34 }
35