';
break;
default:
$message = __( 'There\'s something wrong with your code...', 'wpssc' );
$admin_notice = "
\n";
break;
}
$admin_notice .= '
' . $message . "
\n";
$admin_notice .= "
\n";
return $admin_notice;
}
/**
* Utility function to get the current user's role
*
* @since 1.0
*/
public function get_current_user_role() {
global $wp_roles;
foreach ( $wp_roles->role_names as $role => $name ) :
if ( current_user_can( $role ) ) {
return $role;
}
endforeach;
}
}