Hide unnecessary roles

add_filter( ‘editable_roles’, function( $roles ) { if (!current_user_can(‘administrator’) && !is_admin()) { unset( $roles[‘administrator’] ); } unset( $roles[‘editor’] ); unset( $roles[‘subscriber’] ); unset( $roles[‘revisor’] ); unset( $roles[‘docspress_manager’] ); unset( $roles[‘author’] ); unset( $roles[‘contributor’] ); return $roles; } );Continue reading

Allow Admin Access

/** * By default, Charitable disables admin access for users * who do not have one of the `edit_posts`, * `manage_charitable_settings`, or `edit_products` * capabilities. * * The code below enables access for logged in users who do * not…Continue reading

Show Admin Bar

/** * By default, Charitable hides the admin bar from users * who do not have one of the `edit_posts`, * `manage_charitable_settings`, or `edit_products` * capabilities. * * The code below shows the admin bar for logged in users who…Continue reading