Improve reduction of subscriber profiles more

This commit is contained in:
Tetrakern 2023-07-26 00:05:12 +02:00
parent d1d5f6ce25
commit 9c5dbce9c3

View File

@ -953,9 +953,14 @@ if ( ! function_exists( 'fictioneer_reduce_subscriber_profile' ) ) {
// Abort if administrator
if ( fictioneer_is_admin( $user->ID ) ) return;
// Remove application password
add_filter( 'wp_is_application_passwords_available', '__return_false' );
// Abort if not a subscriber (higher role)
if ( ! in_array( 'subscriber', $user->roles ) ) return;
// Reduce profile...
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
add_filter( 'wp_is_application_passwords_available', '__return_false' );
add_filter( 'user_contactmethods', '__return_empty_array', 20 );
}
}