Enhance bbPress theme compatibility (Redux)
|Reported by:||iamzippy||Owned by:|
On the subject of presenting user/author bio information:
Both Twentyten & Twentyeleven will skip the author-info code section entirely if the description field of a user profile is empty. This makes perfect sense; if there's nothing to display, then display nothing. At worst, an empty 'About' section could create the impression that something's ...broken?
It's trivial to apply a conditional around the equivalent entry-author-info section in bbpress/user-details.php and thus mimic the exact behaviour of the WordPress bundled themes.
<? php if( $description = bbp_get_displayed_user_field( 'description' ) ) : ?> <!-- ...existing code... --> <?php endif; ?>
Bonus: since the description is already captured, it can be echoed directly without another function call.
The current plugin distro duplicates bbpress/user-details.php under bbp-theme-compat and bbp-twentyten.
Note: I didn't feel right re-opening #1713 (closed as fixed 6 months ago) since I reckon this is off on a tangent.