I'm trying to edit a plugin so that it only shows it's submenu if the user is an administrator but I don't know how to define the value of the variable before the function:
function load_view( $name, $params = array(), $print_submenu_navigation = false ) {
My code so far is:
if (current_user_can('administrator')) {
$print_submenu_navigation = true;
}
else {
$print_submenu_navigation = false;
}
If I put this before the function I get a php error telling me it's expecting a function.