Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Do not misunderstood.

I am trying to remove/disable Show toolbar option (not talking about hide/disable admin bar) but talking about The Option into Profile Settings.

I tried to search but in all I found only how to disable admin bar from front and back but nowhere I found how to remove the check-boxes from profile settings.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

the fields are hard coded there is nog filter or action to disable it.
You could hide it with CSS....

If you want you could replace the entirely page with a different one you custom create.

share|improve this answer
    
Actually I was looking proper and technical solution but css hack is also fine for now. Thanks! –  pixelngrain Jun 5 '12 at 7:34
add comment

Using the answer provided to the question Remove Personal Options section from Profile, you can remove the entire block of 'Personal Options' from the profile/user edit screens. By adapting the approach in the top answer there, you can specifically target the Toolbar option using:

 //Removes the 'Show Toolbar' option.
  function as_remove_personal_options( $subject ) {
    $subject = preg_replace( '#<tr class="show-admin-bar">.+?/tr>#s', '', $subject, 1 );
    return $subject;
  }

  function as_profile_subject_start() {
    ob_start( 'as_remove_personal_options' );
  }

  function as_profile_subject_end() {
    ob_end_flush();
  }
add_action( 'admin_head-profile.php', 'as_profile_subject_start' );
add_action( 'admin_footer-profile.php', 'as_profile_subject_end' );

add_action( 'admin_head-user-edit.php', 'as_profile_subject_start' );
add_action( 'admin_footer-user-edit.php', 'as_profile_subject_end' );
share|improve this answer
add comment

@pixelngrain , Maybe this is what you where looking for, this part of code will at least hide the Personal Options.

function hide_personal_options(){
echo "\n" . 
'<script type="text/javascript">
jQuery(document).ready(function($) { 
$(\'form#your-profile > h3:first\').hide(); 
$(\'form#your-profile > table:first\').hide(); 
$(\'form#your-profile\').show(); });
</script>' . 
"\n"; 
}
add_action('admin_head','hide_personal_options');

This in functions.php works like a charm for me. Code found here : Remove personal options

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.