Forked from dkomando/WordPress Remove About Yourself Box - User Profile
Created
October 4, 2018 02:26
-
-
Save yayMark/cdff0cb53ca0143f40a097340ab2d8b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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