Skip to content

Commit 85ed7e4

Browse files
updated readmes
1 parent 2bd58cc commit 85ed7e4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

nib.php

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
require_once('admin.php');
3+
if ( is_multisite() ) {
4+
$menu_perms = get_site_option( 'menu_items', array() );
5+
6+
if ( empty($menu_perms['plugins']) && ! is_super_admin() )
7+
wp_die( __( 'Cheatin&#8217; uh?' ) );
8+
}
9+
10+
if ( ! current_user_can( 'activate_plugins' ) ) {
11+
wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
12+
}
13+
14+
$plugin = isset($_GET['plugin']) ? $_GET['plugin'] : '';
15+
$action = isset($_GET['action']) ? $_GET['action'] : null;
16+
17+
if(isset($plugin) && !is_null(NIB_Plugin::instance($plugin))) {
18+
NIB_Plugin::instance($plugin)->controller($action);
19+
}
20+
else {
21+
wp_die( __("Page not found.") );
22+
}

0 commit comments

Comments
 (0)