-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnib.php
More file actions
22 lines (18 loc) · 665 Bytes
/
Copy pathnib.php
File metadata and controls
22 lines (18 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
require_once('admin.php');
if ( is_multisite() ) {
$menu_perms = get_site_option( 'menu_items', array() );
if ( empty($menu_perms['plugins']) && ! is_super_admin() )
wp_die( __( 'Cheatin’ uh?' ) );
}
if ( ! current_user_can( 'activate_plugins' ) ) {
wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
}
$plugin = isset($_GET['plugin']) ? $_GET['plugin'] : '';
$action = isset($_GET['action']) ? $_GET['action'] : null;
if(isset($plugin) && !is_null(NIB_Plugin::instance($plugin))) {
NIB_Plugin::instance($plugin)->controller($action);
}
else {
wp_die( __("Page not found.") );
}