WordPress smart admin check

Case users are not administrators they could not enter the WordPress dashboard, else they can.

function admin_check_access($content) { return ( current_user_can("administrator") ) ? $content : false; } add_filter( 'show_admin_bar' , 'admin_check_access');

tags: & category: -