• To keep the line formatting in the profile description add the php function nl2br to the profile page output in wpum_the_field_value.

    Now all profile page description text is cleaned from line breaks inserted by the user. When the user is editing the description text there are line breaks but not when verifying the results.

    I’m using a filter for ‘wpum_get_the_field_value’ which is a solution
    but I think more sites should benefit from this as a standard feature.

    WP user Manager Version 2.1.7

    // WP User Manager   Keep description line feeds
    
    add_filter('wpum_get_the_field_value',
    	function( $data, $field ) {
    	   if($field->get_ID() == 9) { 
    		  return nl2br($data);
    	   }
    	   return $data;
    	},
    	10,
    	2
    );

    The value 9 is position number for the description in custom fields.

  • The topic ‘Description format’ is closed to new replies.