Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // in functions.php
- <?php
- function user_has_avatar() {
- global $bp;
- if ( !bp_core_fetch_avatar( array( 'item_id' => $bp->loggedin_user->id, 'no_grav' => true ) ) )
- return false;
- return true;
- }
- ?>
- // at the bottom of header.php
- <?php
- global $bp;
- if( !bp_get_user_has_avatar()) :
- ?>
- <div class="alert">
- <button class="close" data-dismiss="alert">×</button>
- <strong>Warning !</strong> My message ....l.
- </div>
- <?php
- endif;
- // test two
- if( !user_has_avatar() ) :
- ?>
- <div class="alert">
- <button class="close" data-dismiss="alert">×</button>
- <strong>Warning !</strong> My message ....l.
- </div>
- <?php
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement