if user role is then echo text
You are passing a role name, administrator, to current_user_can. Looking at the Codex page this is supported but not guaranteed to work, and should generally be avoided: Passing role names to current_user_can() is discouraged as this is not guaranteed to work correctly (see #22624). Instead, you should use a capability: if ( current_user_can( ‘manage_options’ ) … Read more