Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Daylin Jones5,981 Points
Why include the $wptreehouse_username on the Profile section?
Track: Creating a WP Plugin Video: Working with Forms in a WordPress Plugin Settings Page Why include the $wptreehouse_username on the Profile section? It doesn't appear until a username is entered because of the same code in the post boxes. Just wondering if it's redundant.
<div class="meta-box-sortables"> <?php if( isset( $wptreehouse_username ) || $wptreehouse_username != '' ): ?> <div class="postbox"> <h3><span>Mike the Frog's Profile</span></h3> <div class="inside"> <p><img width="100%" class="wptreehouse-gravatar" src="<?php echo $plugin_url . '/images/mike-the-frog.png'; ?>" alt="Mike the Frog Gravatar"></p> <ul class="wptreehouse-badges-and-points"> <li>Badges: <strong>200</strong></li> <li>Points: <strong>10000</strong></li> </ul> </div> <!-- .inside --> </div> <!-- .postbox --> <?php endif; ?> </div> <!-- .meta-box-sortables -->