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.

I've been hunting for the hook to edit the Biographical info field and it's H3 but no luck. I've found edit_user_{$field} do specific hooks exist?

I'm thinking I can hook into the existing tag 'description'? Thanks in advance.

edit_user_profile('description', 'change_description');
function change_description(){
// something here?
}
share|improve this question
    
have you seen this? –  toscho Mar 8 '13 at 20:29
    
If you've included a solution in your edit, it's better to instead answer your own question, then later mark is as accepted answer. It's more clear that way. –  dalbaeb Mar 8 '13 at 21:00
add comment

1 Answer

up vote 0 down vote accepted

thanks @toscho

A quick tweak on toscho's Remove Bio Box code

add_action( 'personal_options', array ( 'T5_Hide_Profile_Bio_Box', 'start' ) );
/**
 * Captures the part with the biobox in an output buffer and removes it.
 *
 * @author Thomas Scholz, <info@toscho.de>
 *
 */
class T5_Hide_Profile_Bio_Box
{
    /**
     * Called on 'personal_options'.
     *
     * @return void
     */
    public static function start()
    {
        $action = ( IS_PROFILE_PAGE ? 'show' : 'edit' ) . '_user_profile';
        add_action( $action, array ( __CLASS__, 'stop' ) );
        ob_start();
    }
/**
 * Strips the bio box from the buffered content.
 *
 * @return void
 */
public static function stop()
{
    $html = ob_get_contents();
    ob_end_clean();

    // remove the headline
    $headline = __( IS_PROFILE_PAGE ? 'About Yourself' : 'About the user' );
    $replacement = 'About The Author Box';
    $html = str_replace( '<h3>' . $headline . '</h3>', '<h3>' . $replacement . '</h3>', $html );

    // remove the table row
    // $html = preg_replace( '~<tr>\s*<th><label for="description".*</tr>~imsUu', '<th><label for="description"</tr>', $html );
    $html = str_replace( 'Biographical Info', 'Short Author Bio', $html );
    print $html;
  }
}
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.