Tried messing with it myself, but I am simply not experienced enough with WordPress to code it properly.
After more googling, I found this:
https://www.smashingmagazine.com/2009/12/14/advanced-power-tips-for-wordpress-template-developers-reloaded/
Specifically, the hiding fields based on user roles makes use of the following code:
//if current user level is less than 3, remove the postcustom meta box
if ($current_user->user_level < 3)
I tried to insert it into this plugin:
<?php
/*
Plugin Name: Planet X7
Plugin URI: https://www.sevban.com/wordpress/planet-x7-wordpress-admin-theme
Description: Planet X7 theme for WordPress adminisrator area.
Author: Sevban Õztürk a.k.a peex
Version: 1.0.4
Author URI: https://www.sevban.com
*/
function planetx7_header() {
$site_uri = get_settings('siteurl');
$plugin_uri = $site_uri . '/wp-content/plugins/planet-x7/';
echo '
<link rel="stylesheet" type="text/css" href="' . $plugin_uri . 'planet-x7.css?version=1.0.4" />
';
}
global $userdata;
global $current_user;
require(ABSPATH . WPINC . ‘/pluggable.php’);
get_currentuserinfo();
if ($current_user->user_level < 3)
add_action('admin_head', 'planetx7_header');
?>
and I get the error: Call to undefined function: get_currentuserinfo()
Can someone possibly insert get_currentuserinfo() into the theme plugin to call the css only when the user is a < 3 role?
Thanks in advance