function checkPermissions() { $role = get_role('administrator'); // check if admin has manage_ebay_options capability if (!isset($role->capabilities['manage_ebay_options'])) { $Setup = new WPL_Setup(); $Setup->updatePermissions(); } }