<?php
global $current_user;
get_currentuserinfo();
$myuser= "$current_user->ID";
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
?>
<?php
if ($user_role == 'contributor') {
?>
// your code is here //
<?php
}
?>
global $current_user;
get_currentuserinfo();
$myuser= "$current_user->ID";
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
?>
<?php
if ($user_role == 'contributor') {
?>
// your code is here //
<?php
}
?>
No comments:
Post a Comment