It appears that whoever coded WP's user profile form (or BBPress's, if BBPress is replacing the default one) considered it the most important mission in the history of humanity to prevent anyone from ever adding any form of whitespace other than a single space between words. :-/
I've tried every means I can think of to break up the "Biographical Info" field on the profile page into multiple paragraphs (either real ones or at least visually), from inserting plain and HTML line breaks, to using HTML p and other markup, to adding every Unicode character that canonically induces a line break, to img-inlining a 1em-tall transparent GIF that spans the width of the material, and so on. Every single approach is defeated by the filter on this form field, producing a big hard-to-read blob of text.
Digging around, it appears that this line in user-edit.php
(and perhaps similar ones in other places that interface with this form field) is responsible for this behavior:
echo apply_filters( 'user_profile_picture_description', $description, $profileuser );
Various documentation provides some skeletal information on user_profile_picture_description
, but nowhere can I find it defined exactly what this filter does and how. Even when I text-search my entire WP code directory for user_profile_picture_description
I find references to it, like the one above, but no filter code that details exactly what it is stripping and how, so I'm not sure where that is coming from. Maybe it's being pulled-in offsite via the Internet? I dunno.
What I want to do is either 1) have this field's content treated the same as a regular post or comment or BBPress post (not sure it matters which); or 2) be able to change the exact filter behavior of user_profile_picture_description
to stop killing every form of whitespace. Preferably do this (one or the other) in a way that is at least just a block in the theme's functions.php
file, but better yet installable as a simple plugin so that the change survives theme updates.
If for some reason that is not plausible, then another approach might be disabling that entire form field and replacing it with one that serves the same "Biographical Information" profile purpose and sits in the same spot but lacks the etremist filtering. Not sure I care one way or another, as long as I can paragraph-break in my profile, via some means (even if it's an obscure one, but simple HTML p tagging seems most sensible).
I think I've seen enough material already on how to add a new form field to that form, but not on how to replace an existing one.
PS: I'm aware there's a remove-filter
feature, but I'm not certain that this filter should be completely eliminated rather than prevented from operating on this particular form field.
PPS: I've looked for a plugin that facilitates editing of the built-in filters, and there doesn't seem to be one.
Update/clarificaton: I've discovered belatedly that there are separate profiles (on a BBPress system) at both /authors/USERNAME/
paths and at /forums/users/USERNAME/
paths (the /forums/
part might be different, depending on one's BBPress configuration). The default profile pages, at the /authors/USERNAME/
paths, which seem to only exist for Post authors not for all users, aren't subject to as much filtering as the /forums/users/USERNAME/
profiles, which exist for all users (or, technically, all users who registered after installation of BBPress). So, the "bad-behaving" profile that kills all whitespac is the BBPress one, and I'm not sure yet what filter is the culprit. I need to figure that out and revise the subject and the entire post, since user_profile_picture_description
seems to be a red herring.