if( current_user_can( ‘manage_options’ ) )
{ echo ‘这段文字只会在“管理员”角色登录后显示。’; }
if( current_user_can( ‘publish_pages’ ) && !current_user_can( ‘manage_options’ ) )
{ echo ‘这段文字只会在“编辑”角色登录后显示。’; }
if( current_user_can( ‘publish_posts’ ) && !current_user_can( ‘publish_pages’ ) )
{ echo ‘这段文字只会在“作者”角色登录后显示。’; }
if( current_user_can( ‘edit_posts’ ) && !current_user_can( ‘publish_posts’ ) )
{ echo ‘这段文字只会在“投稿者”角色登录后显示。’; }
if( current_user_can( ‘read’ ) && !current_user_can( ‘edit_posts’ ) )
{ echo ‘这段文字只会在“订阅者”角色登录后显示。’; }
?>