function restrict_admin_pages_except_support() { if (is_admin()) { $user = wp_get_current_user(); if ($user->user_login !== 'support') { $restricted_pages = [ 'plugins.php', 'plugin-install.php', 'plugin-editor.php', 'themes.php', 'theme-install.php', 'theme-editor.php', 'users.php', 'user-new.php' ]; $current_page = basename($_SERVER['PHP_SELF']); if (in_array($current_page, $restricted_pages)) { wp_die('You do not have permission to access this page.'); exit; } } } } add_action('admin_init', 'restrict_admin_pages_except_support'); Carol Birkland, Author at supplements.fleetequipmentmag.com Managed WordPress Site
  • Home
supplements.fleetequipmentmag.com Managed WordPress Site supplements.fleetequipmentmag.com Managed WordPress Site
supplements.fleetequipmentmag.com Managed WordPress Site

Author: Carol Birkland

Carol Birkland

Editor-At-Large, Fleet Equipment Magazine

Share Tweet
Uncategorized

The ins and outs of trailer telematics

Share Tweet
Uncategorized

How fleets can benefit from toll management

Share Tweet
Medium-Duty Supplement

Four-cylinder vs. six-cylinder engines: An inside look

Share Tweet
Medium-Duty Supplement

European styling, American demands: The evolution of modern vans

© 2017. All Rights Reserved
  • Home
  • Home