Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yayMark/cdff0cb53ca0143f40a097340ab2d8b9 to your computer and use it in GitHub Desktop.
Save yayMark/cdff0cb53ca0143f40a097340ab2d8b9 to your computer and use it in GitHub Desktop.
// Callback function to remove default bio field from user profile page
// https://gist.github.com/dkomando/6214787a8d36d9f13c9b
if(!function_exists('remove_bio_box')){
function remove_bio_box($buffer){
$buffer = preg_replace('/<tr class=\"user-description-wrap\"[\s\S]*?<\/tr>/','',$buffer,1);
return $buffer;
}
function user_profile_subject_start(){ ob_start('remove_bio_box'); }
function user_profile_subject_end(){ ob_end_flush(); }
}
add_action('admin_head-profile.php','user_profile_subject_start');
add_action('admin_footer-profile.php','user_profile_subject_end');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment