hide plugin menu from unpriviledged users #12
This commit is contained in:
parent
4f727346c7
commit
05d806fc00
@ -3,7 +3,7 @@
|
|||||||
Plugin Name: Auth Manager Plus
|
Plugin Name: Auth Manager Plus
|
||||||
Plugin URI: https://github.com/joshp23/YOURLS-AuthMgrPlus
|
Plugin URI: https://github.com/joshp23/YOURLS-AuthMgrPlus
|
||||||
Description: Role Based Access Controlls with seperated user data for authenticated users
|
Description: Role Based Access Controlls with seperated user data for authenticated users
|
||||||
Version: 2.0.0
|
Version: 2.1.0
|
||||||
Author: Josh Panter, nicwaller, Ian Barber <ian.barber@gmail.com>
|
Author: Josh Panter, nicwaller, Ian Barber <ian.barber@gmail.com>
|
||||||
Author URI: https://unfettered.net
|
Author URI: https://unfettered.net
|
||||||
*/
|
*/
|
||||||
@ -166,10 +166,18 @@ function amp_admin_sublinks( $links ) {
|
|||||||
unset($links['plugins'][$link]);
|
unset($links['plugins'][$link]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( empty( $links['plugins'] ) )
|
||||||
|
yourls_add_filter( 'admin_links', 'amp_admin_links' );
|
||||||
|
|
||||||
sort($links['plugins']);
|
sort($links['plugins']);
|
||||||
return $links;
|
return $links;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function amp_admin_links( $links ) {
|
||||||
|
unset($links['plugins']);
|
||||||
|
return $links;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Cosmetic filter: displays currently available roles
|
* Cosmetic filter: displays currently available roles
|
||||||
* by hovering mouse over the username in logout link.
|
* by hovering mouse over the username in logout link.
|
||||||
|
Loading…
Reference in New Issue
Block a user