I am using the following code to display a metabox on the Dashboard, and I want it to only appear for users with a specific role (let's say "Editor" for our purposes). Can anyone refer me to documentation or an example? Thank you!
/* PROJECT SUMMARY */
function dashboard_introduction_metabox() {
function dashboard_introduction_content() {
echo "
<p>Sample message.</p>
";
}
wp_add_dashboard_widget( 'dashboard_introduction_content', __( 'An Introduction' ), 'dashboard_introduction_content' );
}
add_action('wp_dashboard_setup', 'dashboard_introduction_metabox');