i think this might work with you
function myshortcode(){
$user = wp_get_current_user();
if ( !in_array( 'author', (array) $user->roles ) ) {
//Run shortcode
}
}
add_shortcode('myshortcode','myshortcode');
i think this might work with you
function myshortcode(){
$user = wp_get_current_user();
if ( !in_array( 'author', (array) $user->roles ) ) {
//Run shortcode
}
}
add_shortcode('myshortcode','myshortcode');