I'd like to remove the action profile_personal_options
(more specifically the color scheme and visual editor checkbox) which shows up in wp-admin/user-edit.php
. I believe it's as simple as running it through remove_action()
, but I'm not sure what the second parameter would be. Where would be the best place to look?
remove_action('profile_personal_options');
I was previously using:
function of_remove_profile_fields() {
if (current_user_can('manage_options') == false) {
?>
<style type="text/css">
form#your-profile p+h3,
form#your-profile p+h3+table { display:none!important;visibility:hidden!important; }
</style>
<?php }
}
add_action( 'admin_print_styles-profile.php', 'of_remove_profile_fields' );
add_action( 'admin_print_styles-user-edit.php', 'of_remove_profile_fields' );
but would rather do this the correct way. Thanks!
Update
Ack, this actually looks like it may be hardcoded into user-edit.php
. Should I just go with the CSS method? Is that area really required or WP? Why didn't they plug into their own do_action('profile_personal_options', $profileuser);
?